713
by Gustavo Pichorim Boiko
Start removing the UI bits from the branch to keep it only for the service. |
1 |
project(telephony-service) |
113.1.1
by Olivier Tilloy
Application to wrap the telephony prototype, along with CMake build file. |
2 |
cmake_minimum_required(VERSION 2.8) |
143.3.1
by Gustavo Pichorim Boiko
Find the QtMobility contacts module and add it to the linking |
3 |
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) |
113.1.1
by Olivier Tilloy
Application to wrap the telephony prototype, along with CMake build file. |
4 |
|
113.1.3
by Olivier Tilloy
Add install targets and allow running installed/uninstalled. |
5 |
# Standard install paths
|
6 |
include(GNUInstallDirs) |
|
7 |
||
550.3.1
by Gustavo Pichorim Boiko
Use the application activation function available on hybris to launch the |
8 |
# Check for include files
|
9 |
include(CheckIncludeFileCXX) |
|
633.1.1
by Gustavo Pichorim Boiko
Make the usage of messaging-menu-message conditional to its availability. |
10 |
include(CheckIncludeFile) |
550.3.1
by Gustavo Pichorim Boiko
Use the application activation function available on hybris to launch the |
11 |
|
413.6.1
by Gustavo Pichorim Boiko
Port the C++ part of the application executable target to Qt5. |
12 |
# Instruct CMake to run moc automatically when needed.
|
13 |
set(CMAKE_AUTOMOC ON) |
|
14 |
||
1091.1.12
by Gustavo Pichorim Boiko
Disable approver test on arm64. |
15 |
# just to make debug easier, print the system processor
|
16 |
message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}") |
|
17 |
||
753.2.2
by Gustavo Pichorim Boiko
Add the code to check for platform API back. |
18 |
# Check if should build using ubuntu platform api
|
817.1.1
by Ricardo Mendoza
Migrate to Platform API V2 |
19 |
check_include_file_cxx("ubuntu/application/init.h" USE_UBUNTU_PLATFORM_API) |
753.2.2
by Gustavo Pichorim Boiko
Add the code to check for platform API back. |
20 |
|
21 |
if (USE_UBUNTU_PLATFORM_API) |
|
22 |
add_definitions(-DUSE_UBUNTU_PLATFORM_API) |
|
23 |
endif (USE_UBUNTU_PLATFORM_API) |
|
24 |
||
722.2.1
by Gustavo Pichorim Boiko
Use the new contact service via QtContacts to match contacts in notification items. |
25 |
set(TELEPHONY_SERVICE_DIR ${CMAKE_INSTALL_DATADIR}/telephony-service) |
26 |
||
113.1.3
by Olivier Tilloy
Add install targets and allow running installed/uninstalled. |
27 |
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY) |
28 |
||
832.5.1
by Renato Araujo Oliveira Filho
Added uninstall rule. |
29 |
# uninstall target
|
30 |
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" |
|
31 |
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
32 |
IMMEDIATE @ONLY) |
|
33 |
add_custom_target(uninstall "${CMAKE_COMMAND}" |
|
34 |
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") |
|
35 |
||
413.6.1
by Gustavo Pichorim Boiko
Port the C++ part of the application executable target to Qt5. |
36 |
find_package(Qt5Contacts) |
37 |
find_package(Qt5DBus) |
|
713
by Gustavo Pichorim Boiko
Start removing the UI bits from the branch to keep it only for the service. |
38 |
#find_package(Qt5Gui)
|
573.1.1
by Gustavo Pichorim Boiko
Add basic ringtone support. |
39 |
find_package(Qt5Multimedia) |
413.6.1
by Gustavo Pichorim Boiko
Port the C++ part of the application executable target to Qt5. |
40 |
find_package(Qt5Qml) |
713
by Gustavo Pichorim Boiko
Start removing the UI bits from the branch to keep it only for the service. |
41 |
#find_package(Qt5Quick)
|
413.6.2
by Gustavo Pichorim Boiko
Finish the initial porting of C++ code to Qt5. |
42 |
find_package(Qt5Test) |
838.2.1
by Tiago Salem Herrmann
add support for vibration on incoming calls |
43 |
find_package(Qt5Feedback) |
1199.6.2
by Tiago Salem Herrmann
enable building against new tp-qt |
44 |
find_package(Qt5Network) |
805.3.1
by Renato Araujo Oliveira Filho
Implemented Telephony.PhoneNumber plugin. |
45 |
find_package(LibPhoneNumber REQUIRED) |
572.2.3
by Gustavo Pichorim Boiko
Fix the plugin installing. |
46 |
|
1123.5.1
by Tiago Salem Herrmann
Enable cross compiling |
47 |
include(qt5) |
572.2.3
by Gustavo Pichorim Boiko
Fix the plugin installing. |
48 |
|
1200.1.2
by Gustavo Pichorim Boiko
Disable QML tests on archs known to be broken |
49 |
option(SKIP_QML_TESTS "Skip QML tests" OFF) |
50 |
||
1123.5.1
by Tiago Salem Herrmann
Enable cross compiling |
51 |
if(NOT CMAKE_CROSSCOMPILING) |
52 |
find_program(QMAKE_EXECUTABLE qmake) |
|
53 |
if(QMAKE_EXECUTABLE STREQUAL "QMAKE_EXECUTABLE-NOTFOUND") |
|
54 |
message(FATAL_ERROR "qmake not found") |
|
55 |
endif() |
|
56 |
execute_process( |
|
57 |
COMMAND ${QMAKE_EXECUTABLE} -query QT_INSTALL_QML |
|
58 |
RESULT_VARIABLE RESULT |
|
59 |
OUTPUT_VARIABLE QT_INSTALL_QML |
|
60 |
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
61 |
)
|
|
62 |
if(NOT RESULT EQUAL 0) |
|
63 |
message(FATAL_ERROR "Failed to determine QT_INSTALL_QML from qmake") |
|
64 |
endif() |
|
65 |
else() |
|
66 |
# qmake isn't multi-arch aware as it installs arch-specific mkspec files
|
|
67 |
# in to /usr/share, so we can't use it here (we'd need a qmake binary
|
|
68 |
# for the host arch using data for the target arch)
|
|
69 |
set(QT_INSTALL_QML "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/qml") |
|
928.2.1
by Andreas Pokorny
sbuild fix |
70 |
endif() |
71 |
||
119.2.2
by Gustavo Pichorim Boiko
Add a CMakeFile.txt to install the plugin |
72 |
find_package(PkgConfig REQUIRED) |
413.6.1
by Gustavo Pichorim Boiko
Port the C++ part of the application executable target to Qt5. |
73 |
pkg_check_modules(TP_QT5 REQUIRED TelepathyQt5) |
185.8.1
by Ugo Riboni
Temporary commit while i move stuff between VMs |
74 |
pkg_check_modules(NOTIFY REQUIRED libnotify) |
470.3.6
by Gustavo Pichorim Boiko
Start adding messaging menu support to the approver. Right now it just adds |
75 |
pkg_check_modules(MESSAGING_MENU REQUIRED messaging-menu) |
745.1.1
by Ugo Riboni
Send updates to the infographics when receiving or sending a text message |
76 |
pkg_check_modules(UserMetrics REQUIRED libusermetricsinput-1) |
765.3.9
by Tiago Salem Herrmann
do not use hardcoded paths |
77 |
pkg_check_modules(HISTORY REQUIRED history-service) |
113.1.1
by Olivier Tilloy
Application to wrap the telephony prototype, along with CMake build file. |
78 |
|
413.6.2
by Gustavo Pichorim Boiko
Finish the initial porting of C++ code to Qt5. |
79 |
add_definitions(-DQT_NO_KEYWORDS) |
80 |
||
113.1.1
by Olivier Tilloy
Application to wrap the telephony prototype, along with CMake build file. |
81 |
include_directories( |
113.1.3
by Olivier Tilloy
Add install targets and allow running installed/uninstalled. |
82 |
${CMAKE_CURRENT_BINARY_DIR} |
194.4.6
by Tiago Salem Herrmann
add ${CMAKE_CURRENT_SOURCE_DIR} to CMakeLists.txt |
83 |
${CMAKE_CURRENT_SOURCE_DIR} |
119.2.15
by Gustavo Pichorim Boiko
Rename plugins to plugin to represent what it really is |
84 |
)
|
113.1.1
by Olivier Tilloy
Application to wrap the telephony prototype, along with CMake build file. |
85 |
|
1015.2.18
by Gustavo Pichorim Boiko
Fix coverage report support. |
86 |
# generate a macro to make it easier to enable coverage support on targets
|
87 |
function(ENABLE_COVERAGE) |
|
88 |
get_directory_property(COVERAGE_TARGETS DIRECTORY ${CMAKE_SOURCE_DIR} COVERAGE_TARGETS) |
|
89 |
list(APPEND COVERAGE_TARGETS ${ARGN}) |
|
90 |
MESSAGE(STATUS "Enabling coverage report for target(s): ${ARGN}") |
|
91 |
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY COVERAGE_TARGETS ${COVERAGE_TARGETS}) |
|
92 |
endfunction() |
|
93 |
||
350.2.1
by Florian Boucault
Add infrastructure for automated C++ tests. |
94 |
enable_testing() |
95 |
||
722.2.1
by Gustavo Pichorim Boiko
Use the new contact service via QtContacts to match contacts in notification items. |
96 |
add_definitions(-std=c++11) |
97 |
||
765.4.4
by Tiago Salem Herrmann
add ussd support on the indicator side |
98 |
set(DATA_DIR "${CMAKE_SOURCE_DIR}/data") |
722.2.1
by Gustavo Pichorim Boiko
Use the new contact service via QtContacts to match contacts in notification items. |
99 |
# install assets
|
100 |
set(ASSETS_DIR assets) |
|
101 |
install(DIRECTORY ${ASSETS_DIR} DESTINATION ${TELEPHONY_SERVICE_DIR}) |
|
102 |
||
717.2.3
by Gustavo Pichorim Boiko
Rename the static library to libtelephonyservice. |
103 |
add_subdirectory(libtelephonyservice) |
609.1.3
by Gustavo Pichorim Boiko
Rename the QML plugin from TelephonyApp to Ubuntu.PhoneApp. |
104 |
add_subdirectory(Ubuntu) |
625.1.11
by Gustavo Pichorim Boiko
Rename PhoneAppApprover and PhoneAppHandler folders to just approver and handler |
105 |
add_subdirectory(approver) |
106 |
add_subdirectory(handler) |
|
730.1.2
by Gustavo Pichorim Boiko
Create a new daemon to host the indicators and OSD to get that code out of the |
107 |
add_subdirectory(indicator) |
487.1.1
by Tiago Salem Herrmann
add csv2logger.py script to convert csv files into xml logger files. |
108 |
add_subdirectory(tools) |
413.6.2
by Gustavo Pichorim Boiko
Finish the initial porting of C++ code to Qt5. |
109 |
add_subdirectory(icons) |
649.5.2
by Gustavo Pichorim Boiko
Begin adding support for i18n and wrap strings in QML files to get translated. |
110 |
add_subdirectory(po) |
1015.2.1
by Gustavo Pichorim Boiko
Move all tests to one single directory in preparation for the new tests. |
111 |
add_subdirectory(tests) |
1064.3.4
by Gustavo Pichorim Boiko
Finish implementing dynamic protocol support loading. |
112 |
add_subdirectory(protocols) |
1015.2.18
by Gustavo Pichorim Boiko
Fix coverage report support. |
113 |
|
114 |
include(EnableCoverageReport) |
|
115 |
#####################################################################
|
|
116 |
# Enable code coverage calculation with gcov/gcovr/lcov
|
|
117 |
# Usage:
|
|
118 |
# * Switch build type to coverage (use ccmake or cmake-gui)
|
|
119 |
# * Invoke make, make test, make coverage
|
|
120 |
# * Find html report in subdir coveragereport
|
|
121 |
# * Find xml report feasible for jenkins in coverage.xml
|
|
122 |
#####################################################################
|
|
123 |
IF(CMAKE_BUILD_TYPE MATCHES [cC][oO][vV][eE][rR][aA][gG][eE]) |
|
124 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage -fprofile-arcs" ) |
|
125 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage -fprofile-arcs" ) |
|
126 |
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -coverage" ) |
|
127 |
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -coverage" ) |
|
128 |
GET_DIRECTORY_PROPERTY(COVERAGE_TARGETS DIRECTORY ${CMAKE_SOURCE_DIR} COVERAGE_TARGETS) |
|
129 |
ENABLE_COVERAGE_REPORT(TARGETS ${COVERAGE_TARGETS}) |
|
130 |
ENDIF(CMAKE_BUILD_TYPE MATCHES [cC][oO][vV][eE][rR][aA][gG][eE]) |
|
131 |