diff options
author | sfan5 <sfan5@live.de> | 2021-08-23 13:33:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-23 13:33:25 +0200 |
commit | fad835cf6452c01fc254023cf2d6166baf1ba277 (patch) | |
tree | 9f46d3ebe2f5afee3c07fd4b61562e9c085bee2c | |
parent | 0c1e9603db32b4281974fdd8b8e3b505148be47e (diff) | |
download | minetest-fad835cf6452c01fc254023cf2d6166baf1ba277.tar.gz minetest-fad835cf6452c01fc254023cf2d6166baf1ba277.tar.bz2 minetest-fad835cf6452c01fc254023cf2d6166baf1ba277.zip |
Fix server-only builds on older CMake versions (#11566)
closes #11564
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cb5678c4..7b2663341 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,8 +71,8 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lib/irrlichtmt") endif() else() add_library(IrrlichtMt::IrrlichtMt INTERFACE IMPORTED) - target_include_directories(IrrlichtMt::IrrlichtMt INTERFACE - "${CMAKE_CURRENT_SOURCE_DIR}/lib/irrlichtmt/include") + set_target_properties(IrrlichtMt::IrrlichtMt PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/irrlichtmt/include") endif() else() find_package(IrrlichtMt QUIET) @@ -90,7 +90,9 @@ else() endif() message(STATUS "Found Irrlicht headers: ${IRRLICHT_INCLUDE_DIR}") add_library(IrrlichtMt::IrrlichtMt INTERFACE IMPORTED) - target_include_directories(IrrlichtMt::IrrlichtMt INTERFACE "${IRRLICHT_INCLUDE_DIR}") + # Note that we can't use target_include_directories() since that doesn't work for IMPORTED targets before CMake 3.11 + set_target_properties(IrrlichtMt::IrrlichtMt PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${IRRLICHT_INCLUDE_DIR}") else() message(STATUS "Found IrrlichtMt ${IrrlichtMt_VERSION}") endif() |