From 22ad63f7157eac08734e4e4fe780f33dad05dd5f Mon Sep 17 00:00:00 2001 From: Daniel Engberg Date: Sun, 2 Mar 2025 07:23:04 +0100 Subject: [PATCH] [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. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}