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

Support vcpkg dependencies #135

Open
BullyWiiPlaza opened this issue Nov 8, 2021 · 0 comments
Open

Support vcpkg dependencies #135

BullyWiiPlaza opened this issue Nov 8, 2021 · 0 comments

Comments

@BullyWiiPlaza
Copy link

I'm working on a Windows C++ solution for Visual Studio and I'm also using Microsoft's package manager vcpkg for installing dependencies. This works brilliantly. Now I also want to compile and debug my code for Linux using e.g. CLion IDE since CLion supports debugging using WSL, so I need to convert the Visual Studio solution to a CMake project. Overall the conversion seems fine besides the fact that CMake requires that I manually specify all dependent libraries from vcpkg unlike in a Visual Studio solution, for example:

find_package(nlohmann_json CONFIG REQUIRED)
# ...
target_link_libraries(Hello-World PRIVATE nlohmann_json nlohmann_json::nlohmann_json)

Visual Studio solutions provide automatic header resolution and linking of vcpkg packages without explicitly specifying where to look.

Unfortunately, the converter is not able to pick this up automatically to configure CMake with vcpkg dependencies. In order to successfully compile, I probably need to add all dependencies manually to the CMakeLists.txt. Is there any way I can automate this process better and if not, how would be a good way to support it?

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