Skip to content

Commit cea6c85

Browse files
committed
Sync libzip imported target name
Upstream libzip config file uses name libzip::zip, so this can be synced.
1 parent 7be8f42 commit cea6c85

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

cmake/cmake/modules/Findlibzip.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ zip tools installed on the system.
1515
1616
This module defines the following imported targets:
1717
18-
* `libzip::libzip` - The package library, if found.
18+
* `libzip::zip` - The package library, if found.
1919
2020
## Result variables
2121
@@ -39,7 +39,7 @@ Basic usage:
3939
```cmake
4040
# CMakeLists.txt
4141
find_package(libzip)
42-
target_link_libraries(example PRIVATE libzip::libzip)
42+
target_link_libraries(example PRIVATE libzip::zip)
4343
```
4444
#]=============================================================================]
4545

@@ -161,11 +161,11 @@ endif()
161161
set(libzip_INCLUDE_DIRS ${libzip_INCLUDE_DIR})
162162
set(libzip_LIBRARIES ${libzip_LIBRARY})
163163

164-
if(NOT TARGET libzip::libzip)
165-
add_library(libzip::libzip UNKNOWN IMPORTED)
164+
if(NOT TARGET libzip::zip)
165+
add_library(libzip::zip UNKNOWN IMPORTED)
166166

167167
set_target_properties(
168-
libzip::libzip
168+
libzip::zip
169169
PROPERTIES
170170
IMPORTED_LOCATION "${libzip_LIBRARY}"
171171
INTERFACE_INCLUDE_DIRECTORIES "${libzip_INCLUDE_DIRS}"

cmake/ext/zip/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if(libzip_VERSION VERSION_EQUAL 1.3.1 OR libzip_VERSION VERSION_EQUAL 1.7.0)
9191
)
9292
endif()
9393

94-
target_link_libraries(php_ext_zip PRIVATE libzip::libzip)
94+
target_link_libraries(php_ext_zip PRIVATE libzip::zip)
9595

9696
# Note: ZIP_STATIC needs to be defined when using static libzip on Windows only
9797
# since version 1.0 to 1.3.2
@@ -110,9 +110,9 @@ endif()
110110
# TODO: When downloading and building libzip from source additional deps are
111111
# required.
112112

113-
if(TARGET libzip::libzip)
113+
if(TARGET libzip::zip)
114114
cmake_push_check_state(RESET)
115-
set(CMAKE_REQUIRED_LIBRARIES libzip::libzip)
115+
set(CMAKE_REQUIRED_LIBRARIES libzip::zip)
116116

117117
check_symbol_exists(zip_file_set_mtime zip.h HAVE_SET_MTIME)
118118

0 commit comments

Comments
 (0)