Skip to content

Commit 22ad63f

Browse files
authored
[CMake] Use CMake's find_package module to detect git
Instead of enforcing execution of git if available use CMake's find_package module to make it optional.
1 parent 4c57829 commit 22ad63f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ if(WITH_OGG)
4848
endif()
4949
endif()
5050

51-
find_program (HAVE_GIT git)
51+
find_package(Git)
5252

53-
if(HAVE_GIT)
53+
if(Git_FOUND)
5454
execute_process(
5555
COMMAND git --git-dir=.git describe --tags --exact-match
5656
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

0 commit comments

Comments
 (0)