1
project(com.ubuntu.calendar)
2
cmake_minimum_required(VERSION 2.8.9)
4
# Standard install paths
5
include(GNUInstallDirs)
7
option(INSTALL_TESTS "Install the tests on make install" on)
8
option(CLICK_MODE "Installs to a contained location" off)
10
set(APP_NAME calendar)
11
set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")
12
set(MAIN_QML calendar.qml)
13
set(ICON calendar64.png)
14
set(AUTOPILOT_DIR calendar_app)
15
set(APP_HARDCODE calendar-app)
18
if(NOT DEFINED BZR_SOURCE)
19
set(BZR_SOURCE "lp:ubuntu-${APP_HARDCODE}")
20
message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
21
endif(NOT DEFINED BZR_SOURCE)
22
set(CMAKE_INSTALL_PREFIX /)
23
set(CMAKE_INSTALL_BINDIR /)
25
set(EXEC "qmlscene %u ${MAIN_QML}")
26
set(DESKTOP_DIR ${DATA_DIR})
28
set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
29
set(EXEC ${APP_HARDCODE})
30
set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON})
31
configure_file(${APP_HARDCODE}.in
32
${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE})
33
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}
34
DESTINATION ${CMAKE_INSTALL_BINDIR})
35
set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
38
file(GLOB_RECURSE I18N_SRC_FILES
39
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
40
rc/**.qml desktop/**.desktop.in)
41
list(SORT I18N_SRC_FILES)
45
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
46
*.qml *.js *.png *.js)
47
install(FILES ${SRC_FILES} DESTINATION ${DATA_DIR})
49
configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
50
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} DESTINATION ${DESKTOP_DIR})
55
add_subdirectory(click)
57
add_subdirectory(tests)