blob: acca3dc1410b904cd28341cbc573cd2e7796bec2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
#################################################
#
# (C) 2011-2014 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/tdecore
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/tdecore
${LIBR_INCLUDEDIR}
)
link_directories(
${TDECORE_LIBRARY_DIRS}
${LIBR_LIBDIR}
)
##### tdelfeditor ################################
tde_add_executable( tdelfeditor
SOURCES tdelfeditor.cpp
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( scm_embed_metadata_datetime )
if( NOT "${TDE_SCM_MODULE_NAME}" STREQUAL "" )
if( NOT "${TDE_SCM_MODULE_REVISION}" STREQUAL "" )
get_target_property( scm_embed_metadata_version DCOP-shared VERSION )
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}\" \"\"" )
separate_arguments( ELF_EMBEDDING_METADATA )
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
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/dcop/libDCOP.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/dcop/libDCOP.so.${scm_embed_metadata_version} || true
DEPENDS tdelfeditor
DEPENDS DCOP-shared
COMMENT "Storing SCM metadata in dcop/libDCOP.so"
)
get_target_property( scm_embed_metadata_version tdecore-shared VERSION )
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}\" \"\"" )
separate_arguments( ELF_EMBEDDING_METADATA )
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
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdecore/libtdecore.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdecore/libtdecore.so.${scm_embed_metadata_version} || true
DEPENDS tdelfeditor
DEPENDS tdecore-shared
COMMENT "Storing SCM metadata in tdecore/libtdecore.so"
)
#get_target_property( scm_embed_metadata_version tdeio-shared VERSION )
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}\" \"\"" )
separate_arguments( ELF_EMBEDDING_METADATA )
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
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeio/libtdeio.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeio/libtdeio.so.${scm_embed_metadata_version} || true
DEPENDS tdelfeditor
DEPENDS tdeio-shared
COMMENT "Storing SCM metadata in tdeui/libtdeio.so"
)
#get_target_property( scm_embed_metadata_version tdeui-shared VERSION )
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}\" \"\"" )
separate_arguments( ELF_EMBEDDING_METADATA )
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
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeui/libtdeui.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeui/libtdeui.so.${scm_embed_metadata_version} || true
DEPENDS tdelfeditor
DEPENDS tdeui-shared
COMMENT "Storing SCM metadata in tdeui/libtdeui.so"
)
#get_target_property( scm_embed_metadata_version tdeutils-shared VERSION )
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}\" \"\"" )
separate_arguments( ELF_EMBEDDING_METADATA )
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
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeutils/libtdeutils.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeutils/libtdeutils.so.${scm_embed_metadata_version} || true
DEPENDS tdelfeditor
DEPENDS tdeutils-shared
COMMENT "Storing SCM metadata in tdeutils/libtdeutils.so"
)
#get_target_property( scm_embed_metadata_version tdeprint-shared VERSION )
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}\" \"\"" )
separate_arguments( ELF_EMBEDDING_METADATA )
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
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdeprint/libtdeprint.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdeprint/libtdeprint.so.${scm_embed_metadata_version} || true
DEPENDS tdelfeditor
DEPENDS tdeprint-shared
COMMENT "Storing SCM metadata in tdeprint/libtdeprint.so"
)
#get_target_property( scm_embed_metadata_version tdehtml-shared VERSION )
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}\" \"\"" )
separate_arguments( ELF_EMBEDDING_METADATA )
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
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -m ${CMAKE_BINARY_DIR}/tdehtml/libtdehtml.so.${scm_embed_metadata_version} ${ELF_EMBEDDING_METADATA} || true
COMMAND ${CMAKE_BINARY_DIR}/tdelfeditor/tdelfeditor -e ${CMAKE_BINARY_DIR}/tdehtml/libtdehtml.so.${scm_embed_metadata_version} || true
DEPENDS tdelfeditor
DEPENDS tdehtml-shared
COMMENT "Storing SCM metadata in tdehtml/libtdehtml.so"
)
endif( )
endif( )
|