Merge lp:~sergiusens/reminders-app/cmake_common into lp:reminders-app

Proposed by Sergio Schvezov
Status: Merged
Approved by: Michael Zanetti
Approved revision: 29
Merged at revision: 29
Proposed branch: lp:~sergiusens/reminders-app/cmake_common
Merge into: lp:reminders-app
Diff against target: 278 lines (+137/-32)
14 files modified
CMakeLists.txt (+63/-3)
click/CMakeLists.txt (+8/-0)
click/manifest.json.in (+14/-7)
com.ubuntu.reminders_reminders.desktop.in (+3/-3)
debian/changelog (+6/-0)
debian/reminders-app-autopilot.install (+1/-1)
debian/reminders-app.install (+3/-5)
debian/rules (+0/-10)
po/CMakeLists.txt (+25/-0)
reminders-app.in (+3/-2)
src/app/CMakeLists.txt (+2/-0)
src/plugin/Evernote/CMakeLists.txt (+0/-1)
tests/CMakeLists.txt (+1/-0)
tests/autopilot/CMakeLists.txt (+8/-0)
To merge this branch: bzr merge lp:~sergiusens/reminders-app/cmake_common
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Needs Fixing
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+202215@code.launchpad.net

Commit message

Adding common cmake targets

Description of the change

You can use click-buddy[1] on the target arch to get a package built.

[1] https://code.launchpad.net/~sergiusens/phablet-tools/click-buddy/+merge/202178

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: Approve (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) :
review: Approve
Revision history for this message
Michael Zanetti (mzanetti) wrote :

This breaks lots of stuff. And only partially renames reminders-app to reminders.

Why don't you use the existing .desktop filename?

I don't see any advantage in generating all that stuff with cmake.

review: Disapprove
Revision history for this message
Michael Zanetti (mzanetti) wrote :

ah ok... now I see why the desktop file is generated. still, please complete the renaming or leave stuff to reminders-app

review: Needs Fixing
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

> This breaks lots of stuff. And only partially renames reminders-app to
> reminders.

Aside from applicationName, where else is it missing?

> Why don't you use the existing .desktop filename?
>
> I don't see any advantage in generating all that stuff with cmake.

The advantage is that we don't have hard coded strings all over the place

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

> ah ok... now I see why the desktop file is generated. still, please complete
> the renaming or leave stuff to reminders-app

This is a soft blocker for the store, at least under the com.ubuntu namespace where all the -app's have been stripped.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-12-18 00:30:17 +0000
+++ CMakeLists.txt 2014-01-19 14:04:19 +0000
@@ -1,10 +1,70 @@
1project(com.ubuntu.reminders C CXX)
1cmake_minimum_required(VERSION 2.8.9)2cmake_minimum_required(VERSION 2.8.9)
23
3project(reminders-app C CXX)
4
5set(CMAKE_AUTOMOC ON)4set(CMAKE_AUTOMOC ON)
6
7set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra -fPIC")5set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra -fPIC")
86
7# Standard install paths
8include(GNUInstallDirs)
9
10# components PATH
11execute_process(
12 COMMAND qmake -query QT_INSTALL_QML
13 OUTPUT_VARIABLE QT_IMPORTS_DIR
14 OUTPUT_STRIP_TRAILING_WHITESPACE
15)
16
17option(INSTALL_TESTS "Install the tests on make install" on)
18option(CLICK_MODE "Installs to a contained location" off)
19
20set(APP_NAME reminders)
21set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")
22set(ICON ${APP_NAME}.png)
23set(AUTOPILOT_DIR reminders_app)
24set(APP_HARDCODE reminders-app)
25set(MAIN_QML ${APP_HARDCODE}.qml)
26
27if(CLICK_MODE)
28 if(NOT DEFINED BZR_SOURCE)
29 set(BZR_SOURCE "lp:${APP_HARDCODE}")
30 message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
31 endif(NOT DEFINED BZR_SOURCE)
32 STRING(REPLACE "/usr/" "/" QT_IMPORTS_DIR ${QT_IMPORTS_DIR})
33 set(CMAKE_INSTALL_PREFIX /)
34 set(CMAKE_INSTALL_BINDIR /)
35 set(DATA_DIR /)
36 set(EXEC "qmlscene $@ -I .${QT_IMPORTS_DIR} qml/${MAIN_QML}")
37 set(DESKTOP_DIR ${DATA_DIR})
38else(CLICK_MODE)
39 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
40 configure_file(${APP_HARDCODE}.in
41 ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE})
42 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}
43 DESTINATION ${CMAKE_INSTALL_BINDIR})
44 set(EXEC "qmlscene $@ ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/qml/${MAIN_QML}")
45 set(ICON "${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON}")
46 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
47endif(CLICK_MODE)
48
49file(GLOB_RECURSE I18N_SRC_FILES
50 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
51 rc/**.qml desktop/**.desktop.in)
52list(SORT I18N_SRC_FILES)
53
54
55file(GLOB SRC_FILES
56 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
57 *.qml *.js *.png *.js)
58install(FILES ${SRC_FILES} DESTINATION ${DATA_DIR})
59
60configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
61install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} DESTINATION ${DESKTOP_DIR})
62
63# Tests
64enable_testing()
65
66add_subdirectory(click)
67add_subdirectory(po)
68add_subdirectory(tests)
9add_subdirectory(3rdParty)69add_subdirectory(3rdParty)
10add_subdirectory(src)70add_subdirectory(src)
1171
=== removed directory 'apparmor'
=== added directory 'click'
=== added file 'click/CMakeLists.txt'
--- click/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ click/CMakeLists.txt 2014-01-19 14:04:19 +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/reminders-app.json' => 'click/apparmor.json'
=== renamed file 'manifest.json' => 'click/manifest.json.in'
--- manifest.json 2013-11-22 21:43:05 +0000
+++ click/manifest.json.in 2014-01-19 14:04:19 +0000
@@ -1,15 +1,22 @@
1{1{
2 "description": "description of reminders-app",2 "description": "Ubuntu Reminders app, powered by Evernote",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-13.10",
4 "architecture": "armhf",4 "architecture": "armhf",
5 "hooks": {5 "hooks": {
6 "reminders-app": {6 "@APP_NAME@": {
7 "apparmor": "reminders-app.json",7 "apparmor": "apparmor.json",
8 "desktop": "reminders-app.desktop"8 "desktop": "@DESKTOP_FILE@"
9 }9 }
10 },10 },
11 "maintainer": "Ubuntu Reminders app developers <ubuntu-phone@lists.launchpad.net>",11 "maintainer": "Ubuntu Reminders app developers <ubuntu-phone@lists.launchpad.net>",
12 "name": "com.ubuntu.reminders-app",12 "name": "@PROJECT_NAME@",
13 "title": "reminders-app",13 "title": "Reminders",
14 "version": "0.1"14 "version": "0.1.@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 'reminders-app.desktop' => 'com.ubuntu.reminders_reminders.desktop.in'
--- reminders-app.desktop 2014-01-15 15:26:46 +0000
+++ com.ubuntu.reminders_reminders.desktop.in 2014-01-19 14:04:19 +0000
@@ -1,9 +1,9 @@
1[Desktop Entry]1[Desktop Entry]
2Name=Reminders2Name=Reminders
3Comment=Ubuntu Reminders app, powered by Evernote3Comment=Ubuntu Reminders app, powered by Evernote
4Exec=qmlscene $@ -I . qml/reminders-app.qml4Exec=@EXEC@
5Icon=reminders-app.png5Icon=@ICON@
6Terminal=false6Terminal=false
7Type=Application7Type=Application
8X-Ubuntu-Touch=true8X-Ubuntu-Touch=true
9X-Ubuntu-Gettext-Domain=com.ubuntu.reminders-app9X-Ubuntu-Gettext-Domain=@PROJECT_NAME@
1010
=== modified file 'debian/changelog'
--- debian/changelog 2013-11-26 11:20:25 +0000
+++ debian/changelog 2014-01-19 14:04:19 +0000
@@ -1,3 +1,9 @@
1reminders-app (0.2ubuntu1) UNRELEASED; urgency=medium
2
3 * Adding common cmake.
4
5 -- Sergio Schvezov <sergio.schvezov@canonical.com> Sun, 19 Jan 2014 10:30:23 -0300
6
1reminders-app (0.2) saucy; urgency=low7reminders-app (0.2) saucy; urgency=low
28
3 * Added authentication plugin dependencies, bumped package version9 * Added authentication plugin dependencies, bumped package version
410
=== modified file 'debian/reminders-app-autopilot.install'
--- debian/reminders-app-autopilot.install 2013-11-20 22:38:24 +0000
+++ debian/reminders-app-autopilot.install 2014-01-19 14:04:19 +0000
@@ -1,1 +1,1 @@
1tests/autopilot/reminders_app/* usr/lib/python2.7/dist-packages/reminders_app/1usr/lib/*/dist-packages/reminders_app/
22
=== modified file 'debian/reminders-app.install'
--- debian/reminders-app.install 2013-11-22 19:10:05 +0000
+++ debian/reminders-app.install 2014-01-19 14:04:19 +0000
@@ -1,5 +1,3 @@
1reminders-app usr/bin/1usr/bin/*
2reminders-app.desktop usr/share/applications/2usr/lib/*/qt5/*
3src/app/qml/ usr/share/reminders-app/3usr/share/*
4*.png usr/share/reminders-app/
5usr/lib/*/qt5/qml/Evernote/
64
=== modified file 'debian/rules'
--- debian/rules 2013-11-20 22:38:24 +0000
+++ debian/rules 2014-01-19 14:04:19 +0000
@@ -9,13 +9,3 @@
99
10override_dh_install: 10override_dh_install:
11 dh_install --fail-missing11 dh_install --fail-missing
12 appname=com.ubuntu.reminders-app; \
13 debname=reminders-app; \
14 for pofile in $(shell find ./po -name "*.po"); do \
15 pofilename="$${pofile##*/}"; \
16 langcode="$${pofilename%.*}"; \
17 localedir="debian/$$debname/usr/share/locale/$$langcode/LC_MESSAGES"; \
18 mkdir -p $$localedir; \
19 mofile="$$localedir/$$appname.mo"; \
20 msgfmt -o $$mofile $$pofile; \
21 done
2212
=== added file 'po/CMakeLists.txt'
--- po/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ po/CMakeLists.txt 2014-01-19 14:04:19 +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
=== renamed file 'reminders-app' => 'reminders-app.in'
--- reminders-app 2013-11-22 19:10:05 +0000
+++ reminders-app.in 2014-01-19 14:04:19 +0000
@@ -1,2 +1,3 @@
1#!/bin/bash1#!/bin/sh
2qmlscene /usr/share/reminders-app/qml/reminders-app.qml2export QT_SELECT=qt5
3qmlscene @CMAKE_INSTALL_PREFIX@/@DATA_DIR@/@MAIN_QML@
34
=== renamed file 'reminders-app.png' => 'reminders.png'
=== modified file 'src/app/CMakeLists.txt'
--- src/app/CMakeLists.txt 2013-12-18 00:30:17 +0000
+++ src/app/CMakeLists.txt 2014-01-19 14:04:19 +0000
@@ -13,3 +13,5 @@
13 COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/qml ${CMAKE_CURRENT_BINARY_DIR}13 COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/qml ${CMAKE_CURRENT_BINARY_DIR}
14 DEPENDS ${QMLFILES}14 DEPENDS ${QMLFILES}
15)15)
16
17install(DIRECTORY qml DESTINATION ${DATA_DIR})
1618
=== modified file 'src/plugin/Evernote/CMakeLists.txt'
--- src/plugin/Evernote/CMakeLists.txt 2013-12-18 23:48:12 +0000
+++ src/plugin/Evernote/CMakeLists.txt 2014-01-19 14:04:19 +0000
@@ -47,7 +47,6 @@
47)47)
4848
49# Install plugin file49# Install plugin file
50exec_program(qmake ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE QT_IMPORTS_DIR)
51install(TARGETS evernoteplugin DESTINATION ${QT_IMPORTS_DIR}/Evernote/)50install(TARGETS evernoteplugin DESTINATION ${QT_IMPORTS_DIR}/Evernote/)
52install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/Evernote/)51install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/Evernote/)
5352
5453
=== added file 'tests/CMakeLists.txt'
--- tests/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ tests/CMakeLists.txt 2014-01-19 14:04:19 +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-19 14:04:19 +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)

Subscribers

People subscribed via source and target branches