From fb28eea2775703172d687c51e8ce1fd469bea22f Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Thu, 27 Apr 2023 23:55:49 +0200 Subject: [PATCH] make use of CONFIG and also put in TODO --- CMakeLists.txt | 2 +- extern/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1123c90ec..ff96dd8a6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -366,7 +366,7 @@ endif() # CXXOPTS option(OPENMW_USE_SYSTEM_CXXOPTS "Use system provided cxxopts library" ON) if(OPENMW_USE_SYSTEM_CXXOPTS) - find_package(cxxopts REQUIRED) + find_package(cxxopts CONFIG REQUIRED) endif() # Platform specific diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 4e354572f3..9a858b252b 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -202,6 +202,7 @@ if(NOT OPENMW_USE_SYSTEM_CXXOPTS) ### here is what makes all include directories -isystem get_target_property(CXXOPTS_IID cxxopts INTERFACE_INCLUDE_DIRECTORIES) set_target_properties(cxxopts PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${CXXOPTS_IID}") + ### TODO: use SYSTEM option to FetchContent_Declare once CMake 3.25 is available and remove the above workaround endif() if (NOT OPENMW_USE_SYSTEM_SQLITE3)