summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--external/CMakeLists.txt20
1 files changed, 12 insertions, 8 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index cd8eda39..2da396e0 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -209,12 +209,16 @@ endfunction()
if(FLOORMAT_SUBMODULE-DEPENDENCIES)
sets(PATH IMGUI_DIR "${CMAKE_CURRENT_SOURCE_DIR}/imgui")
+ set(system "")
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.25)
+ set(system "SYSTEM")
+ endif()
function(fm_add_sdl2)
if(FLOORMAT_SUBMODULE-SDL2)
unset(CMAKE_C_VISIBILITY_PRESET)
unset(CMAKE_VISIBILITY_INLINES_HIDDEN)
- add_subdirectory(sdl2)
+ add_subdirectory(sdl2 ${system})
endif()
endfunction()
@@ -227,7 +231,7 @@ if(FLOORMAT_SUBMODULE-DEPENDENCIES)
# HACK
add_compile_options(-fno-sanitize=all)
add_link_options(-fno-sanitize=all)
- add_subdirectory(luajit)
+ add_subdirectory(luajit ${system})
endif()
endfunction()
@@ -247,9 +251,9 @@ if(FLOORMAT_SUBMODULE-DEPENDENCIES)
else()
add_compile_options(-fno-rtti)
endif()
- add_subdirectory(fmt)
- add_subdirectory(json)
- add_subdirectory(corrade)
+ add_subdirectory(fmt ${system})
+ add_subdirectory(json ${system})
+ add_subdirectory(corrade ${system})
if(MSVC)
target_compile_options(CorradeTestSuiteObjects PUBLIC -GR)
target_compile_options(CorradeTestSuite PUBLIC -GR)
@@ -257,9 +261,9 @@ if(FLOORMAT_SUBMODULE-DEPENDENCIES)
target_compile_options(CorradeTestSuiteObjects PUBLIC -frtti)
target_compile_options(CorradeTestSuite PUBLIC -frtti)
endif()
- add_subdirectory(magnum)
- add_subdirectory(magnum-plugins)
- add_subdirectory(magnum-integration)
+ add_subdirectory(magnum ${system})
+ add_subdirectory(magnum-plugins ${system})
+ add_subdirectory(magnum-integration ${system})
endfunction()
if(MAGNUM_BUILD_PLUGINS_STATIC)