solvespace/cmake
herrgahr f1e47e6554 CMake: use git rev-parse to get GIT_COMMIT_HASH
The old approach of reading .git/HEAD does not work when using git
worktrees, where the folder layout looks roughly like:

solvespace.git/                      - bare clone (.git dir)
solvespace.git/work                  - example worktree containing master
solvespage.git/worktrees/work/       - .git dir of worktree
solvespage.git/worktrees/work/HEAD   - actual HEAD ref for master

First attempt was to just get GIT_ROOT from `git rev-parse --git-dir` but
that wasn't enough, since:

1. GIT_ROOT points to solvespage.git/worktrees/work/
2. GIT_ROOT/HEAD points to refs/heads/master
3. GIT_ROOT/refs/heads/master does not exist but the old implementation
   would want to use this to get the sha

so we need two invocations of git rev-parse

1. `git rev-parse --git-dir` to get GIT_DIR
    needed for setting GIT_DEPENDS
2. `git rev-parse HEAD` to get the sha of the worktree's HEAD
2022-01-11 09:56:55 -05:00
..
AddVendoredSubdirectory.cmake Add Cairo (and, transitively, Pixman) dependencies. 2016-08-01 00:48:37 +00:00
c_flag_overrides.cmake Add a CMake buildsystem. 2015-07-10 15:59:11 +03:00
cxx_flag_overrides.cmake Add a CMake buildsystem. 2015-07-10 15:59:11 +03:00
DisableWarnings.cmake CMake: correctly use if(STREQUAL). 2016-08-01 00:48:37 +00:00
FindSpaceWare.cmake Fix CMake warnings 2021-12-30 13:59:58 -05:00
FindVendoredPackage.cmake macOS: bundle and statically link external dependencies. 2018-07-12 11:15:31 +00:00
GetGitCommitHash.cmake CMake: use git rev-parse to get GIT_COMMIT_HASH 2022-01-11 09:56:55 -05:00
libpng-macos-arm64.patch Add apple arm64 support 2021-04-04 11:40:10 -04:00
MacOSXBundleInfo.plist.in CMake Fixes + Snap port to core20 (#1174) 2022-01-02 20:04:57 +01:00
Toolchain-mingw32.cmake CMake: refactor inclusion of external libraries. 2016-07-25 04:22:02 +00:00
Toolchain-mingw64.cmake CMake: refactor inclusion of external libraries. 2016-07-25 04:22:02 +00:00