11#[=============================================================================[
22# PHP/Package/libzip
33
4- Finds and downloads ` libzip` library:
4+ Finds or downloads libzip library:
55
66```cmake
77include(PHP/Package/libzip
88```
99
10- This module first tries to find the `libzip` library on the system. If not
11- successful it tries to download it from the upstream source and builds it
12- together with the PHP build.
10+ This module first tries to find the libzip library on the system. If not found
11+ it downloads it from the upstream source and builds it together with the build.
1312
1413## Examples
1514
1615Basic usage:
1716
1817```cmake
1918include(PHP/Package/libzip
20- target_link_libraries(php_ext_foo PRIVATE libzip::libzip )
19+ target_link_libraries(php_ext_foo PRIVATE libzip::zip )
2120```
2221#]=============================================================================]
2322
@@ -34,7 +33,7 @@ set(PHP_libzip_MIN_VERSION 1.7.1)
3433set (PHP_libzip_DOWNLOAD_VERSION 1.11.4)
3534
3635macro (php_package_libzip_find)
37- if (TARGET libzip::libzip )
36+ if (TARGET libzip::zip )
3837 set (libzip_FOUND TRUE )
3938 get_property (libzip_DOWNLOADED GLOBAL PROPERTY _PHP_libzip_DOWNLOADED)
4039 get_property (libzip_VERSION GLOBAL PROPERTY _PHP_libzip_VERSION)
@@ -99,10 +98,10 @@ macro(_php_package_libzip_download)
9998 # Bypass missing directory error for the imported target below.
10099 file (MAKE_DIRECTORY ${INSTALL_DIR} /include )
101100
102- add_library (libzip::libzip STATIC IMPORTED GLOBAL )
103- add_dependencies (libzip::libzip libzip-install )
101+ add_library (libzip::zip STATIC IMPORTED GLOBAL )
102+ add_dependencies (libzip::zip libzip-install )
104103 set_target_properties (
105- libzip::libzip
104+ libzip::zip
106105 PROPERTIES
107106 INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR} /include
108107 IMPORTED_LOCATION ${INSTALL_DIR} /lib/libzip${CMAKE_STATIC_LIBRARY_SUFFIX}
0 commit comments