summaryrefslogtreecommitdiffhomepage
path: root/external
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 /external
parent9ee7bc711a5ec19802aafffc2b0d5312cb54f5e2 (diff)
external: allow using system sdl2
Diffstat (limited to 'external')
-rw-r--r--external/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
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)