CMakeLists.txt 17.3 KB
Newer Older
1
################################################################################
2
# CMakeLists.txt
3
# Copyright (C) 2017-2018  Belledonne Communications, Grenoble France
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#
################################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
################################################################################
22

Ronan's avatar
Ronan committed
23
cmake_minimum_required(VERSION 3.1)
Ghislain MARY's avatar
Ghislain MARY committed
24
project(linphoneqt VERSION 4.1.1)
25

26
set(APP_LIBRARY app-library)
27

Ronan's avatar
Ronan committed
28 29 30 31 32 33 34 35 36 37 38 39
if (NOT DEFINED EXECUTABLE_NAME)
  set(EXECUTABLE_NAME linphone)
endif ()

if (NOT DEFINED APPLICATION_NAME)
  set(APPLICATION_NAME Linphone)
endif ()

set(APPLICATION_DESCRIPTION "A libre SIP client")

# ------------------------------------------------------------------------------

40
set(TARGET_NAME linphone-qt)
41

42
set(CMAKE_CXX_STANDARD 11)
43

44
set(ASSETS_DIR "assets")
45

46 47
option(ENABLE_UPDATE_CHECK "Enable update check." NO)

48
include(GNUInstallDirs)
49
include(CheckCXXCompilerFlag)
50

51 52 53 54
# Use automatically moc from Qt5.
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

55 56 57 58 59
# Avoid cmake warning if CMP0071 is not set.
if (POLICY CMP0071)
  cmake_policy(SET CMP0071 NEW)
endif ()

60
if (NOT WIN32)
61 62
  check_cxx_compiler_flag("-Wsuggest-override" SUGGEST_OVERRIDE)
  set(CUSTOM_FLAGS "\
Ronan's avatar
Ronan committed
63
-Wall \
64 65
-Wcast-align \
-Wconversion \
66
-Werror=old-style-cast \
67
-Werror=return-type \
68 69 70
-Wextra \
-Wfloat-equal \
-Winit-self \
71
-Wnon-virtual-dtor \
72 73
-Woverloaded-virtual \
-Wpointer-arith \
74
-Wsign-conversion \
75 76 77
-Wuninitialized \
-Wunused \
")
78
  if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
79
    set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wlogical-op")
80 81
  endif ()
  if (SUGGEST_OVERRIDE)
82
    set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wsuggest-override -Werror=suggest-override")
83 84
  endif ()
endif ()
85

86 87
set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -DQT_NO_EXCEPTIONS")

88
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CUSTOM_FLAGS}")
89
# See: http://stackoverflow.com/a/1372836
90
if (WIN32)
91
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WINSOCKAPI_")
92
endif ()
93

94 95 96
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -DQT_NO_DEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG")

Ronan's avatar
Ronan committed
97 98 99
# ------------------------------------------------------------------------------
# Define packages, libs, sources, headers, resources and languages.
# ------------------------------------------------------------------------------
100

101
set(QT5_PACKAGES Core Gui Quick Widgets QuickControls2 Svg LinguistTools Concurrent Network)
102
if (UNIX AND NOT APPLE)
103 104
  list(APPEND QT5_PACKAGES DBus)
endif ()
105
set(QT5_PACKAGES_OPTIONAL TextToSpeech)
106

Ghislain MARY's avatar
Ghislain MARY committed
107 108
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

109
if (LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
110
  include("${EP_linphone_CONFIG_DIR}/wrappers/cpp/LinphoneCxxConfig.cmake")
111
  include("${EP_bctoolbox_CONFIG_DIR}/BcToolboxConfig.cmake")
112
  include("${EP_belcard_CONFIG_DIR}/BelcardConfig.cmake")
113
  include("${EP_ms2_CONFIG_DIR}/Mediastreamer2Config.cmake")
114
else ()
115 116 117
  find_package(LinphoneCxx REQUIRED)
  find_package(BcToolbox REQUIRED)
  find_package(Belcard REQUIRED)
118
  find_package(Mediastreamer2 REQUIRED)
119
endif ()
120
find_package(Minizip REQUIRED)
jehan's avatar
jehan committed
121

122
set(SOURCES
123
  src/app/App.cpp
124
  src/app/AppController.cpp
125
  src/app/cli/Cli.cpp
126 127 128
  src/app/logger/Logger.cpp
  src/app/paths/Paths.cpp
  src/app/providers/AvatarProvider.cpp
129
  src/app/providers/ImageProvider.cpp
130 131
  src/app/providers/ThumbnailProvider.cpp
  src/app/translator/DefaultTranslator.cpp
132
  src/components/assistant/AssistantModel.cpp
133
  src/components/authentication/AuthenticationNotifier.cpp
Ronan's avatar
Ronan committed
134 135
  src/components/call/CallModel.cpp
  src/components/calls/CallsListModel.cpp
136
  src/components/calls/CallsListProxyModel.cpp
137
  src/components/camera/Camera.cpp
138
  src/components/camera/CameraPreview.cpp
139
  src/components/camera/MSFunctions.cpp
140
  src/components/chat/ChatModel.cpp
Ronan's avatar
Ronan committed
141
  src/components/chat/ChatProxyModel.cpp
142
  src/components/codecs/AbstractCodecsModel.cpp
143 144
  src/components/codecs/AudioCodecsModel.cpp
  src/components/codecs/VideoCodecsModel.cpp
145
  src/components/conference/ConferenceAddModel.cpp
146
  src/components/conference/ConferenceHelperModel.cpp
147
  src/components/conference/ConferenceModel.cpp
Ronan's avatar
Ronan committed
148 149
  src/components/contact/ContactModel.cpp
  src/components/contact/VcardModel.cpp
150 151
  src/components/contacts/ContactsListModel.cpp
  src/components/contacts/ContactsListProxyModel.cpp
Ronan's avatar
Ronan committed
152
  src/components/core/CoreHandlers.cpp
Ronan's avatar
Ronan committed
153
  src/components/core/CoreManager.cpp
154
  src/components/core/messages-count-notifier/AbstractMessagesCountNotifier.cpp
155
  src/components/file/FileDownloader.cpp
156
  src/components/file/FileExtractor.cpp
157
  src/components/notifier/Notifier.cpp
158
  src/components/other/clipboard/Clipboard.cpp
159
  src/components/other/colors/Colors.cpp
160 161
  src/components/other/text-to-speech/TextToSpeech.cpp
  src/components/other/units/Units.cpp
162
  src/components/presence/OwnPresenceModel.cpp
Ghislain MARY's avatar
Ghislain MARY committed
163
  src/components/presence/Presence.cpp
164 165
  src/components/settings/AccountSettingsModel.cpp
  src/components/settings/SettingsModel.cpp
166
  src/components/sip-addresses/SipAddressesModel.cpp
167
  src/components/sip-addresses/SipAddressesProxyModel.cpp
168
  src/components/sip-addresses/SipAddressObserver.cpp
169
  src/components/sound-player/SoundPlayer.cpp
170
  src/components/telephone-numbers/TelephoneNumbersModel.cpp
171
  src/components/timeline/TimelineModel.cpp
172
  src/components/url-handlers/UrlHandlers.cpp
173
  src/utils/LinphoneUtils.cpp
174
  src/utils/QExifImageHeader.cpp
175
  src/utils/Utils.cpp
176 177 178
)

set(HEADERS
179
  src/app/App.hpp
180
  src/app/AppController.hpp
181
  src/app/cli/Cli.hpp
182 183 184
  src/app/logger/Logger.hpp
  src/app/paths/Paths.hpp
  src/app/providers/AvatarProvider.hpp
185
  src/app/providers/ImageProvider.hpp
186
  src/app/providers/ThumbnailProvider.hpp
187
  src/app/single-application/SingleApplication.hpp
188
  src/app/translator/DefaultTranslator.hpp
189
  src/components/assistant/AssistantModel.hpp
190
  src/components/authentication/AuthenticationNotifier.hpp
Ronan's avatar
Ronan committed
191 192
  src/components/call/CallModel.hpp
  src/components/calls/CallsListModel.hpp
193
  src/components/calls/CallsListProxyModel.hpp
194
  src/components/camera/Camera.hpp
195
  src/components/camera/CameraPreview.hpp
196
  src/components/camera/MSFunctions.hpp
197
  src/components/chat/ChatModel.hpp
Ronan's avatar
Ronan committed
198
  src/components/chat/ChatProxyModel.hpp
199 200 201
  src/components/codecs/AbstractCodecsModel.hpp
  src/components/codecs/AudioCodecsModel.hpp
  src/components/codecs/VideoCodecsModel.hpp
202
  src/components/Components.hpp
203
  src/components/conference/ConferenceAddModel.hpp
204
  src/components/conference/ConferenceHelperModel.hpp
205
  src/components/conference/ConferenceModel.hpp
Ronan's avatar
Ronan committed
206 207
  src/components/contact/ContactModel.hpp
  src/components/contact/VcardModel.hpp
208 209
  src/components/contacts/ContactsListModel.hpp
  src/components/contacts/ContactsListProxyModel.hpp
Ronan's avatar
Ronan committed
210
  src/components/core/CoreHandlers.hpp
Ronan's avatar
Ronan committed
211
  src/components/core/CoreManager.hpp
212
  src/components/core/messages-count-notifier/AbstractMessagesCountNotifier.hpp
213
  src/components/file/FileDownloader.hpp
214
  src/components/file/FileExtractor.hpp
215
  src/components/notifier/Notifier.hpp
216
  src/components/other/clipboard/Clipboard.hpp
217
  src/components/other/colors/Colors.hpp
218
  src/components/other/desktop-tools/DesktopTools.hpp
219 220
  src/components/other/text-to-speech/TextToSpeech.hpp
  src/components/other/units/Units.hpp
221
  src/components/presence/OwnPresenceModel.hpp
222 223 224
  src/components/presence/Presence.hpp
  src/components/settings/AccountSettingsModel.hpp
  src/components/settings/SettingsModel.hpp
225
  src/components/sip-addresses/SipAddressesModel.hpp
226
  src/components/sip-addresses/SipAddressesProxyModel.hpp
227
  src/components/sip-addresses/SipAddressObserver.hpp
228
  src/components/sound-player/SoundPlayer.hpp
229
  src/components/telephone-numbers/TelephoneNumbersModel.hpp
230
  src/components/timeline/TimelineModel.hpp
231
  src/components/url-handlers/UrlHandlers.hpp
232
  src/utils/LinphoneUtils.hpp
233
  src/utils/QExifImageHeader.hpp
234
  src/utils/Utils.hpp
235 236
)

237 238
set(MAIN_FILE src/app/main.cpp)

239
if (APPLE)
240
  list(APPEND SOURCES
241
    src/app/single-application/SingleApplication.cpp
242 243 244 245
    src/components/core/messages-count-notifier/MessagesCountNotifierMacOs.m
    src/components/other/desktop-tools/DesktopToolsMacOs.cpp
  )
  list(APPEND HEADERS
246
    src/app/single-application/SingleApplicationPrivate.hpp
247 248 249 250 251
    src/components/core/messages-count-notifier/MessagesCountNotifierMacOs.hpp
    src/components/other/desktop-tools/DesktopToolsMacOs.hpp
  )
elseif (WIN32)
  list(APPEND SOURCES
252
    src/app/single-application/SingleApplication.cpp
253 254 255 256
    src/components/core/messages-count-notifier/MessagesCountNotifierSystemTrayIcon.cpp
    src/components/other/desktop-tools/DesktopToolsWindows.cpp
  )
  list(APPEND HEADERS
257
    src/app/single-application/SingleApplicationPrivate.hpp
258 259 260
    src/components/core/messages-count-notifier/MessagesCountNotifierSystemTrayIcon.hpp
    src/components/other/desktop-tools/DesktopToolsWindows.hpp
  )
261
else ()
262
  list(APPEND SOURCES
263
    src/app/single-application/SingleApplicationDBus.cpp
264 265
    src/components/core/messages-count-notifier/MessagesCountNotifierSystemTrayIcon.cpp
    src/components/other/desktop-tools/DesktopToolsLinux.cpp
266 267
    src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.cpp
    src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.cpp
268 269
  )
  list(APPEND HEADERS
270
    src/app/single-application/SingleApplicationDBusPrivate.hpp
271 272
    src/components/core/messages-count-notifier/MessagesCountNotifierSystemTrayIcon.hpp
    src/components/other/desktop-tools/DesktopToolsLinux.hpp
273 274
    src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.hpp
    src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.hpp
275
  )
276 277
endif ()

Ronan's avatar
Ronan committed
278
set(QRC_RESOURCES resources.qrc)
279

280
set(LANGUAGES_DIRECTORY "${ASSETS_DIR}/languages")
281
set(I18N_FILENAME i18n.qrc)
282
set(LANGUAGES de en fr_FR ja lt ru sv tr pt_BR)
283

Ronan's avatar
Ronan committed
284
# ------------------------------------------------------------------------------
285

286 287
function (PREPEND list prefix)
  set(new_list "")
288

289 290 291
  foreach (elem ${${list}})
    list(APPEND new_list "${prefix}${elem}")
  endforeach ()
292

293 294 295 296
  set(${list} ${new_list} PARENT_SCOPE)
endfunction ()

# Force absolute paths.
297 298 299
PREPEND(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/")
PREPEND(HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/")
PREPEND(QRC_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/")
300

Ronan's avatar
Ronan committed
301
# ------------------------------------------------------------------------------
302
# Compute QML files list.
Ronan's avatar
Ronan committed
303
# ------------------------------------------------------------------------------
304 305 306 307 308 309

set(QML_SOURCES)
file(STRINGS ${QRC_RESOURCES} QRC_RESOURCES_CONTENT)
foreach (line ${QRC_RESOURCES_CONTENT})
  set(result)
  string(REGEX REPLACE
Ronan's avatar
Ronan committed
310
    "^[ \t]*<[ \t]*file[ \t]*>[ \t]*(.+\\.[a-z]+)[ \t]*<[ \t]*/[ \t]*file[ \t]*>[ \t]*$"
311 312
    "\\1"
    result
313 314
    "${line}"
  )
315 316
  string(REGEX MATCH "\\.[a-z]+$" is_ui ${result})
  if (NOT ${is_ui} STREQUAL "")
317
    list(APPEND QML_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${result}")
318 319 320
  endif ()
endforeach ()

321 322 323 324 325
# ------------------------------------------------------------------------------
# Init git hooks.
# ------------------------------------------------------------------------------

if (NOT WIN32)
Ghislain MARY's avatar
Ghislain MARY committed
326 327
  add_custom_target(
    check_qml DEPENDS ${QML_SOURCES}
328
    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tools/check_qml_syntax"
Ghislain MARY's avatar
Ghislain MARY committed
329
  )
330
endif ()
331 332

execute_process(COMMAND ${CMAKE_COMMAND} -E copy
333
  "${CMAKE_CURRENT_SOURCE_DIR}/tools/private/pre-commit"
334
  "${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit"
335 336
)

337 338 339 340 341 342 343
# ------------------------------------------------------------------------------
# Create config.h file
# ------------------------------------------------------------------------------

set(MSPLUGINS_DIR "${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/config.h")

Ronan's avatar
Ronan committed
344
# ------------------------------------------------------------------------------
345
# Build.
Ronan's avatar
Ronan committed
346
# ------------------------------------------------------------------------------
347

348 349
include_directories(src/)

350
find_package(Qt5 COMPONENTS ${QT5_PACKAGES} REQUIRED)
351
find_package(Qt5 COMPONENTS ${QT5_PACKAGES_OPTIONAL} QUIET)
352

353
if (CMAKE_INSTALL_RPATH)
354 355 356 357
  get_target_property(LUPDATE_PATH Qt5::lupdate LOCATION)
  get_filename_component(LUPDATE_PATH "${LUPDATE_PATH}" DIRECTORY)
  get_filename_component(QT_PATH "${LUPDATE_PATH}/../lib" ABSOLUTE)
  list(APPEND CMAKE_INSTALL_RPATH "${QT_PATH}")
358
endif ()
359

360 361
# Add languages support.
add_subdirectory(${LANGUAGES_DIRECTORY})
362
list(APPEND QRC_RESOURCES "${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGES_DIRECTORY}/${I18N_FILENAME}")
363 364

# Add qrc. (images, qml, translations...)
365
qt5_add_resources(RESOURCES ${QRC_RESOURCES})
366 367

# Build.
368 369 370 371 372 373 374
add_library(${APP_LIBRARY} OBJECT ${SOURCES} ${HEADERS} ${RESOURCES} ${QML_SOURCES})
set_property(TARGET ${APP_LIBRARY} PROPERTY POSITION_INDEPENDENT_CODE ON)

bc_git_version(${TARGET_NAME} ${PROJECT_VERSION})
add_dependencies(${APP_LIBRARY} ${TARGET_NAME}-git-version)
add_dependencies(${APP_LIBRARY} update_translations)

375
if (WIN32)
376
  add_executable(${TARGET_NAME} WIN32 $<TARGET_OBJECTS:${APP_LIBRARY}> ${ASSETS_DIR}/linphone.rc ${MAIN_FILE})
377
else ()
378
  add_executable(${TARGET_NAME} $<TARGET_OBJECTS:${APP_LIBRARY}> ${MAIN_FILE})
379
endif ()
380

381
if (NOT WIN32)
Ghislain MARY's avatar
Ghislain MARY committed
382
  add_dependencies(update_translations check_qml)
383
endif ()
384
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "${EXECUTABLE_NAME}")
385

Ghislain MARY's avatar
Ghislain MARY committed
386 387
set(INCLUDED_DIRECTORIES "${LINPHONECXX_INCLUDE_DIRS}" "${BELCARD_INCLUDE_DIRS}" "${BCTOOLBOX_INCLUDE_DIRS}" "${MEDIASTREAMER2_INCLUDE_DIRS}" "${MINIZIP_INCLUDE_DIRS}")
set(LIBRARIES ${BCTOOLBOX_CORE_LIBRARIES} ${BELCARD_LIBRARIES} ${LINPHONECXX_LIBRARIES} ${MINIZIP_LIBRARIES})
388

389
foreach (package ${QT5_PACKAGES})
390
  list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}")
391 392 393
  # `qt5_create_translation` is provided from `LinguistTools` package.
  # But the `Qt5::LinguistTools` lib does not exist. Remove it.
  if (NOT (${package} STREQUAL LinguistTools))
394
    list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES})
395 396 397 398 399 400
  endif ()
endforeach ()

foreach (package ${QT5_PACKAGES_OPTIONAL})
  if ("${Qt5${package}_FOUND}")
    message("Optional package ${package} found.")
401 402
    list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}")
    list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES})
