Updated submodule handling

This commit is contained in:
Eyck Jentzsch 2017-10-04 15:24:44 +02:00
parent d36937e25f
commit e1372edcf3
2 changed files with 7 additions and 2 deletions

View File

@ -5,7 +5,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(GIT_SUBMODULE_DIR_sc-components .) set(GIT_SUBMODULE_DIR_sc-components .)
### set each submodules's commit or tag that is to be checked out ### set each submodules's commit or tag that is to be checked out
### (leave empty if you want master) ### (leave empty if you want master)
#set(GIT_SUBMODULE_VERSION_sc-comp 3af6b9836589b082c19d9131c5d0b7afa8ddd7cd) #set(GIT_SUBMODULE_VERSION_sc-components 3af6b9836589b082c19d9131c5d0b7afa8ddd7cd)
set(GIT_SUBMODULE_BRANCH_sc-components "develop")
include(GNUInstallDirs) include(GNUInstallDirs)
include(cmake/Submodules.cmake) include(cmake/Submodules.cmake)

View File

@ -24,7 +24,11 @@ foreach(GIT_SUBMODULE ${GIT_SUBMODULES})
if( "${GIT_SUBMODULE_VERSION_${GIT_SUBMODULE}}" STREQUAL "" ) if( "${GIT_SUBMODULE_VERSION_${GIT_SUBMODULE}}" STREQUAL "" )
message(STATUS "no specific version given for submodule ${GIT_SUBMODULE}, checking out master") message(STATUS "no specific version given for submodule ${GIT_SUBMODULE}, checking out master")
if( "${GIT_SUBMODULE_BRANCH_${GIT_SUBMODULE}}" STREQUAL "" )
set(GIT_SUBMODULE_VERSION_${GIT_SUBMODULE} "master") set(GIT_SUBMODULE_VERSION_${GIT_SUBMODULE} "master")
else()
set(GIT_SUBMODULE_VERSION_${GIT_SUBMODULE} ${GIT_SUBMODULE_BRANCH_${GIT_SUBMODULE}})
endif()
endif() endif()
if( "${GIT_SUBMODULE_DIR_${GIT_SUBMODULE}}" STREQUAL "" ) if( "${GIT_SUBMODULE_DIR_${GIT_SUBMODULE}}" STREQUAL "" )