summaryrefslogtreecommitdiffstats
path: root/tdelfeditor/CMakeLists.txt
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-03-28 02:58:29 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-03-28 02:58:29 -0500
commitacab47877a4f64772fed12afb076dc43c6a7b336 (patch)
tree82a9884178936e5b1af2aa125396439255a50f94 /tdelfeditor/CMakeLists.txt
parentc98929e95404b341d033d4db795b5fa7017ab9be (diff)
downloadtdelibs-acab47877a4f64772fed12afb076dc43c6a7b336.tar.gz
tdelibs-acab47877a4f64772fed12afb076dc43c6a7b336.zip
Load SCM metadata into major libraries
Diffstat (limited to 'tdelfeditor/CMakeLists.txt')
-rw-r--r--tdelfeditor/CMakeLists.txt89
1 files changed, 89 insertions, 0 deletions
diff --git a/tdelfeditor/CMakeLists.txt b/tdelfeditor/CMakeLists.txt
index b5e21a3a1..ebc99ab62 100644
--- a/tdelfeditor/CMakeLists.txt
+++ b/tdelfeditor/CMakeLists.txt
@@ -31,3 +31,92 @@ tde_add_executable( tdelfeditor
DESTINATION ${BIN_INSTALL_DIR}
LINK ${TQT_LIBRARIES} ${LIBR_LIBRARIES} tdecore-shared
)
+
+
+##### embed scm data into important libraries ####
+
+# 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" )
+
+tde_curdatetime( _datetime )
+set( ELF_EMBEDDING_METADATA "\"\" \"\" \"\" \"\" \"\" \"Trinity Desktop Environment\" \"\" \"\" \"${_datetime}\" \"x-sharedlib\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"\"" )
+separate_arguments( ELF_EMBEDDING_METADATA )
+
+if( NOT "${TDE_SCM_MODULE_NAME}" STREQUAL "" )
+ if( NOT "${TDE_SCM_MODULE_REVISION}" STREQUAL "" )
+ add_custom_target(
+ # embed name and metadata
+ update_libDCOP_metadata ALL
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/dcop/libDCOP.so ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/dcop/libDCOP.so || true
+ DEPENDS tdelfeditor
+ DEPENDS DCOP-shared
+ COMMENT "Storing SCM metadata in dcop/libDCOP.so"
+ )
+
+ add_custom_target(
+ # embed name and metadata
+ update_libtdecore_metadata ALL
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdecore/libtdecore.so ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdecore/libtdecore.so || true
+ DEPENDS tdelfeditor
+ DEPENDS tdecore-shared
+ COMMENT "Storing SCM metadata in tdecore/libtdecore.so"
+ )
+
+ add_custom_target(
+ # embed name and metadata
+ update_libtdeio_metadata ALL
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeio/libtdeio.so ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeio/libtdeio.so || true
+ DEPENDS tdelfeditor
+ DEPENDS tdeio-shared
+ COMMENT "Storing SCM metadata in tdeui/libtdeio.so"
+ )
+
+ add_custom_target(
+ # embed name and metadata
+ update_libtdeui_metadata ALL
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeui/libtdeui.so ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeui/libtdeui.so || true
+ DEPENDS tdelfeditor
+ DEPENDS tdeui-shared
+ COMMENT "Storing SCM metadata in tdeui/libtdeui.so"
+ )
+
+ add_custom_target(
+ # embed name and metadata
+ update_libtdeutils_metadata ALL
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeutils/libtdeutils.so ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeutils/libtdeutils.so || true
+ DEPENDS tdelfeditor
+ DEPENDS tdeutils-shared
+ COMMENT "Storing SCM metadata in tdeutils/libtdeutils.so"
+ )
+
+ add_custom_target(
+ # embed name and metadata
+ update_libtdeprint_metadata ALL
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeprint/libtdeprint.so ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeprint/libtdeprint.so || true
+ DEPENDS tdelfeditor
+ DEPENDS tdeprint-shared
+ COMMENT "Storing SCM metadata in tdeprint/libtdeprint.so"
+ )
+
+ add_custom_target(
+ # embed name and metadata
+ update_libtdehtml_metadata ALL
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdehtml/libtdehtml.so ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdehtml/libtdehtml.so || true
+ DEPENDS tdelfeditor
+ DEPENDS tdehtml-shared
+ COMMENT "Storing SCM metadata in tdehtml/libtdehtml.so"
+ )
+ endif( NOT "${TDE_SCM_MODULE_REVISION}" STREQUAL "" )
+endif( NOT "${TDE_SCM_MODULE_NAME}" STREQUAL "" ) \ No newline at end of file