-
Notifications
You must be signed in to change notification settings - Fork 6.5k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
How do I use nested vcpkg manifests in submodules/sub-projects? #15279
Comments
Thanks for posting this issue. You might forget to add Could you please refer to the usage of
|
Please let me know if the above suggestion can work for you. |
@NancyLi1013
In my case, Frozen is a dep of the It is only when the I also noticed something else particular. The |
@mikepricedev, does this still be a question for you? From manifests.md, when invoked from any subdirectory of the directory containing vcpkg.json, vcpkg install with no package arguments will install all manifest dependencies into /vcpkg_installed/. |
I'm running into this problem too.. But I'm relying on visual studio 2019 cmake support to use vcpkg. It seems to be ignoring the sub directory/sub directory. Is there support for add_subdirectory and sub directories with their own vcpkg.json? (And just using the main project without opening separate visual studio 2019 instances with their own cmakelists.txt). |
@cyraid there is currently no support for having multiple top level manifests. We have considered some ways to solve this, but none of them very good. If you're interested in solving this issue, please open a discussion topic about it. Otherwise, writing a top-level vcpkg.json that contains all of the dependencies your subdirectories need, or alternatively using vcpkg to manage these dependencies as well, are the two solutions we see right now. |
Hi @strega-nil ! Thank you for the reply! Where would you guys like to discuss this? I mean, I don't have much time to talk about it but my quick input would be to add a ADD_TARGET_VCPKG in the sub directory inside that CMakeLists.txt. So, ADD_LIBRARY(MyPlugin), and then ADD_TARGET_VCPKG(MyPlugin). This way you could add the appropriate includes and properties etc. for that target. This would of course also call vcpkg in that directory too, but perhaps with the same cache directory and out from CMakeSettings.json? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
In the above folder structure the "sub_project" submodule uses vcpkg and a vcpkg.json manifest to manage its deps. The root project also uses vcpkg and a vcpkg.json manifest to manage deps.
However, when the project is configured the sub_project's CMakeLists.txt vcpkg wiring no longer finds packages installed in
sub_project/vcpkg_installed
dir.Steps taken:
vcpkg install
ran insub_project
dir.vcpkg_installed
dir was created as expected.find_package
in submodule cmake. (in my case using the frozen lib)'frozen/map.h' file not found #include <frozen/map.h>
not an issue in sub_project standalone.Note: using vcpkg as a submodule technique in both i.e.
The text was updated successfully, but these errors were encountered: