how to import installed packages into a CMake project #42670
-
most packages have the above prompt to import the CMakeLists.txt file after installation, while a small number of packages do not have this prompt after installation. So how to import such packages, for example: vcpkg install wepoll:x64-windows
find_package(wepoll REQUIRED)
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
not sure what you mean -- did you mean use the port in ❯ vcpkg integrate install
Applied user-wide integration for this vcpkg root.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE={your vcpkg's root path}/scripts/buildsystems/vcpkg.cmake"
All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available. more info see documentation. |
Beta Was this translation helpful? Give feedback.
-
CMake (config) packages should be provided by upstream maintainers, not by ports. For some packages, there are also Find modules provided by CMake. For some packages, vcpkg contributors add unofficial CMake config. This is useful when features and dependencies are complex. (libmupdf would be a good candidate.) For everything else, there is plain |
Beta Was this translation helpful? Give feedback.
I went into the same situation with libmupdf.
You can try to include the library with :
Beware that it does not handle dependencies.