AZO234 / NP2kai

Neko Project II kai
http://domisan.sakura.ne.jp/article/np2kai/np2kai.html
MIT License
246 stars 61 forks source link

Consider removing hardcoded vcpkg path in CMakeSettings.json #154

Open jchv opened 1 year ago

jchv commented 1 year ago

Hello.

In CMakeSettings.json, there is:

        {
          "name": "CMAKE_TOOLCHAIN_FILE",
          "value": "C:\\dev\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake"
        },

However, it does not seem like it is necessary to specify anymore. From Visual Studio 2022 documentation on "CMake Toolchain File":

The path of the toolchahin file supplied to CMake. Toolchain files specify locations of compilers and toolchain utilities, and other target platform and compiler related information. By default, Visual Studio will try and use the vcpkg toolchain file if this setting is unspecified.

I have vcpkg installed to C:\vcpkg, instead of C:\dev\vcpkg, so the build fails ordinarily. When this variable is removed from CMakeSettings.json, the Visual Studio CMake build succeeds.

If it is not a problem, I think simply removing this setting would make it easier to build on setups that have vcpkg installed elsewhere, such as GitHub Actions.