[cmake] support building without SDL
@@ -178,6 +178,9 @@ target_link_libraries(ui.hdll
#####################
# sdl.hdll
+option(WITH_SDL2 "Build SDL2 support." ON)
+
+if (WITH_SDL2)
if (WIN32)
set(SDL2_PATH ${CMAKE_SOURCE_DIR}/include/sdl)
endif()
@@ -217,6 +220,14 @@ if (APPLE)
)
endif()
+
+ install(
+ TARGETS sdl.hdll
+ DESTINATION .
+ )
+
+endif()
+
#####################
# fmt.hdll
@@ -588,7 +599,6 @@ install(
libhl
fmt.hdll
ui.hdll
- sdl.hdll
sqlite.hdll
uv.hdll
DESTINATION .