403 404

    string(TOUPPER "${package}" INCLUDE_NAME)
405
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${INCLUDE_NAME}_ENABLED")
406 407 408
  else ()
    message("Optional package ${package} not found.")
  endif ()
409
endforeach ()
Ronan's avatar
Ronan committed
410

411 412 413
if (APPLE)
  list(APPEND LIBRARIES "-framework Cocoa")
endif ()
414

415 416 417 418 419
target_include_directories(${APP_LIBRARY} SYSTEM PRIVATE ${INCLUDED_DIRECTORIES})
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${INCLUDED_DIRECTORIES})

target_link_libraries(${TARGET_NAME} ${LIBRARIES})

420
foreach (target ${TARGET_NAME})
421 422 423 424 425 426 427
  install(TARGETS ${target}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
  )
endforeach ()
428

Ronan's avatar
Ronan committed
429 430
if (UNIX AND NOT APPLE)
  # Install desktop/icon files.
431
  configure_file("${ASSETS_DIR}/linphone.desktop.cmake" "${EXECUTABLE_NAME}.desktop" @ONLY)
Ronan's avatar
Ronan committed
432 433 434 435

  install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME}.desktop"
    DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
  )
436
  install(FILES "${ASSETS_DIR}/images/app_logo.svg"
Ronan's avatar
Ronan committed
437 438 439
    DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/"
    RENAME "${EXECUTABLE_NAME}.svg"
  )
440

Ronan's avatar
Ronan committed
441 442
  set(ICON_DIRS 16x16 22x22 24x24 32x32 64x64 128x128)
  foreach (DIR ${ICON_DIRS})
443
    install(FILES "${ASSETS_DIR}/icons/hicolor/${DIR}/apps/icon.png"
Ronan's avatar
Ronan committed
444 445 446 447 448
      DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${DIR}/apps/"
      RENAME "${EXECUTABLE_NAME}.png"
    )
  endforeach ()
endif ()
449

450 451 452 453
# ------------------------------------------------------------------------------
# Install rc files.
# ------------------------------------------------------------------------------

454
install(FILES "${ASSETS_DIR}/linphonerc-factory"
Ronan's avatar
Ronan committed
455
  DESTINATION "${CMAKE_INSTALL_DATADIR}/${EXECUTABLE_NAME}"
456
)
457 458

set(ASSETS_ASSISTANT_DIR "${ASSETS_DIR}/assistant")
Ronan's avatar
Ronan committed
459
set(ASSISTANT_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/${EXECUTABLE_NAME}/assistant")
460 461

install(FILES "${ASSETS_ASSISTANT_DIR}/use-other-sip-account.rc"
462
  DESTINATION "${ASSISTANT_INSTALL_DATADIR}"
463 464
)
install(FILES "${ASSETS_ASSISTANT_DIR}/create-linphone-sip-account.rc"
465
  DESTINATION "${ASSISTANT_INSTALL_DATADIR}"
466 467
)
install(FILES "${ASSETS_ASSISTANT_DIR}/use-linphone-sip-account.rc"
468
  DESTINATION "${ASSISTANT_INSTALL_DATADIR}"
469
)
470 471

# ------------------------------------------------------------------------------
472
# CPack settings & RPM.
473 474
# ------------------------------------------------------------------------------

475
add_subdirectory(build)
Ronan's avatar
Ronan committed
476

477 478 479 480 481 482 483 484
# ------------------------------------------------------------------------------
# To start better integration into IDE.
# ------------------------------------------------------------------------------

source_group(
  "Qml" REGULAR_EXPRESSION ".+\.qml$"
)
source_group(
485
  "Js" REGULAR_EXPRESSION ".+\.js$"
486 487 488 489
)
source_group(
  "Svg" REGULAR_EXPRESSION ".+\.svg$"
)