Skip to content

Commit

Permalink
use pkg_search_module to find minizip-ng or minizip
Browse files Browse the repository at this point in the history
OpenBSD calls minizip-ng's .pc file minizip.pc
Others call   minizip-ng's .pc file minizip-ng.pc
  • Loading branch information
guijan committed May 7, 2024
1 parent ba46257 commit cd25e91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMake/DolphinLibraryTools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function(dolphin_find_optional_system_library_pkgconfig library search alias bun
dolphin_optional_system_library(${library})
string(TOUPPER ${library} upperlib)
if(RESOLVED_USE_SYSTEM_${upperlib})
pkg_check_modules(${library} ${search} ${ARGN} IMPORTED_TARGET)
pkg_search_module(${library} ${search} ${ARGN} IMPORTED_TARGET)
if((NOT ${library}_FOUND) AND (NOT ${RESOLVED_USE_SYSTEM_${upperlib}} STREQUAL "AUTO"))
message(FATAL_ERROR "No system ${library} was found. Please install it or set USE_SYSTEM_${upperlib} to AUTO or OFF.")
endif()
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,9 @@ dolphin_find_optional_system_library_pkgconfig(ZSTD libzstd>=1.4.0 zstd::zstd Ex

dolphin_find_optional_system_library_pkgconfig(ZLIB zlib-ng ZLIB::ZLIB Externals/zlib-ng)

# TODO: Some distributions might call this package "minizip" without the "-ng" suffix.
dolphin_find_optional_system_library_pkgconfig(MINIZIP minizip-ng>=4.0.4 minizip::minizip Externals/minizip-ng)
dolphin_find_optional_system_library_pkgconfig(MINIZIP
"minizip-ng>=4.0.4;minizip>=4.0.4" minizip::minizip Externals/minizip-ng
)

dolphin_find_optional_system_library(LZO Externals/LZO)

Expand Down

0 comments on commit cd25e91

Please sign in to comment.