summaryrefslogtreecommitdiffstatsci
path: root/cmake/GitSubmoduleUpdate.cmake
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2022-01-06 18:24:02 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2022-01-06 18:24:02 +0100
commitca8010bf87a91fea71df17fe18cef3c8cb381087 (patch)
tree880a5873a0e2b39481c54e843839d6a08b0cda09 /cmake/GitSubmoduleUpdate.cmake
parent9f0b74c3fcaceeb42771be6b0956a74c8941f944 (diff)
vkvg-svg library integration
Diffstat (limited to 'cmake/GitSubmoduleUpdate.cmake')
-rw-r--r--cmake/GitSubmoduleUpdate.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/GitSubmoduleUpdate.cmake b/cmake/GitSubmoduleUpdate.cmake
new file mode 100644
index 0000000..5c061f7
--- /dev/null
+++ b/cmake/GitSubmoduleUpdate.cmake
@@ -0,0 +1,12 @@
+FUNCTION (updateGitSubmodule SUBMOD_NAME)
+ MESSAGE(STATUS "Git Submodule ${SUBMOD_NAME} update")
+ EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive ${SUBMOD_NAME}
+ 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 --recursive ${SUBMOD_NAME} failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
+ endif()
+ENDFUNCTION (updateGitSubmodule)
+
+
+FIND_PACKAGE(Git QUIET)