Don't look for git or try to use it to divine the commit or tag name. This will not work because we are not building in a git clone. The Portfile will replace the @GIT_DESCRIBE@ placeholder with the correct value. https://codeberg.org/tenacityteam/tenacity/issues/397 --- CMakeLists.txt.orig +++ CMakeLists.txt @@ -2,7 +2,6 @@ # generator expressions and the use of precompiled headers cmake_minimum_required( VERSION 3.16 ) -find_package(Git) if(WIN32 OR APPLE) option(VCPKG "Use vcpkg for dependencies" ON) @@ -289,9 +288,8 @@ endif() set( TENACITY_VERSION 1 ) set( TENACITY_RELEASE 3 ) set( TENACITY_REVISION 3 ) -set( GIT_DESCRIBE "unknown" ) -find_package( Git QUIET ) -if( GIT_FOUND ) +set( GIT_DESCRIBE "@GIT_DESCRIBE@" ) +if( FALSE ) execute_process( COMMAND ${GIT_EXECUTABLE} describe --abbrev=7 --tags --- src/CMakeLists.txt.orig +++ src/CMakeLists.txt @@ -23,7 +23,7 @@ if( DEFINED TENACITY_REV_LONG AND DEFINED AUDACITY_REV_TIME ) file( WRITE "${_PRVDIR}/RevisionIdent.h" "#define REV_LONG \"${TENACITY_REV_LONG}\"\n#define REV_TIME \"${TENACITY_REV_TIME}\"\n" ) -elseif( GIT_FOUND ) +elseif( FALSE ) add_custom_target( version COMMAND