From a37ca7aa75c1a3155aa733bf1e75d38b0c6863e9 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 25 Jun 2024 14:42:52 +0200 Subject: [PATCH] cmake: look for iniparser using config file first, then try our custom module file Our custom module file is still useful. My linux distro does not package the cmake files. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83326a05..9c35dede 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,10 @@ else() # to add search paths. find_package(SDL3 CONFIG REQUIRED) - find_package(iniparser REQUIRED COMPONENTS static) + find_package(iniparser CONFIG COMPONENTS static) + if(NOT TARGET iniparser-static) + find_package(iniparser REQUIRED MODULE COMPONENTS static) + endif() endif() include(CheckCXXSourceCompiles)