Replies: 1 comment 2 replies
-
You need to look for the interface of the imported targets you link to. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a project using CMake and Vcpkg, this project includes other subdirectories with their own set of CMake files and dependencies. As for Vcpkg I'm working on manifest mode, and including the vcpkg cmake toolchain before setting the project. For the subdirectories cmake files, I pointed the
VCPKG_MANIFEST_DIR
andCMAKE_TOOLCHAIN_FILE
relative to their paths, meaning they have to point upwards to the root project path, where they are located.I've found that doing it this way makes all of the project child subdirectories CMake projects include the vcpkg include directory by default (ie "build/vcpkg_installed/arm64-linux/include"). That has two consequences, I don't need to explicitly call "target_include_directories" and all includes from all dependencies are available to all targets, both things that I don't want to happen.
Interestingly enough from the documentation of Vcpkg I see
vcpkg does not automatically add any include or links paths into your project.
.Is my setup wrong or is this a limitation of Vcpkg?
Beta Was this translation helpful? Give feedback.
All reactions