Merge lp:~sergiusens/ubuntu-calendar-app/cmake into lp:ubuntu-calendar-app

Proposed by Sergio Schvezov
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 184
Merged at revision: 184
Proposed branch: lp:~sergiusens/ubuntu-calendar-app/cmake
Merge into: lp:ubuntu-calendar-app
Diff against target: 267 lines (+131/-34)
14 files modified
CMakeLists.txt (+57/-0)
calendar-app.in (+3/-2)
click/CMakeLists.txt (+8/-0)
click/manifest.json.in (+14/-7)
com.ubuntu.calendar_calendar.desktop.in (+3/-3)
debian/calendar-app-autopilot.install (+2/-1)
debian/calendar-app.install (+2/-5)
debian/changelog (+6/-0)
debian/control (+2/-1)
debian/rules (+0/-13)
po/CMakeLists.txt (+25/-0)
tests/CMakeLists.txt (+1/-0)
tests/autopilot/CMakeLists.txt (+8/-0)
tests/autopilot/calendar_app/tests/__init__.py (+0/-2)
To merge this branch: bzr merge lp:~sergiusens/ubuntu-calendar-app/cmake
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nicholas Skaggs Pending
Ubuntu Calendar Developers Pending
Review via email: mp+202623@code.launchpad.net

Commit message

cmake rules for common building

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
184. By Sergio Schvezov

