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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
commit fadb46f704506567b42aab2eeedf8f8947dd3e40
Author: Slávek Banko <[email protected]>
Date: Mon Apr 24 20:57:15 2023 +0200
Use find_package( TQtQUI ) to detect TQtQui library.
Use tde_setup_dbus to detect and setup DBus.
Cleanup unused macros.
Signed-off-by: Slávek Banko <[email protected]>
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index bc3c9ea..0df3cea 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -9,6 +9,12 @@
#
#################################################
+
+# required stuff
+find_package( TQt )
+find_package( TDE )
+find_package( TQtQUI )
+
tde_setup_architecture_flags( )
include(TestBigEndian)
@@ -23,27 +29,5 @@ if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY )
-# check for dbus-1
-pkg_search_module( DBUS dbus-1 )
-if( NOT DBUS_FOUND )
- tde_message_fatal( "dbus-1 is required, but was not found on your system" )
-endif( )
-
-
-# check for dbus-1-tqt
-pkg_search_module( DBUS_TQT dbus-1-tqt )
-if( NOT DBUS_TQT_FOUND )
- tde_message_fatal( "dbus-1-tqt is required, but was not found on your system" )
-endif( )
-
-# check for msgfmt
-if( BUILD_TRANSLATIONS AND NOT DEFINED MSGFMT_EXECUTABLE )
- find_program( MSGFMT_EXECUTABLE msgfmt )
- if( NOT MSGFMT_EXECUTABLE )
- tde_message_fatal( "msgfmt program is required, but was not found on your system" )
- endif( )
-endif( )
-
-# required stuff
-find_package( TQt )
-find_package( TDE )
+# check for dbus
+tde_setup_dbus( dbus-1-tqt )
diff --git a/src/libtdebluez/CMakeLists.txt b/src/libtdebluez/CMakeLists.txt
index af33393..9c040d4 100644
--- a/src/libtdebluez/CMakeLists.txt
+++ b/src/libtdebluez/CMakeLists.txt
@@ -12,19 +12,6 @@
project( libtdebluez )
set(LIBRARY_VERSION 0.0.1)
-# include( ConfigureChecks.cmake )
-foreach( f ${TQT_LIBRARIES} )
- if( ${f} STREQUAL "tqt-mt" )
- set(TQUI_LIBRARIES "tqui" CACHE TYPE STRING FORCE)
- endif()
- if( ${f} STREQUAL "qt-mt" )
- set(TQUI_LIBRARIES "qui" CACHE TYPE STRING FORCE)
- endif()
-endforeach()
-
-# import required
-#tde_import( lib... )
-
add_subdirectory( interfaces )
include_directories(
@@ -42,8 +29,10 @@ link_directories(
${DBUS_TQT_LIBRARY_DIRS}
)
+
##### headers ###################################
# implementations
+
install(
FILES adapterImpl.h
btuuids.h
@@ -84,14 +73,16 @@ set( ${target}_SRCS
)
##### tdebluez (shared) ###########################
-# set( KDE3_DCOPIDL_EXECUTABLE ${KDE3_DCOPIDLNG_EXECUTABLE} )
+
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION ${LIBRARY_VERSION}
DEPENDS bluezinterfaces-static
- LINK ${DBUS_TQT_LIBRARIES} tdeparts-shared bluezinterfaces-static ${TQUI_LIBRARIES}
+ LINK ${DBUS_TQT_LIBRARIES} tdeparts-shared bluezinterfaces-static ${TQTQUI_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)
+
##### install import cmake modules ###############
+
tde_install_export( )
diff --git a/src/libtdebluez/interfaces/CMakeLists.txt b/src/libtdebluez/interfaces/CMakeLists.txt
index 4eba55d..15a6587 100644
--- a/src/libtdebluez/interfaces/CMakeLists.txt
+++ b/src/libtdebluez/interfaces/CMakeLists.txt
@@ -16,7 +16,6 @@ include_directories(
)
set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces )
-set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 )
set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h )
set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp)
@@ -33,13 +32,6 @@ set( Adapter_SRCS adapter1Interface.cpp adapter1Proxy.cpp gattmanager1Interface.
set( Device_HDRS device1Interface.h device1Proxy.h mediacontrol1Interface.h mediacontrol1Proxy.h)
set( Device_SRCS device1Interface.cpp device1Proxy.cpp mediacontrol1Interface.cpp mediacontrol1Proxy.cpp )
-#function( install_header fileinput target )
-# install(
-# FILES ${CMAKE_CURRENT_BUILD_DIR}/${fileinput}
-# DESTINATION ${target}
-# )
-#endfunction( )
-
##### ObjectManager #########################
add_custom_command(
@@ -92,25 +84,10 @@ tde_add_library( bluezinterfaces STATIC_PIC AUTOMOC
##### install headers ###################################
-
-#file( GLOB _bin_dirs RELATIVE ${CMAKE_CURRENT_BINARY_DIR}
-# ${CMAKE_CURRENT_BINARY_DIR}/* )
-#unset( _exclude_dirs )
-#foreach( _dir IN LISTS _bin_dirs )
-# if(IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir} )
-# list( APPEND _exclude_dirs PATTERN ${_dir} EXCLUDE )
-# endif()
-#endforeach()
-#
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-# DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex
-# USE_SOURCE_PERMISSIONS
-# FILES_MATCHING PATTERN PATTERN "*.h"
-# ${_exclude_dirs}
-#)
-
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+install(
+ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DESTINATION ${INCLUDE_INSTALL_DIR}/tdebluez
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN PATTERN "*.h"
- PATTERN "CMakeFiles" EXCLUDE)
+ PATTERN "CMakeFiles" EXCLUDE
+)
diff --git a/src/libtdeobex/CMakeLists.txt b/src/libtdeobex/CMakeLists.txt
index b4323c8..3c6bd51 100644
--- a/src/libtdeobex/CMakeLists.txt
+++ b/src/libtdeobex/CMakeLists.txt
@@ -12,19 +12,6 @@
project( libtdeobex )
set(LIBRARY_VERSION 0.0.1)
-# include( ConfigureChecks.cmake )
-foreach( f ${TQT_LIBRARIES} )
- if( ${f} STREQUAL "tqt-mt" )
- set(TQUI_LIBRARIES "tqui" CACHE TYPE STRING FORCE)
- endif()
- if( ${f} STREQUAL "qt-mt" )
- set(TQUI_LIBRARIES "qui" CACHE TYPE STRING FORCE)
- endif()
-endforeach()
-
-# import required
-#tde_import( lib... )
-
add_subdirectory( interfaces )
include_directories(
@@ -42,8 +29,10 @@ link_directories(
${DBUS_TQT_LIBRARY_DIRS}
)
+
##### headers ###################################
# implementations
+
install(
FILES obexobjectmanagerImpl.h
DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex )
@@ -54,14 +43,16 @@ set( ${target}_SRCS obexobjectmanagerImpl.cpp )
##### tdeobex (shared) ###########################
-# set( KDE3_DCOPIDL_EXECUTABLE ${KDE3_DCOPIDLNG_EXECUTABLE} )
+
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION ${LIBRARY_VERSION}
DEPENDS obexinterfaces-static
- LINK ${DBUS_TQT_LIBRARIES} tdeparts-shared obexinterfaces-static ${TQUI_LIBRARIES}
+ LINK ${DBUS_TQT_LIBRARIES} tdeparts-shared obexinterfaces-static ${TQTQUI_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)
-
+
+
##### install import cmake modules ###############
+
tde_install_export( )
diff --git a/src/libtdeobex/interfaces/CMakeLists.txt b/src/libtdeobex/interfaces/CMakeLists.txt
index 9c09e24..c93ec00 100644
--- a/src/libtdeobex/interfaces/CMakeLists.txt
+++ b/src/libtdeobex/interfaces/CMakeLists.txt
@@ -16,7 +16,6 @@ include_directories(
)
set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces )
-set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 )
set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h )
set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp )
@@ -59,26 +58,13 @@ tde_add_library( obexinterfaces STATIC_PIC AUTOMOC
LINK ${DBUS_TQT_LIBRARIES}
)
-##### headers ###################################
-#file( GLOB _bin_dirs RELATIVE ${CMAKE_CURRENT_BINARY_DIR}
-# ${CMAKE_CURRENT_BINARY_DIR}/* )
-#unset( _exclude_dirs )
-#foreach( _dir IN LISTS _bin_dirs )
-# if( IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir} )
-# list( APPEND _exclude_dirs PATTERN ${_dir} EXCLUDE )
-# endif()
-#endforeach()
-#
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-# DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex
-# USE_SOURCE_PERMISSIONS
-# FILES_MATCHING PATTERN PATTERN "*.h"
-# ${_exclude_dirs}
-#)
+##### headers ###################################
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+install(
+ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN PATTERN "*.h"
- PATTERN "CMakeFiles" EXCLUDE )
+ PATTERN "CMakeFiles" EXCLUDE
+)
|