Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing hardcoded vcpkg path in CMakeSettings.json #154

Open
jchv opened this issue Jul 31, 2022 · 0 comments
Open

Consider removing hardcoded vcpkg path in CMakeSettings.json #154

jchv opened this issue Jul 31, 2022 · 0 comments

Comments

@jchv
Copy link

jchv commented Jul 31, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant