diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-04 12:42:08 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-04 12:42:08 +0300 |
| commit | 5b57cf6be61c1a97996427e9059c2c1e43e21775 (patch) | |
| tree | a8158631a91185f8cec8aafad67abce4c2baf091 | |
| parent | 4f2d36194b4f299aa7509d815c07121039ea833b (diff) | |
| download | Project-Tick-5b57cf6be61c1a97996427e9059c2c1e43e21775.tar.gz Project-Tick-5b57cf6be61c1a97996427e9059c2c1e43e21775.zip | |
NOISSUE fix meshmc finding git dir
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
| -rw-r--r-- | meshmc/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | meshmc/cmake/GetGitRevisionDescription.cmake | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/meshmc/CMakeLists.txt b/meshmc/CMakeLists.txt index 691706ed71..0b188b6a25 100644 --- a/meshmc/CMakeLists.txt +++ b/meshmc/CMakeLists.txt @@ -258,7 +258,7 @@ set(MeshMC_SUBREDDIT_URL "" CACHE STRING "URL for the subreddit.") #### Check the current Git commit and branch include(GetGitRevisionDescription) -get_git_head_revision(MeshMC_GIT_REFSPEC MeshMC_GIT_COMMIT) +get_git_head_revision(MeshMC_GIT_REFSPEC MeshMC_GIT_COMMIT ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR) git_get_exact_tag(MeshMC_GIT_TAG) message(STATUS "Git commit: ${MeshMC_GIT_COMMIT}") diff --git a/meshmc/cmake/GetGitRevisionDescription.cmake b/meshmc/cmake/GetGitRevisionDescription.cmake index 4fbd90db79..219e7a5b00 100644 --- a/meshmc/cmake/GetGitRevisionDescription.cmake +++ b/meshmc/cmake/GetGitRevisionDescription.cmake @@ -64,7 +64,7 @@ get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) # function(_git_find_closest_git_dir _start_dir _git_dir_var) set(cur_dir "${_start_dir}") - set(git_dir "${_start_dir}/.git") + set(git_dir "${_start_dir}/../.git") while(NOT EXISTS "${git_dir}") # .git dir not found, search parent directories set(git_previous_parent "${cur_dir}") @@ -76,7 +76,7 @@ function(_git_find_closest_git_dir _start_dir _git_dir_var) PARENT_SCOPE) return() endif() - set(git_dir "${cur_dir}/.git") + set(git_dir "${cur_dir}/../.git") endwhile() set(${_git_dir_var} "${git_dir}" @@ -84,7 +84,7 @@ function(_git_find_closest_git_dir _start_dir _git_dir_var) endfunction() function(get_git_head_revision _refspecvar _hashvar) - _git_find_closest_git_dir("${CMAKE_CURRENT_SOURCE_DIR}" GIT_DIR) + _git_find_closest_git_dir("${CMAKE_CURRENT_SOURCE_DIR}/../" GIT_DIR) if("${ARGN}" STREQUAL "ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR") set(ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR TRUE) @@ -176,7 +176,7 @@ function(git_describe _var) if(NOT GIT_FOUND) find_package(Git QUIET) endif() - get_git_head_revision(refspec hash) + get_git_head_revision(refspec hash ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR) if(NOT GIT_FOUND) set(${_var} "GIT-NOTFOUND" @@ -252,7 +252,7 @@ function(git_local_changes _var) if(NOT GIT_FOUND) find_package(Git QUIET) endif() - get_git_head_revision(refspec hash) + get_git_head_revision(refspec hash ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR) if(NOT GIT_FOUND) set(${_var} "GIT-NOTFOUND" |
