Fill in SCM metadata if present

Properly set library metadata
pull/1/head
Timothy Pearson 11 years ago
parent 836cbcaead
commit 5e4b437180

@ -86,6 +86,14 @@ if( NOT TDE_FOUND )
set( KDE3_DCOPIDLNG_EXECUTABLE env KDECONFIG=${KDECONFIG_EXECUTABLE} ${KDE3_DCOPIDLNG_EXECUTABLE}
CACHE INTERNAL "dcopidlng executable" FORCE )
# look for SCM data if present
if( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
file( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmmodule" TDE_SCM_MODULE_NAME )
endif( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
if( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
file( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmrevision" TDE_SCM_MODULE_REVISION )
endif( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
message( STATUS " found 'TDE', version ${TDE_VERSION}" )
endif( NOT TDE_FOUND )

@ -537,6 +537,21 @@ macro( tde_add_library _arg_target )
set( _shouldnotlink no )
# metadata
unset( _description )
unset( _license )
unset( _copyright )
unset( _authors )
unset( _product )
unset( _organization )
unset( _version )
unset( _datetime )
unset( _notes )
# default metadata
set( _product "Trinity Desktop Environment" )
tde_curdatetime( _datetime )
foreach( _arg ${ARGV} )
# this variable help us to skip
@ -617,6 +632,44 @@ macro( tde_add_library _arg_target )
unset( ${_storage} )
endif( "${_arg}" STREQUAL "DESTINATION" )
# metadata
if( "${_arg}" STREQUAL "DESCRIPTION" )
set( _skip_store 1 )
set( _storage "_description" )
endif( )
if( "${_arg}" STREQUAL "LICENSE" )
set( _skip_store 1 )
set( _storage "_license" )
endif( )
if( "${_arg}" STREQUAL "COPYRIGHT" )
set( _skip_store 1 )
set( _storage "_copyright" )
endif( )
if( "${_arg}" STREQUAL "AUTHORS" )
set( _skip_store 1 )
set( _storage "_authors" )
endif( )
if( "${_arg}" STREQUAL "PRODUCT" )
set( _skip_store 1 )
set( _storage "_product" )
endif( )
if( "${_arg}" STREQUAL "ORGANIZATION" )
set( _skip_store 1 )
set( _storage "_organization" )
endif( )
if( "${_arg}" STREQUAL "VERSION" )
set( _skip_store 1 )
set( _storage "_version" )
endif( )
if( "${_arg}" STREQUAL "DATETIME" )
set( _skip_store 1 )
set( _storage "_datetime" )
endif( )
if( "${_arg}" STREQUAL "NOTES" )
set( _skip_store 1 )
set( _storage "_notes" )
endif( )
# storing value
if( _storage AND NOT _skip_store )
list( APPEND ${_storage} ${_arg} )
@ -817,6 +870,7 @@ macro( tde_add_executable _arg_target )
# default metadata
set( _product "Trinity Desktop Environment" )
set( _version "${TDE_VERSION}" )
tde_curdatetime( _datetime )
foreach( _arg ${ARGV} )

Loading…
Cancel
Save