diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-03-27 03:37:51 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-03-27 03:37:51 -0500 |
commit | 5e4b4371800526bccacadd1bcc478410b59a7a69 (patch) | |
tree | 3f36c77f674a49ae9d5ac891f25d9787380f5eee /modules | |
parent | 836cbcaead88584a141c7c715128f5243661953a (diff) | |
download | tde-cmake-5e4b4371800526bccacadd1bcc478410b59a7a69.tar.gz tde-cmake-5e4b4371800526bccacadd1bcc478410b59a7a69.zip |
Fill in SCM metadata if present
Properly set library metadata
Diffstat (limited to 'modules')
-rw-r--r-- | modules/FindTDE.cmake | 8 | ||||
-rw-r--r-- | modules/TDEMacros.cmake | 54 |
2 files changed, 62 insertions, 0 deletions
diff --git a/modules/FindTDE.cmake b/modules/FindTDE.cmake index 0e3357c..342cd5c 100644 --- a/modules/FindTDE.cmake +++ b/modules/FindTDE.cmake @@ -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 ) diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index 500ebaa..662ec94 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -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} ) |