pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / games / qzdl / non-bundled-inih.patch
blob7e47dd8c20172271dcf8881a9db37f8790ecf915
1 diff --git i/CMakeLists.txt w/CMakeLists.txt
2 index 10a8fb6..dcab540 100644
3 --- i/CMakeLists.txt
4 +++ w/CMakeLists.txt
5 @@ -6,16 +6,8 @@ set(CMAKE_AUTOMOC ON)
6 project(qzdl LANGUAGES C CXX)
7 find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
9 -include(FetchContent)
10 -FetchContent_Declare(
11 - inih
12 - GIT_REPOSITORY https://github.com/benhoyt/inih.git
13 - GIT_TAG r44
15 -FetchContent_GetProperties(inih)
16 -if (NOT inih_POPULATED)
17 - FetchContent_Populate(inih)
18 -endif()
19 +find_package(PkgConfig)
20 +pkg_check_modules(INIH inih)
22 add_executable(
23 zdl
24 @@ -45,9 +37,8 @@ add_executable(
25 libwad.cpp
26 qzdl.cpp
27 ${PROJECT_SOURCE_DIR}/zdlconf/zdlconf.cpp
28 - ${inih_SOURCE_DIR}/ini.c
31 -target_include_directories(zdl PRIVATE ${PROJECT_SOURCE_DIR}/zdlconf)
32 -target_include_directories(zdl PRIVATE ${inih_SOURCE_DIR})
33 -target_link_libraries(zdl Qt5::Core Qt5::Widgets)
34 +target_include_directories(zdl PRIVATE ${PROJECT_SOURCE_DIR}/zdlconf ${INIH_INCLUDEDIR})
35 +target_link_libraries(zdl Qt5::Core Qt5::Widgets ${INIH_LDFLAGS})
36 +install(TARGETS zdl RUNTIME DESTINATION "bin")