diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-12-01 17:50:02 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-12-01 20:11:39 +0100 |
commit | b6dfb5e295f736f17befb215fd6db3d269adb2fe (patch) | |
tree | db11879e31f7477d7259c9f58ddb99616c7a0158 /cmake | |
parent | a60501e35bebd11f67f0308dabc90d0ffcc81c96 (diff) | |
download | qt5-b6dfb5e295f736f17befb215fd6db3d269adb2fe.tar.gz |
Support absorbed and unabsorbed submodules
Modern git usage for submodules is that the git object storage is absorbed
into the supermodule (see git submodule absorbgitdirs).
Handle both cases when trying to locate the gitdir for the target module.
Pick-to: 6.0
Change-Id: Icddbae3a4d9a8823551106f089dbbff2c935ff35
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtTopLevelHelpers.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/QtTopLevelHelpers.cmake b/cmake/QtTopLevelHelpers.cmake index 7de96cdb..abc72507 100644 --- a/cmake/QtTopLevelHelpers.cmake +++ b/cmake/QtTopLevelHelpers.cmake @@ -164,6 +164,10 @@ function(qt_internal_get_dependency dependent dependency) ) string(FIND "${git_stdout}" "${module}" index) string(SUBSTRING "${git_stdout}" 0 ${index} gitdir) + string(FIND "${gitdir}" ".git/modules" index) + if(index GREATER -1) # submodules have not been absorbed + string(SUBSTRING "${gitdir}" 0 ${index} gitdir) + endif() message(DEBUG "Will look for clones in ${gitdir}") execute_process( |