-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[zziplib] Can't link against zziplib #25186
Comments
zziplib does not export it's targets, you can't use Here's an example: |
Would it be worthwile to incorporate the Find script or an equivalent to vcpkg? Would the zziplib project require exporting its targets for this? Maybe I can contact the library author, but I would need more infos about how to incorporate this with vcpkg... Thanks! |
It's possible, but read this first: https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#add-cmake-exports-in-an-unofficial--namespace
That would be the best solution.
From vcpkg point of view, nothing else is needed except for maybe one call to |
I just opened an issue in the zziplib project. Maybe you can check if it's just the one line that is missing for libzzip to export its targets? Thank you! |
Describe the bug
I'm getting errors not finding zziplib port when using CMake project and vcpkg Manifest, but it works when using vcpkg Manifest mode using a Visual Studio 2019 project.
Environment
To Reproduce
Create a CMake based project using Visual Studio 2019 (but I guess 2022 will do also)
Add a CMakeProjects.json file if not already added, using a default "Windows x64" configuration
Add the toolchain in cacheVariables for using
vcpkg
:"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
Add a vcpkg.json file and add the "zziplib" port to the dependencies
Add a
find_package(zziplib CONFIG REQUIRED)
to theCMakeLists.txt
fileOptional steps: Add some code to the .cpp file:
When compiling the project, the following error appears:
When I set up a C++ Console project using Visual Studio 2019, use the "Use Vcpkg Manifest" flag set to Yes, the zziplib headers can be found and the console app can be linked successfully.
Expected behavior
Finding zziplib package succeeds, including and linking works.
Failure logs
(see above)
Additional context
I can provide a demo project on request, if needed. Reproducing should be fairly easy, though.
The text was updated successfully, but these errors were encountered: