~ubuntu-branches/ubuntu/trusty/sflphone/trusty

« back to all changes in this revision

Viewing changes to kde/src/lib/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (4.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20140128182336-jrsv0k9u6cawc068
Tags: 1.3.0-1
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
1
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 
2
 
 
3
INCLUDE(GNUInstallDirs)
2
4
 
3
5
ADD_DEFINITIONS("-std=c++0x")
4
6
# ADD_DEFINITIONS("-std=c++0x")
15
17
SET(LOCAL_CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/")
16
18
SET(CMAKE_MODULE_PATH "${LOCAL_CMAKE_MODULE_PATH}")
17
19
 
18
 
FIND_PACKAGE ( KDE4 REQUIRED )
19
 
FIND_PACKAGE ( Qt4  REQUIRED )
20
 
 
21
 
INCLUDE ( KDE4Defaults )
22
 
 
23
 
set(GENERIC_LIB_VERSION "1.2.3")
24
 
 
25
 
INCLUDE_DIRECTORIES ( ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
 
20
IF(${ENABLE_VIDEO} MATCHES true)
 
21
   MESSAGE("VIDEO enabled")
 
22
   SET(ENABLE_VIDEO 1 CACHE BOOLEAN "Enable video")
 
23
   add_definitions( -DENABLE_VIDEO=true )
 
24
ENDIF(${ENABLE_VIDEO} MATCHES true)
 
25
 
 
26
IF(${ENABLE_QT5} MATCHES true)
 
27
   FIND_PACKAGE(Qt5Core)
 
28
   FIND_PACKAGE(Qt5DBus)
 
29
   ADD_DEFINITIONS(-DQT_DISABLE_DEPRECATED_BEFORE=0)
 
30
ELSE()
 
31
   FIND_PACKAGE ( Qt4  REQUIRED )
 
32
ENDIF(${ENABLE_QT5} MATCHES true)
 
33
 
 
34
set(GENERIC_LIB_VERSION "1.3.0")
 
35
 
 
36
include_directories(SYSTEM ${QT_INCLUDES} )
 
37
INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_BINARY_DIR})
 
38
 
 
39
# Build dbus interfaces
 
40
SET ( dbus_xml_introspecs_path ${CMAKE_CURRENT_SOURCE_DIR}/dbus/)
26
41
 
27
42
#File to compile
28
43
set( qtsflphone_LIB_SRCS
 
44
  #Data objects
29
45
  call.cpp
30
46
  account.cpp
31
 
  accountlist.cpp
 
47
  contact.cpp
 
48
  videorenderer.cpp
 
49
  videodevice.cpp
 
50
  phonenumber.cpp
 
51
  videocodec.cpp
 
52
  numbercategory.cpp
 
53
 
 
54
  #Models
 
55
  accountlistmodel.cpp
32
56
  callmodel.cpp
33
57
  historymodel.cpp
34
 
  contact.cpp
35
 
  contactbackend.cpp
 
58
  abstractcontactbackend.cpp
 
59
  abstractbookmarkmodel.cpp
36
60
  videocodecmodel.cpp
37
61
  videomodel.cpp
38
 
  videorenderer.cpp
39
 
  videodevice.cpp
40
62
  credentialmodel.cpp
41
63
  audiocodecmodel.cpp
42
64
  instantmessagingmodel.cpp
43
 
  configurationmanager_interface_singleton.cpp
44
 
  callmanager_interface_singleton.cpp
45
 
  instance_interface_singleton.cpp
46
 
  video_interface_singleton.cpp
47
 
  sflphone_const.h
48
 
)
49
 
 
50
 
# Build dbus interfaces
51
 
SET ( dbus_xml_introspecs_path ${CMAKE_CURRENT_SOURCE_DIR}/dbus/)
 
65
  contactproxymodel.cpp
 
66
  useractionmodel.cpp
 
67
  presencestatusmodel.cpp
 
68
  phonedirectorymodel.cpp
 
69
  historytimecategorymodel.cpp
 
70
  numbercategorymodel.cpp
 
71
  keyexchangemodel.cpp
 
72
  tlsmethodmodel.cpp
 
73
  numbercompletionmodel.cpp
 
74
  categorizedaccountmodel.cpp
 
75
  audiosettingsmodel.cpp
 
76
  ringtonemodel.cpp
 
77
  lastusednumbermodel.cpp
 
78
 
 
79
  #Communication
 
80
  dbus/configurationmanager.cpp
 
81
  dbus/callmanager.cpp
 
82
  dbus/instancemanager.cpp
 
83
  dbus/videomanager.cpp
 
84
  dbus/presencemanager.cpp
 
85
 
 
86
  #Visitors
 
87
  visitors/accountlistcolorvisitor.cpp
 
88
  visitors/phonenumberselector.cpp
 
89
  visitors/numbercategoryvisitor.cpp
 
90
  visitors/pixmapmanipulationvisitor.cpp
 
91
  visitors/presenceserializationvisitor.cpp
 
92
 
 
93
  #Other
 
94
  sflphone_const.h
 
95
  categorizedcompositenode.cpp
 
96
)
 
97
 
 
98
set( qtsflphone_LIB_HDRS
 
99
  account.h
 
100
  accountlistmodel.h
 
101
  call.h
 
102
  callmodel.h
 
103
  historymodel.h
 
104
  contact.h
 
105
  abstractcontactbackend.h
 
106
  abstractbookmarkmodel.h
 
107
  videocodecmodel.h
 
108
  videomodel.h
 
109
  videorenderer.h
 
110
  credentialmodel.h
 
111
  audiocodecmodel.h
 
112
  instantmessagingmodel.h
 
113
  contactproxymodel.h
 
114
  useractionmodel.h
 
115
  presencestatusmodel.h
 
116
  phonenumber.h
 
117
  phonedirectorymodel.h
 
118
  historytimecategorymodel.h
 
119
  numbercategorymodel.h
 
120
  videocodec.h
 
121
  keyexchangemodel.h
 
122
  tlsmethodmodel.h
 
123
  numbercompletionmodel.h
 
124
  categorizedaccountmodel.h
 
125
  numbercategory.h
 
126
  audiosettingsmodel.h
 
127
  ringtonemodel.h
 
128
  lastusednumbermodel.h
 
129
)
 
130
 
 
131
set( qtsflphone_extra_LIB_HDRS
 
132
  videodevice.h
 
133
  typedefs.h
 
134
  sflphone_const.h
 
135
  visitors/accountlistcolorvisitor.h
 
136
  visitors/phonenumberselector.h
 
137
  visitors/presenceserializationvisitor.h
 
138
)
 
139
 
 
140
# presence manager interface
 
141
SET ( presencemanager_xml  ${dbus_xml_introspecs_path}/presencemanager-introspec.xml )
 
