summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilherme Janczak <guilherme.janczak@yandex.com>2024-05-07 04:00:56 +0000
committerGuilherme Janczak <guilherme.janczak@yandex.com>2024-05-07 04:25:04 +0000
commitcd25e91ca28e94d8e7c48c45710a4bd795ec1fa0 (patch)
treeb909973fa6f374a15db2aa80b738c90dff1da237
parentba462578ace731981a22c783308bd6818efaac42 (diff)
use pkg_search_module to find minizip-ng or minizip
OpenBSD calls minizip-ng's .pc file minizip.pc Others call minizip-ng's .pc file minizip-ng.pc
-rw-r--r--CMake/DolphinLibraryTools.cmake2
-rw-r--r--CMakeLists.txt5
2 files changed, 4 insertions, 3 deletions
diff --git a/CMake/DolphinLibraryTools.cmake b/CMake/DolphinLibraryTools.cmake
index 37f439de54..f7f0bce46e 100644
--- a/CMake/DolphinLibraryTools.cmake
+++ b/CMake/DolphinLibraryTools.cmake
@@ -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()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dff598d34e..052588cdb1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)