mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
Set git_version when .git folder is missing (#116)
If we download the FTXUI source archive from the GitHub website, then the `.git` folder will be missing. In such case, CMake configuration will fail: > git found > fatal: not a git repository (or any of the parent directories): .git > CMake Error at CMakeLists.txt:21 (project): > VERSION "0.6." format invalid.
This commit is contained in:
parent
2406e20f36
commit
3d5e4eb6ca
@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
find_package(Git QUIET)
|
||||
if (Git_FOUND)
|
||||
if (Git_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
|
||||
message("git found")
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD
|
||||
|
Loading…
Reference in New Issue
Block a user