142
 
 
143
SET_SOURCE_FILES_PROPERTIES(
 
144
   ${presencemanager_xml}
 
145
   PROPERTIES 
 
146
   CLASSNAME PresenceManagerInterface
 
147
   INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/dbus/metatypes.h")
 
148
 
 
149
IF(${ENABLE_QT5} MATCHES true)
 
150
   QT5_ADD_DBUS_INTERFACE(
 
151
      qtsflphone_LIB_SRCS
 
152
      ${presencemanager_xml}
 
153
      presencemanager_dbus_interface
 
154
   )
 
155
ELSE()
 
156
   QT4_ADD_DBUS_INTERFACE(
 
157
      qtsflphone_LIB_SRCS
 
158
      ${presencemanager_xml}
 
159
      presencemanager_dbus_interface
 
160
   )
 
161
 
 
162
ENDIF(${ENABLE_QT5} MATCHES true)
52
163
 
53
164
# configuration manager interface
54
165
SET ( configurationmanager_xml  ${dbus_xml_introspecs_path}/configurationmanager-introspec.xml )
57
168
   ${configurationmanager_xml}
58
169
   PROPERTIES 
59
170
   CLASSNAME ConfigurationManagerInterface
60
 
   INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/dbus/metatypes.h") 
61
 
 
62
 
QT4_ADD_DBUS_INTERFACE(
63
 
   qtsflphone_LIB_SRCS
64
 
   ${configurationmanager_xml}
65
 
   configurationmanager_dbus_interface)
 
171
   INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/dbus/metatypes.h")
 
172
 
 
173
IF(${ENABLE_QT5} MATCHES true)
 
174
   QT5_ADD_DBUS_INTERFACE(
 
175
      qtsflphone_LIB_SRCS
 
176
      ${configurationmanager_xml}
 
177
      configurationmanager_dbus_interface
 
178
   )
 
179
ELSE()
 
180
   QT4_ADD_DBUS_INTERFACE(
 
181
      qtsflphone_LIB_SRCS
 
182
      ${configurationmanager_xml}
 
183
      configurationmanager_dbus_interface
 
184
   )
 
185
 
 
186
ENDIF(${ENABLE_QT5} MATCHES true)
66
187
 
67
188
# call manager interface
68
189
SET ( callmanager_xml  ${dbus_xml_introspecs_path}/callmanager-introspec.xml )
73
194
   CLASSNAME CallManagerInterface
74
195
   INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/dbus/metatypes.h") 
75
196
 
76
 
QT4_ADD_DBUS_INTERFACE(
77
 
   qtsflphone_LIB_SRCS
78
 
   ${callmanager_xml}
79
 
   callmanager_dbus_interface)
 
197
IF(${ENABLE_QT5} MATCHES true)
 
198
   QT5_ADD_DBUS_INTERFACE(
 
199
      qtsflphone_LIB_SRCS
 
200
      ${callmanager_xml}
 
201
      callmanager_dbus_interface
 
202
   )
 
203
ELSE()
 
204
   QT4_ADD_DBUS_INTERFACE(
 
205
      qtsflphone_LIB_SRCS
 
206
      ${callmanager_xml}
 
207
      callmanager_dbus_interface
 
208
   )
 
209
ENDIF(${ENABLE_QT5} MATCHES true)
 
210
 
80
211
 
81
212
# video manager interface
82
213
SET ( video_xml  ${dbus_xml_introspecs_path}/video_controls-introspec.xml )
87
218
   CLASSNAME VideoInterface
88
219
   INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/dbus/metatypes.h")
89
220
 
90
 
QT4_ADD_DBUS_INTERFACE(
91
 
   qtsflphone_LIB_SRCS
92
 
   ${video_xml}
93
 
   video_dbus_interface)
 
221
IF(${ENABLE_QT5} MATCHES true)
 
222
   QT5_ADD_DBUS_INTERFACE(
 
223
      qtsflphone_LIB_SRCS
 
224
      ${video_xml}
 
225
      video_dbus_interface
 
226
   )
 
227
ELSE()
 
228
   QT4_ADD_DBUS_INTERFACE(
 
229
      qtsflphone_LIB_SRCS
 
230
      ${video_xml}
 
231
      video_dbus_interface
 
232
   )
 
233
ENDIF(${ENABLE_QT5} MATCHES true)
 
234
 
94
235
 
95
236
# instance interface
96
237
SET ( instance_xml  ${dbus_xml_introspecs_path}/instance-introspec.xml )
100
241
   PROPERTIES 
101
242
   CLASSNAME InstanceInterface
102
243
   INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/dbus/metatypes.h") 
103
 
   
104
 
QT4_ADD_DBUS_INTERFACE(
105
 
   qtsflphone_LIB_SRCS
106
 
   ${instance_xml}
107
 
   instance_dbus_interface)
108
 
 
109
 
kde4_add_library( qtsflphone  SHARED ${qtsflphone_LIB_SRCS} )
110
 
 
 
244
 
 
245
IF(${ENABLE_QT5} MATCHES true)
 
246
   QT5_ADD_DBUS_INTERFACE(
 
247
      qtsflphone_LIB_SRCS
 
248
      ${instance_xml}
 
249
      instance_dbus_interface
 
250
   )
 
251
ELSE()
 
252
   QT4_ADD_DBUS_INTERFACE(
 
253
      qtsflphone_LIB_SRCS
 
254
      ${instance_xml}
 
255
      instance_dbus_interface
 
256
   )
 
257
ENDIF(${ENABLE_QT5} MATCHES true)
 
258
 
 
259
# ADD_DEFINITIONS("-w")
 
260
IF(${ENABLE_QT5} MATCHES true)
 
261
   QT5_WRAP_CPP(LIB_HEADER_MOC ${qtsflphone_LIB_HDRS})
 
262
ELSE()
 
263
   QT4_WRAP_CPP(LIB_HEADER_MOC ${qtsflphone_LIB_HDRS})
 
264
ENDIF(${ENABLE_QT5} MATCHES true)
 
265
 
 
266
add_library( qtsflphone  SHARED ${qtsflphone_LIB_SRCS} ${LIB_HEADER_MOC} )
 
267
# REMOVE_DEFINITIONS("-w")
 
268
 
 
269
IF(${ENABLE_QT5} MATCHES true)
 
270
   QT5_USE_MODULES(qtsflphone Core DBus)
 
271
ENDIF(${ENABLE_QT5} MATCHES true)
 
272
 
111
273
target_link_libraries( qtsflphone
112
274
  -lrt
113
275
  -lpthread
116
278
)
117
279
 
118
280
set_target_properties( qtsflphone
119
 
  PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION}
120
 
)
121
 
 
122
 
