diff --git a/CMakeLists.txt b/CMakeLists.txt index 9396130dcc..23d4ec0057 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,9 +48,9 @@ if(WITH_OGG) endif() endif() -find_program (HAVE_GIT git) +find_package(Git) -if(HAVE_GIT) +if(Git_FOUND) execute_process( COMMAND git --git-dir=.git describe --tags --exact-match WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}