summaryrefslogtreecommitdiff
path: root/third-party/sdl2/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'third-party/sdl2/CMakeLists.txt')
-rw-r--r--third-party/sdl2/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/third-party/sdl2/CMakeLists.txt b/third-party/sdl2/CMakeLists.txt
new file mode 100644
index 0000000..93022fd
--- /dev/null
+++ b/third-party/sdl2/CMakeLists.txt
@@ -0,0 +1,18 @@
+configure_file(CMakeLists.txt.in sdl2/CMakeLists.txt)
+execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
+ RESULT_VARIABLE result
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/sdl2 )
+if(result)
+ message(FATAL_ERROR "CMake step for sdl2 failed: ${result}")
+endif()
+
+execute_process(COMMAND ${CMAKE_COMMAND} --build .
+ RESULT_VARIABLE result
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/sdl2 )
+if(result)
+ message(FATAL_ERROR "Build step for sdl2 failed: ${result}")
+endif()
+
+add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/sdl2-src
+ ${CMAKE_CURRENT_BINARY_DIR}/sdl2-build)
+