set( qtsflphone_LIB_HDRS
123
 
  account.h
124
 
  accountlist.h
125
 
  call.h
126
 
  callmodel.h
127
 
  historymodel.h
128
 
  contact.h
129
 
  contactbackend.h
130
 
  videocodecmodel.h
131
 
  videomodel.h
132
 
  videodevice.h
133
 
  videorenderer.h
134
 
  credentialmodel.h
135
 
  audiocodecmodel.h
136
 
  configurationmanager_interface_singleton.h
137
 
  callmanager_interface_singleton.h
138
 
  instance_interface_singleton.h
139
 
  video_interface_singleton.h
140
 
  sflphone_const.h
141
 
  instantmessagingmodel.h
142
 
  typedefs.h
143
 
)
144
 
 
145
 
install( FILES ${qtsflphone_LIB_HDRS}
 
281
  PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_VERSION}
 
282
)
 
283
 
 
284
SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include)
 
285
 
 
286
install( FILES ${qtsflphone_LIB_HDRS} ${qtsflphone_extra_LIB_HDRS}
146
287
  DESTINATION ${INCLUDE_INSTALL_DIR}/qtsflphone
147
288
  COMPONENT Devel
148
289
)
149
 
 
150
 
install( TARGETS qtsflphone  ${INSTALL_TARGETS_DEFAULT_ARGS} )
 
290
 
 
291
#This hack force Debian based system to return a non multi-arch path
 
292
#this is required to prevent the .deb libqtsflphone.so from having an
 
293
#higher priority than the prefixed one.
 
294
STRING(REPLACE "${CMAKE_LIBRARY_ARCHITECTURE}" "" SANE_LIBRARY_PATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
 
295
 
 
296
install( TARGETS qtsflphone
 
297
  ARCHIVE DESTINATION ${SANE_LIBRARY_PATH}
 
298
  LIBRARY DESTINATION ${SANE_LIBRARY_PATH}
 
299
  DESTINATION ${SANE_LIBRARY_PATH}
 
300
)