TDE core libraries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. #################################################
  2. #
  3. # (C) 2011-2014 Timothy Pearson
  4. # kb9vqf (AT) pearsoncomputing.net
  5. #
  6. # Improvements and feedback are welcome
  7. #
  8. # This file is released under GPL >= 2
  9. #
  10. #################################################
  11. include_directories(
  12. ${TQT_INCLUDE_DIRS}
  13. ${CMAKE_BINARY_DIR}
  14. ${CMAKE_BINARY_DIR}/tdecore
  15. ${CMAKE_SOURCE_DIR}/dcop
  16. ${CMAKE_SOURCE_DIR}/tdecore
  17. ${LIBR_INCLUDEDIR}
  18. )
  19. link_directories(
  20. ${TDECORE_LIBRARY_DIRS}
  21. ${LIBR_LIBDIR}
  22. )
  23. ##### tdelfeditor ################################
  24. tde_add_executable( tdelfeditor
  25. SOURCES tdelfeditor.cpp
  26. DESTINATION ${BIN_INSTALL_DIR}
  27. LINK ${TQT_LIBRARIES} ${LIBR_LIBRARIES} tdecore-shared
  28. )
  29. ##### embed scm data into important libraries ####
  30. # look for SCM data if present
  31. if( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
  32. file( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmmodule" TDE_SCM_MODULE_NAME )
  33. endif( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
  34. if( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
  35. file( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmrevision" TDE_SCM_MODULE_REVISION )
  36. endif( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
  37. tde_curdatetime( scm_embed_metadata_datetime )
  38. if( NOT "${TDE_SCM_MODULE_NAME}" STREQUAL "" )
  39. if( NOT "${TDE_SCM_MODULE_REVISION}" STREQUAL "" )
  40. get_target_property( scm_embed_metadata_version DCOP-shared VERSION )
  41. set( ELF_EMBEDDING_METADATA "\"DCOP-shared\" \"\" \"\" \"\" \"\" \"Trinity Desktop Environment\" \"\" \"${scm_embed_metadata_version}\" \"${scm_embed_metadata_datetime}\" \"x-sharedlib\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"\"" )
  42. separate_arguments( ELF_EMBEDDING_METADATA )
  43. add_custom_target(
  44. # embed name and metadata
  45. update_libDCOP_metadata ALL
  46. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/dcop/libDCOP.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
  47. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/dcop/libDCOP.so.${scm_embed_metadata_version} || true
  48. DEPENDS tdelfeditor
  49. DEPENDS DCOP-shared
  50. COMMENT "Storing SCM metadata in dcop/libDCOP.so"
  51. )
  52. get_target_property( scm_embed_metadata_version tdecore-shared VERSION )
  53. set( ELF_EMBEDDING_METADATA "\"tdecore-shared\" \"\" \"\" \"\" \"\" \"Trinity Desktop Environment\" \"\" \"${scm_embed_metadata_version}\" \"${scm_embed_metadata_datetime}\" \"x-sharedlib\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"\"" )
  54. separate_arguments( ELF_EMBEDDING_METADATA )
  55. add_custom_target(
  56. # embed name and metadata
  57. update_libtdecore_metadata ALL
  58. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdecore/libtdecore.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
  59. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdecore/libtdecore.so.${scm_embed_metadata_version} || true
  60. DEPENDS tdelfeditor
  61. DEPENDS tdecore-shared
  62. COMMENT "Storing SCM metadata in tdecore/libtdecore.so"
  63. )
  64. #get_target_property( scm_embed_metadata_version tdeio-shared VERSION )
  65. set( ELF_EMBEDDING_METADATA "\"tdeio-shared\" \"\" \"\" \"\" \"\" \"Trinity Desktop Environment\" \"\" \"${scm_embed_metadata_version}\" \"${scm_embed_metadata_datetime}\" \"x-sharedlib\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"\"" )
  66. separate_arguments( ELF_EMBEDDING_METADATA )
  67. add_custom_target(
  68. # embed name and metadata
  69. update_libtdeio_metadata ALL
  70. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeio/libtdeio.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
  71. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeio/libtdeio.so.${scm_embed_metadata_version} || true
  72. DEPENDS tdelfeditor
  73. DEPENDS tdeio-shared
  74. COMMENT "Storing SCM metadata in tdeui/libtdeio.so"
  75. )
  76. #get_target_property( scm_embed_metadata_version tdeui-shared VERSION )
  77. set( ELF_EMBEDDING_METADATA "\"tdeui-shared\" \"\" \"\" \"\" \"\" \"Trinity Desktop Environment\" \"\" \"${scm_embed_metadata_version}\" \"${scm_embed_metadata_datetime}\" \"x-sharedlib\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"\"" )
  78. separate_arguments( ELF_EMBEDDING_METADATA )
  79. add_custom_target(
  80. # embed name and metadata
  81. update_libtdeui_metadata ALL
  82. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeui/libtdeui.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
  83. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeui/libtdeui.so.${scm_embed_metadata_version} || true
  84. DEPENDS tdelfeditor
  85. DEPENDS tdeui-shared
  86. COMMENT "Storing SCM metadata in tdeui/libtdeui.so"
  87. )
  88. #get_target_property( scm_embed_metadata_version tdeutils-shared VERSION )
  89. set( ELF_EMBEDDING_METADATA "\"tdeutils-shared\" \"\" \"\" \"\" \"\" \"Trinity Desktop Environment\" \"\" \"${scm_embed_metadata_version}\" \"${scm_embed_metadata_datetime}\" \"x-sharedlib\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"\"" )
  90. separate_arguments( ELF_EMBEDDING_METADATA )
  91. add_custom_target(
  92. # embed name and metadata
  93. update_libtdeutils_metadata ALL
  94. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeutils/libtdeutils.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
  95. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeutils/libtdeutils.so.${scm_embed_metadata_version} || true
  96. DEPENDS tdelfeditor
  97. DEPENDS tdeutils-shared
  98. COMMENT "Storing SCM metadata in tdeutils/libtdeutils.so"
  99. )
  100. #get_target_property( scm_embed_metadata_version tdeprint-shared VERSION )
  101. set( ELF_EMBEDDING_METADATA "\"tdeprint-shared\" \"\" \"\" \"\" \"\" \"Trinity Desktop Environment\" \"\" \"${scm_embed_metadata_version}\" \"${scm_embed_metadata_datetime}\" \"x-sharedlib\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"\"" )
  102. separate_arguments( ELF_EMBEDDING_METADATA )
  103. add_custom_target(
  104. # embed name and metadata
  105. update_libtdeprint_metadata ALL
  106. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeprint/libtdeprint.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
  107. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeprint/libtdeprint.so.${scm_embed_metadata_version} || true
  108. DEPENDS tdelfeditor
  109. DEPENDS tdeprint-shared
  110. COMMENT "Storing SCM metadata in tdeprint/libtdeprint.so"
  111. )
  112. #get_target_property( scm_embed_metadata_version tdehtml-shared VERSION )
  113. set( ELF_EMBEDDING_METADATA "\"tdehtml-shared\" \"\" \"\" \"\" \"\" \"Trinity Desktop Environment\" \"\" \"${scm_embed_metadata_version}\" \"${scm_embed_metadata_datetime}\" \"x-sharedlib\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"\"" )
  114. separate_arguments( ELF_EMBEDDING_METADATA )
  115. add_custom_target(
  116. # embed name and metadata
  117. update_libtdehtml_metadata ALL
  118. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdehtml/libtdehtml.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
  119. COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdehtml/libtdehtml.so.${scm_embed_metadata_version} || true
  120. DEPENDS tdelfeditor
  121. DEPENDS tdehtml-shared
  122. COMMENT "Storing SCM metadata in tdehtml/libtdehtml.so"
  123. )
  124. endif( )
  125. endif( )