FTXUI/cmake/ftxui_git_version.cmake
Arthur Sonzogni a2e7ff852e
Cleanup. (#132)
- Split the large CMakeList.
- Remove travis
- Remove gitlab-ci.yml
2021-06-26 15:14:27 +02:00

14 lines
339 B
CMake

find_package(Git QUIET)
if (Git_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
message("git found")
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE git_version
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
set(git_version 0)
endif()