summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-13 21:08:34 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-13 22:23:24 +0100
commit26c5f188f8bbbb27c25ba453f6aae4decf0370c9 (patch)
tree629b083a48797f0c7d15b07165bbea1160c38002
parent9ee7bc711a5ec19802aafffc2b0d5312cb54f5e2 (diff)
external: allow using system sdl2
-rw-r--r--CMakeLists.txt4
-rw-r--r--external/CMakeLists.txt9
2 files changed, 8 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff626d1c..3091d47b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -163,14 +163,14 @@ fm_run_hook(fm-userconfig-src)
include_directories(.)
include_directories(src)
-get_property(_fm-sdl2-include-dirs TARGET SDL2::SDL2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
+#get_property(_fm-sdl2-include-dirs TARGET SDL2::SDL2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(_fm-json-include-dirs TARGET nlohmann_json::nlohmann_json PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM
"${CORRADE_INCLUDE_DIR}"
"${MAGNUM_INCLUDE_DIR}"
"${MAGNUMPLUGINS_INCLUDE_DIR}"
"${MAGNUMINTEGRATION_INCLUDE_DIR}"
- "${_fm-sdl2-include-dirs}"
+ #"${_fm-sdl2-include-dirs}"
"${_fm-json-include-dirs}"
)
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index f362aa9d..80c8de81 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -2,6 +2,7 @@ project(floormat-external)
set(FLOORMAT_SUBMODULE-DEPENDENCIES ON CACHE BOOL
"Use dependencies included in the source directory (needs git submodule update --init).")
+set(FLOORMAT_SUBMODULE-SDL2 ON CACHE BOOL "SDL2 as submodule")
foreach(_module corrade magnum magnum-integration magnum-plugins)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${_module}/modules")
@@ -210,9 +211,11 @@ if(FLOORMAT_SUBMODULE-DEPENDENCIES)
sets(PATH IMGUI_DIR "${CMAKE_CURRENT_SOURCE_DIR}/imgui")
function(fm_add_sdl2)
- unset(CMAKE_C_VISIBILITY_PRESET)
- unset(CMAKE_VISIBILITY_INLINES_HIDDEN)
- add_subdirectory(sdl2)
+ if(FLOORMAT_SUBMODULE-SDL2)
+ unset(CMAKE_C_VISIBILITY_PRESET)
+ unset(CMAKE_VISIBILITY_INLINES_HIDDEN)
+ add_subdirectory(sdl2)
+ endif()
endfunction()
function(fm_add_luajit)