File 0001-Unbundle-libinih.patch of Package qzdl
From 6ddf0c4b1a0e60650b9f2407866c1b58c532329e Mon Sep 17 00:00:00 2001
From: Martin Hauke <mardnh@gmx.de>
Date: Thu, 18 Nov 2021 00:26:23 +0100
Subject: [PATCH] Unbundle libinih
---
CMakeLists.txt | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 10a8fb6..13f404c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,17 +5,8 @@ set(CMAKE_AUTOMOC ON)
project(qzdl LANGUAGES C CXX)
find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
-
-include(FetchContent)
-FetchContent_Declare(
- inih
- GIT_REPOSITORY https://github.com/benhoyt/inih.git
- GIT_TAG r44
-)
-FetchContent_GetProperties(inih)
-if (NOT inih_POPULATED)
- FetchContent_Populate(inih)
-endif()
+find_package(PkgConfig)
+pkg_check_modules(INIH REQUIRED inih)
add_executable(
zdl
@@ -45,9 +36,9 @@ add_executable(
libwad.cpp
qzdl.cpp
${PROJECT_SOURCE_DIR}/zdlconf/zdlconf.cpp
- ${inih_SOURCE_DIR}/ini.c
)
+
+target_include_directories(zdl PUBLIC ${INIH_INCLUDE_DIRS})
target_include_directories(zdl PRIVATE ${PROJECT_SOURCE_DIR}/zdlconf)
-target_include_directories(zdl PRIVATE ${inih_SOURCE_DIR})
-target_link_libraries(zdl Qt5::Core Qt5::Widgets)
+target_link_libraries(zdl Qt5::Core Qt5::Widgets ${INIH_LIBRARIES})
--
2.33.1