14.1.4
by Nekhelesh Ramananthan
Fixed missing desktop icon path and also renamed application name to Clock reboot to distuinguish on the phone |
1 |
project(com.ubuntu.clock.devel C CXX) |
1
by Nekhelesh Ramananthan
Initial commit of files |
2 |
cmake_minimum_required(VERSION 2.8.9) |
3 |
||
4 |
set (UBUNTU_PROJECT_TYPE "ClickApp" CACHE INTERNAL "Tells QtCreator this is a Click application project") |
|
5 |
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") |
|
20.3.1
by Michael Zanetti
explicitly enable C++11, be more strict with warnings |
6 |
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra") |
1
by Nekhelesh Ramananthan
Initial commit of files |
7 |
|
8 |
find_package(Qt5Core) |
|
9 |
find_package(Qt5Qml) |
|
10 |
find_package(Qt5Quick) |
|
23.1.7
by Nekhelesh Ramananthan
Slight improved situation. Able to connect to dbus, but unable to find service |
11 |
find_package(Qt5DBus) |
1
by Nekhelesh Ramananthan
Initial commit of files |
12 |
#find_package(ubuntu-sdk-libs)
|
13 |
||
14 |
#automatically create moc files
|
|
15 |
set(CMAKE_AUTOMOC ON) |
|
16 |
||
17 |
option(INSTALL_TESTS "Install the tests on make install" on) |
|
14.1.1
by Nekhelesh Ramananthan
Almost fixed click packaging |
18 |
option(CLICK_MODE "Build as a click package" on) |
1
by Nekhelesh Ramananthan
Initial commit of files |
19 |
|
20 |
set(APP_NAME clock) |
|
21 |
set(APP_HARDCODE ubuntu-clock-app) |
|
22 |
set(MAIN_QML ${APP_HARDCODE}.qml) |
|
14.1.4
by Nekhelesh Ramananthan
Fixed missing desktop icon path and also renamed application name to Clock reboot to distuinguish on the phone |
23 |
set(ICON clock-app@30.png) |
1
by Nekhelesh Ramananthan
Initial commit of files |
24 |
|
25 |
#set install paths
|
|
14.1.1
by Nekhelesh Ramananthan
Almost fixed click packaging |
26 |
if(${CLICK_MODE}) |
27 |
set(CMAKE_INSTALL_PREFIX /) |
|
28 |
set(DATA_DIR /) |
|
29 |
set(DESKTOP_DIR ${DATA_DIR}) |
|
30 |
set(UBUNTU-CLOCK-APP_DIR "share/qml/ubuntu-clock-app") |
|
14.1.4
by Nekhelesh Ramananthan
Fixed missing desktop icon path and also renamed application name to Clock reboot to distuinguish on the phone |
31 |
set(ICON "${UBUNTU-CLOCK-APP_DIR}/${ICON}") |
14.1.1
by Nekhelesh Ramananthan
Almost fixed click packaging |
32 |
|
33 |
execute_process( |
|
34 |
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH |
|
35 |
OUTPUT_VARIABLE ARCH_TRIPLET |
|
36 |
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
37 |
)
|
|
38 |
set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}") |
|
39 |
else() |
|
40 |
set(DATA_DIR "share/clockapp") |
|
41 |
set(DESKTOP_DIR ${DATA_DIR}) |
|
14.1.4
by Nekhelesh Ramananthan
Fixed missing desktop icon path and also renamed application name to Clock reboot to distuinguish on the phone |
42 |
set(ICON "${DATA_DIR}/${ICON}") |
14.1.1
by Nekhelesh Ramananthan
Almost fixed click packaging |
43 |
set(UBUNTU-CLOCK-APP_DIR "share/ubuntu-clock-app/qml") |
44 |
include(GNUInstallDirs) |
|
45 |
set(QT_IMPORTS_DIR "${CMAKE_INSTALL_LIBDIR}") |
|
46 |
endif() |
|
1
by Nekhelesh Ramananthan
Initial commit of files |
47 |
|
48 |
set(EXEC "qmlscene $@ ${UBUNTU-CLOCK-APP_DIR}/${MAIN_QML}") |
|
49 |
||
14.1.1
by Nekhelesh Ramananthan
Almost fixed click packaging |
50 |
if(${CLICK_MODE}) |
51 |
install(FILES manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX}) |
|
52 |
endif() |
|
1
by Nekhelesh Ramananthan
Initial commit of files |
53 |
install(DIRECTORY "app/graphics" DESTINATION ${DATA_DIR}) |
8.3.1
by Victor Thompson
* Fix CMakeLists.txt for apparmor file |
54 |
install(FILES "${APP_HARDCODE}.json" DESTINATION ${DATA_DIR}) |
1
by Nekhelesh Ramananthan
Initial commit of files |
55 |
|
56 |
add_subdirectory(app) |
|
57 |
add_subdirectory(backend) |
|
58 |
||
59 |
add_custom_target("autopilot" chmod +x ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run |
|
60 |
COMMAND ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run |
|
23.1.20
by Nekhelesh Ramananthan
Made plugin naming more consistent |
61 |
DEPENDS timezone timezone-qmldir alarmsettings alarmsettings-qmldir |
1
by Nekhelesh Ramananthan
Initial commit of files |
62 |
WORKING_DIRECTORY ./app) |
63 |
||
14.1.1
by Nekhelesh Ramananthan
Almost fixed click packaging |
64 |
enable_testing() |
65 |
add_test(NAME basic |
|
66 |
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/app |
|
67 |
COMMAND /usr/bin/qmltestrunner -input ${CMAKE_SOURCE_DIR}/app/tests/unit -import ${CMAKE_BINARY_DIR}/backend |
|
68 |
)
|
|
1
by Nekhelesh Ramananthan
Initial commit of files |
69 |
|
70 |
add_custom_target("run" /usr/bin/qmlscene -I ${CMAKE_BINARY_DIR}/backend ${CMAKE_SOURCE_DIR}/app/ubuntu-clock-app.qml |
|
23.1.20
by Nekhelesh Ramananthan
Made plugin naming more consistent |
71 |
DEPENDS timezone timezone-qmldir alarmsettings alarmsettings-qmldir |
1
by Nekhelesh Ramananthan
Initial commit of files |
72 |
WORKING_DIRECTORY ./app) |