From e1372edcf3b728f7a9e23b50469490e38733f640 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 4 Oct 2017 15:24:44 +0200 Subject: [PATCH] Updated submodule handling --- CMakeLists.txt | 3 ++- cmake/Submodules.cmake | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c14166..5b4cffc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(GIT_SUBMODULE_DIR_sc-components .) ### set each submodules's commit or tag that is to be checked out ### (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(cmake/Submodules.cmake) diff --git a/cmake/Submodules.cmake b/cmake/Submodules.cmake index f2612b8..0d1b89d 100644 --- a/cmake/Submodules.cmake +++ b/cmake/Submodules.cmake @@ -24,7 +24,11 @@ foreach(GIT_SUBMODULE ${GIT_SUBMODULES}) if( "${GIT_SUBMODULE_VERSION_${GIT_SUBMODULE}}" STREQUAL "" ) message(STATUS "no specific version given for submodule ${GIT_SUBMODULE}, checking out master") - set(GIT_SUBMODULE_VERSION_${GIT_SUBMODULE} "master") + if( "${GIT_SUBMODULE_BRANCH_${GIT_SUBMODULE}}" STREQUAL "" ) + set(GIT_SUBMODULE_VERSION_${GIT_SUBMODULE} "master") + else() + set(GIT_SUBMODULE_VERSION_${GIT_SUBMODULE} ${GIT_SUBMODULE_BRANCH_${GIT_SUBMODULE}}) + endif() endif() if( "${GIT_SUBMODULE_DIR_${GIT_SUBMODULE}}" STREQUAL "" )