summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-04-25 20:29:23 -0400
committerrealtradam <[email protected]>2023-04-25 20:29:23 -0400
commitf079cdd1d182d6a24bd705627a72fba638f4d8b1 (patch)
treef147980328c3430c3ccd3133a547107970b0a5ff /CMakeLists.txt
parentd65df2fc98436742860d98fac6a21a3a4036ec0c (diff)
downloadrodeo_sample_game-f079cdd1d182d6a24bd705627a72fba638f4d8b1.tar.gz
rodeo_sample_game-f079cdd1d182d6a24bd705627a72fba638f4d8b1.zip
fix git submodule pull in cmake + rodeo bump
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt34
1 files changed, 17 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 15c5f56..68fc172 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,23 @@ add_executable(${PROJECT_NAME}
"src/input.c"
)
-set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 11)
+set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 99)
+
+# pull all git submodules recursively
+find_package(Git QUIET)
+if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
+ # Update submodules as needed
+ option(GIT_SUBMODULE "Check submodules during build" ON)
+ if(GIT_SUBMODULE)
+ message(STATUS "Submodule update")
+ execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ RESULT_VARIABLE GIT_SUBMOD_RESULT)
+ if(NOT GIT_SUBMOD_RESULT EQUAL "0")
+ message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
+ endif()
+ endif()
+endif()
add_subdirectory(external/RodeoKit)
add_dependencies(${PROJECT_NAME} RodeoKit)
@@ -53,19 +69,3 @@ if (NOT DEFINED EMSCRIPTEN)
)
endif()
-# pull all git submodules recursively
-find_package(Git QUIET)
-if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
- # Update submodules as needed
- option(GIT_SUBMODULE "Check submodules during build" ON)
- if(GIT_SUBMODULE)
- message(STATUS "Submodule update")
- execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- RESULT_VARIABLE GIT_SUBMOD_RESULT)
- if(NOT GIT_SUBMOD_RESULT EQUAL "0")
- message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
- endif()
- endif()
-endif()
-