File 0001-quazip-pkgconfig.patch of Package qmapshack
From 79745dd73b63babc457bfdb7f43d5eaada349b3c Mon Sep 17 00:00:00 2001
From: Frank Kunz <mailinglists@kunz-im-inter.net>
Date: Sat, 14 Nov 2020 21:48:44 +0100
Subject: [PATCH] quazip pkgconfig
Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>
---
CMakeLists.txt | 5 ++++-
src/qmapshack/CMakeLists.txt | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7976a8af..4bb2c016 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -175,7 +175,10 @@ if (NOT PROJ4_FOUND)
endif()
find_package(JPEG REQUIRED)
find_package(ROUTINO REQUIRED)
-find_package(QuaZip5 REQUIRED)
+find_package(QuaZip5)
+if (NOT QuaZip5_FOUND)
+ pkg_search_module(QUAZIP REQUIRED quazip1-qt5)
+endif()
find_package(ALGLIB ) # optional as we can use our local version
diff --git a/src/qmapshack/CMakeLists.txt b/src/qmapshack/CMakeLists.txt
index dea22446..00dffeb4 100644
--- a/src/qmapshack/CMakeLists.txt
+++ b/src/qmapshack/CMakeLists.txt
@@ -946,7 +946,7 @@ target_link_libraries(${APPLICATION_NAME}
${PROJ4_LDFLAGS} ${PROJ4_LIBRARIES}
${ROUTINO_LIBRARIES}
${ALGLIB_LIBRARIES}
- ${QUAZIP_LIBRARIES}
+ ${QUAZIP_LDFLAGS} ${QUAZIP_LIBRARIES}
)
if(APPLE)
--
2.29.2