Skip to content
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

cmake find_package(libzip) support #2973

Closed
benstieg opened this issue Mar 6, 2018 · 8 comments · Fixed by #15589
Closed

cmake find_package(libzip) support #2973

benstieg opened this issue Mar 6, 2018 · 8 comments · Fixed by #15589
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@benstieg
Copy link

benstieg commented Mar 6, 2018

It would be nice if find_package(libzip REQUIRED) would work after vcpkg.exe install libzip.
Installing something like the attached files to the installed<your-triplet>\share\libzip when installing libzip should do it.

libzip-config.cmake.zip

@janisozaur
Copy link
Contributor

Please see relevant discussion here: nih-at/libzip#27

@janisozaur
Copy link
Contributor

@benstieg would you take a look at possibly fixing the linked issue upstream?

@ras0219-msft ras0219-msft added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Mar 7, 2018
@0-wiz-0
Copy link

0-wiz-0 commented Apr 6, 2018

You can use the CMake standard module FindPkgConfig to detect and use libzip:
https://cmake.org/cmake/help/v3.11/module/FindPkgConfig.html

@PhilLab
Copy link
Contributor

PhilLab commented May 24, 2019

@ras0219-msft Using the cmake files provided by benstieg does work. I know that upstream fixes are preferred but as I am not a cmake-wizard, I am not of a big help here. But would committing the above files as module patch in vcpkg be an acceptable solution?

@0-wiz-0
Copy link

0-wiz-0 commented May 26, 2020

I've added find_package() support to libzip itself in nih-at/libzip@dadba12
Pull requests with improvements welcome!

@endrift
Copy link
Contributor

endrift commented Aug 8, 2020

So now that libzip 1.7 is in vcpkg, vcpkg has decided to export the target as zip instead of libzip::zip. I don't know why but vcpkg likes to export a bunch of libraries with names that differ from what you'd import them as in any other environment (e.g. I have to search for FFMPEG (which isn't even the name of the library; it's FFmpeg) instead libavcodec, libavutil, etc.) and it's extremely annoying to have to add these workarounds. This one is particularly egregious because it goes against the convention of the CMake targets that libzip specifically exports.

My mistake; I didn't realize this was changed in 1.7.2. Still, the FFMPEG bit is annoying.

@JackBoosY
Copy link
Contributor

Now, libzip support to export cmake configuration files.

@JackBoosY
Copy link
Contributor

Same with pkgconfig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants