I have written a little example project to show how to integrate vcpkg with various CMake features, including cmake
, ctest
, and cpack
: GitHub - SamuelMarks/cmake-example-with-vcpkg: CMake example project with vcpkg dependencies
Unfortunately I’ve come against an issue with the CPack generated installer. It doesn’t include the DLLs from vcpkg. In this circumstance, it’s zlibd1.dll
that is not being installed.
How do I get the DLLs depended on by my target—and include them in the installer—in the same directory as the executable?
Related: https://stackoverflow.com/q/10671916 https://gitlab.kitware.com/cmake/cmake/-/issues/18822 https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6186