Adding cmake to build deps

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Looks good.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'CMakeLists.txt'
--- CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ CMakeLists.txt 2014-01-22 10:19:10 +0000
@@ -0,0 +1,57 @@
1project(com.ubuntu.calendar)
2cmake_minimum_required(VERSION 2.8.9)
3
4# Standard install paths
5include(GNUInstallDirs)
6
7option(INSTALL_TESTS "Install the tests on make install" on)
8option(CLICK_MODE "Installs to a contained location" off)
9
10set(APP_NAME calendar)
11set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")
12set(MAIN_QML calendar.qml)
13set(ICON calendar64.png)
14set(AUTOPILOT_DIR calendar_app)
15set(APP_HARDCODE calendar-app)
16
17if(CLICK_MODE)
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 /)
24 set(DATA_DIR /)
25 set(EXEC "qmlscene %u ${MAIN_QML}")
26 set(DESKTOP_DIR ${DATA_DIR})
27else(CLICK_MODE)
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)
36endif(CLICK_MODE)
37
38file(GLOB_RECURSE I18N_SRC_FILES
39 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
40 rc/**.qml desktop/**.desktop.in)
41list(SORT I18N_SRC_FILES)
42
43
44file(GLOB SRC_FILES
45 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
46 *.qml *.js *.png *.js)
47install(FILES ${SRC_FILES} DESTINATION ${DATA_DIR})
48
49configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
50install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} DESTINATION ${DESKTOP_DIR})
51
52# Tests
53enable_testing()
54
55add_subdirectory(click)
56add_subdirectory(po)
57add_subdirectory(tests)
058
=== removed directory 'apparmor'
=== renamed file 'calendar-app' => 'calendar-app.in' (properties changed: +x to -x)
--- calendar-app 2013-06-12 15:23:13 +0000
+++ calendar-app.in 2014-01-22 10:19:10 +0000
@@ -1,2 +1,3 @@
1#!/bin/bash1#!/bin/sh
2qmlscene /usr/share/calendar-app/calendar.qml2export QT_SELECT=qt5
3qmlscene @CMAKE_INSTALL_PREFIX@/@DATA_DIR@/@MAIN_QML@
34
=== added directory 'click'
=== added file 'click/CMakeLists.txt'
--- click/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ click/CMakeLists.txt 2014-01-22 10:19:10 +0000
@@ -0,0 +1,8 @@
1if(CLICK_MODE)
2 if(NOT BZR_REVNO)
3 set(BZR_REVNO "latest")
4 endif(NOT BZR_REVNO)
5 configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
6 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json apparmor.json
7 DESTINATION ${CMAKE_INSTALL_PREFIX})
8endif(CLICK_MODE)
09
=== renamed file 'apparmor/calendar.json' => 'click/apparmor.json'
=== renamed file 'manifest.json' => 'click/manifest.json.in'
--- manifest.json 2013-10-17 06:29:12 +0000
+++ click/manifest.json.in 2014-01-22 10:19:10 +0000
@@ -2,14 +2,21 @@
2 "description": "Calendar application for Ubuntu devices",2 "description": "Calendar application for Ubuntu devices",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-13.10",
4 "hooks": {4 "hooks": {
5 "calendar": {5 "@APP_NAME@": {
6 "apparmor": "apparmor/calendar.json",6 "apparmor": "apparmor.json",
7 "desktop": "calendar-app.desktop"7 "desktop": "@DESKTOP_FILE@"
8 }8 }
9 },9 },
10 "icon": "calendar64.png",10 "icon": "@ICON@",
11 "maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",11 "maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",
12 "name": "com.ubuntu.calendar",12 "name": "@PROJECT_NAME@",
13 "title": "calendar",13 "title": "Calendar",
14 "version": "0.4"14 "version": "0.4.@BZR_REVNO@",
15 "x-source": {
16 "vcs-bzr": "@BZR_SOURCE@",
17 "vcs-bzr-revno": "@BZR_REVNO@"
18 },
19 "x-test": {
20 "autopilot": "@AUTOPILOT_DIR@"
21 }
15}22}
1623
=== renamed file 'calendar-app.desktop' => 'com.ubuntu.calendar_calendar.desktop.in'
--- calendar-app.desktop 2013-10-16 18:43:17 +0000
+++ com.ubuntu.calendar_calendar.desktop.in 2014-01-22 10:19:10 +0000
@@ -2,9 +2,9 @@
2Version=1.02Version=1.0
3Type=Application3Type=Application
4Terminal=false4Terminal=false
5Exec=qmlscene %u /usr/share/calendar-app/calendar.qml5Exec=@EXEC@
6Icon=/usr/share/calendar-app/calendar64.png6Icon=@ICON@
7Name=Calendar7Name=Calendar
8X-Ubuntu-Touch=true8X-Ubuntu-Touch=true
9X-Ubuntu-StageHint=SideStage9X-Ubuntu-StageHint=SideStage
10X-Ubuntu-Gettext-Domain=com.ubuntu.calendar10X-Ubuntu-Gettext-Domain=@PROJECT_NAME@
1111
=== modified file 'debian/calendar-app-autopilot.install'
--- debian/calendar-app-autopilot.install 2013-06-12 15:47:15 +0000
+++ debian/calendar-app-autopilot.install 2014-01-22 10:19:10 +0000
@@ -1,1 +1,2 @@
1tests/autopilot/calendar_app/* usr/lib/python2.7/dist-packages/calendar_app/1usr/lib/*/dist-packages/calendar_app/*
2
23
=== modified file 'debian/calendar-app.install'
--- debian/calendar-app.install 2013-06-12 15:23:13 +0000
+++ debian/calendar-app.install 2014-01-22 10:19:10 +0000
@@ -1,5 +1,2 @@
1calendar-app usr/bin/1usr/bin/*
2calendar-app.desktop usr/share/applications/2usr/share/*
3*.qml usr/share/calendar-app/
4*.png usr/share/calendar-app/
5*.js usr/share/calendar-app/
63
=== modified file 'debian/changelog'
--- debian/changelog 2013-06-12 15:32:14 +0000
+++ debian/changelog 2014-01-22 10:19:10 +0000
@@ -1,3 +1,9 @@
1calendar-app (0.4ubuntu1) UNRELEASED; urgency=medium
2
3 * Adding cmake
4
5 -- Sergio Schvezov <sergio.schvezov@canonical.com> Sat, 18 Jan 2014 17:05:03 -0300
6
1calendar-app (0.4) raring; urgency=low7calendar-app (0.4) raring; urgency=low
28
3 * Renamed package9 * Renamed package
410
=== modified file 'debian/control'
--- debian/control 2013-10-25 04:07:59 +0000
+++ debian/control 2014-01-22 10:19:10 +0000
@@ -1,7 +1,8 @@
1Source: calendar-app1Source: calendar-app
2Priority: extra2Priority: extra
3Maintainer: Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>3Maintainer: Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>
4Build-Depends: debhelper (>= 9), 4Build-Depends: cmake,
5 debhelper (>= 9),
5 qtdeclarative5-dev-tools,6 qtdeclarative5-dev-tools,
6 qt5-default,7 qt5-default,
7 qtdeclarative5-qtquick2-plugin,8 qtdeclarative5-qtquick2-plugin,
89
=== modified file 'debian/rules'
--- debian/rules 2013-10-16 18:43:17 +0000
+++ debian/rules 2014-01-22 10:19:10 +0000
@@ -9,16 +9,3 @@
99
10override_dh_auto_test:10override_dh_auto_test:
11 QT_QPA_PLATFORM=minimal qmltestrunner -input tests/unittests/11 QT_QPA_PLATFORM=minimal qmltestrunner -input tests/unittests/
12
13override_dh_install:
14 dh_install --fail-missing
15 appname=com.ubuntu.calendar; \
16 for pofile in $(shell find ./po -name "*.po"); do \
17 pofilename="$${pofile##*/}"; \
18 langcode="$${pofilename%.*}"; \
19 localedir="usr/share/locale/$$langcode/LC_MESSAGES"; \
20 mofile="$$appname.mo"; \
21 msgfmt -o $$mofile $$pofile; \
22 dh_install $$mofile $$localedir; \
23 rm -f $$mofile; \
24 done
2512
=== added file 'po/CMakeLists.txt'
--- po/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ po/CMakeLists.txt 2014-01-22 10:19:10 +0000
@@ -0,0 +1,25 @@
1include(FindGettext)
2find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
3
4set(DOMAIN ${PROJECT_NAME})
5set(POT_FILE ${DOMAIN}.pot)
6file(GLOB PO_FILES *.po)
7
8add_custom_target(${POT_FILE}
9 COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE} -o ${POT_FILE}
10 -D ${CMAKE_SOURCE_DIR}
11 --from-code=UTF-8
12 --c++ --qt --add-comments=TRANSLATORS
13 --keyword=tr --keyword=tr:1,2
14 --package-name='${PROJECT}'
15 --copyright-holder='Canonical Ltd.'
16 ${I18N_SRC_FILES})
17
18foreach(PO_FILE ${PO_FILES})
19 get_filename_component(LANG ${PO_FILE} NAME_WE)
20 gettext_process_po_files(${LANG} ALL PO_FILES ${PO_FILE})
21 set(INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES)
22 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo
23 DESTINATION ${INSTALL_DIR}
24 RENAME ${DOMAIN}.mo)
25endforeach(PO_FILE)
026
=== added file 'tests/CMakeLists.txt'
--- tests/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ tests/CMakeLists.txt 2014-01-22 10:19:10 +0000
@@ -0,0 +1,1 @@
1add_subdirectory(autopilot)
02
=== added file 'tests/autopilot/CMakeLists.txt'
--- tests/autopilot/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ tests/autopilot/CMakeLists.txt 2014-01-22 10:19:10 +0000
@@ -0,0 +1,8 @@
1if(INSTALL_TESTS)
2execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
3 OUTPUT_VARIABLE PYTHON_PACKAGE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
4
5install(DIRECTORY ${AUTOPILOT_DIR}
6 DESTINATION ${PYTHON_PACKAGE_DIR}
7 )
8endif(INSTALL_TESTS)
09
=== modified file 'tests/autopilot/calendar_app/tests/__init__.py'
--- tests/autopilot/calendar_app/tests/__init__.py 2013-11-15 16:30:52 +0000
+++ tests/autopilot/calendar_app/tests/__init__.py 2014-01-22 10:19:10 +0000
@@ -80,8 +80,6 @@
80 self.app = self.launch_test_application(80 self.app = self.launch_test_application(
81 "qmlscene",81 "qmlscene",
82 self.installed_location,82 self.installed_location,
83 "--desktop_file_hint=/usr/share/applications/"
84 "calendar-app.desktop",
85 app_type='qt',83 app_type='qt',
86 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)84 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
8785

Subscribers

People subscribed via source and target branches

to status/vote changes: