Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #3078 from dennisameling/gitconfig-cmake-windows
cmake: set correct path to gitconfig on Windows
  • Loading branch information
dscho committed Mar 5, 2021
2 parents 92b3d7c + 5fcfa13 commit 4321276
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions contrib/buildsystems/CMakeLists.txt
Expand Up @@ -204,8 +204,6 @@ list(APPEND compat_SOURCES sha1dc_git.c sha1dc/sha1.c sha1dc/ubc_check.c block-s


add_compile_definitions(PAGER_ENV="LESS=FRX LV=-c"
ETC_GITATTRIBUTES="etc/gitattributes"
ETC_GITCONFIG="etc/gitconfig"
GIT_EXEC_PATH="libexec/git-core"
GIT_LOCALE_PATH="share/locale"
GIT_MAN_PATH="share/man"
Expand All @@ -220,10 +218,15 @@ add_compile_definitions(PAGER_ENV="LESS=FRX LV=-c"

if(WIN32)
set(FALLBACK_RUNTIME_PREFIX /mingw64)
add_compile_definitions(FALLBACK_RUNTIME_PREFIX="${FALLBACK_RUNTIME_PREFIX}")
# Move system config into top-level /etc/
add_compile_definitions(FALLBACK_RUNTIME_PREFIX="${FALLBACK_RUNTIME_PREFIX}"
ETC_GITATTRIBUTES="../etc/gitattributes"
ETC_GITCONFIG="../etc/gitconfig")
else()
set(FALLBACK_RUNTIME_PREFIX /home/$ENV{USER})
add_compile_definitions(FALLBACK_RUNTIME_PREFIX="${FALLBACK_RUNTIME_PREFIX}")
add_compile_definitions(FALLBACK_RUNTIME_PREFIX="${FALLBACK_RUNTIME_PREFIX}"
ETC_GITATTRIBUTES="etc/gitattributes"
ETC_GITCONFIG="etc/gitconfig")
endif()


Expand Down

0 comments on commit 4321276

Please sign in to comment.