mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Preset GIT info in case GIT isn't installed
This commit is contained in:
parent
6bb10d4c8f
commit
3d1abf3ddb
@ -119,6 +119,9 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||
endif()
|
||||
|
||||
# Try to get the current commit information
|
||||
set( GIT_COMMIT_SHORT "unknown" )
|
||||
set( GIT_COMMIT_LONG "unknown" )
|
||||
set( GIT_COMMIT_TIME "unknown" )
|
||||
find_package( Git QUIET )
|
||||
if( GIT_FOUND )
|
||||
execute_process(
|
||||
@ -131,18 +134,15 @@ if( GIT_FOUND )
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
if ( git_output )
|
||||
|
||||
if( git_output )
|
||||
list( GET git_output 0 GIT_COMMIT_SHORT )
|
||||
list( GET git_output 1 GIT_COMMIT_LONG )
|
||||
list( GET git_output 2 GIT_COMMIT_TIME )
|
||||
else()
|
||||
set( GIT_COMMIT_SHORT "unknown" )
|
||||
set( GIT_COMMIT_LONG "unknown" )
|
||||
set( GIT_COMMIT_TIME "unknown" )
|
||||
endif()
|
||||
message( STATUS " Current Commit: ${GIT_COMMIT_SHORT}" )
|
||||
message( STATUS )
|
||||
endif()
|
||||
message( STATUS " Current Commit: ${GIT_COMMIT_SHORT}" )
|
||||
message( STATUS )
|
||||
|
||||
# Define option() prefix
|
||||
set( _OPT "audacity_" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user