Merge lp:~dpm/ubuntu-docviewer-app/cmake-fixes into lp:ubuntu-docviewer-app/trunk

Proposed by David Planella
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 32
Merged at revision: 30
Proposed branch: lp:~dpm/ubuntu-docviewer-app/cmake-fixes
Merge into: lp:ubuntu-docviewer-app/trunk
Diff against target: 143 lines (+42/-31)
5 files modified
CMakeLists.txt (+30/-18)
com.ubuntu.docviewer.desktop.in.in (+2/-3)
docviewer.apparmor (+1/-1)
manifest.json.in (+8/-8)
ubuntu-docviewer-app.qml (+1/-1)
To merge this branch: bzr merge lp:~dpm/ubuntu-docviewer-app/cmake-fixes
Reviewer Review Type Date Requested Status
Andrew Hayzen (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+235774@code.launchpad.net

Commit message

Some cmake fixes for the app to build from Qt Creator or plain cmake.

Description of the change

Some cmake fixes for the app to build from Qt Creator or plain cmake.

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
Andrew Hayzen (ahayzen) wrote :

Awesome, managed to build and review a click package inside qtcreator and with click-buddy.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-09-17 16:32:46 +0000
+++ CMakeLists.txt 2014-09-24 09:47:51 +0000
@@ -10,36 +10,48 @@
10option(CLICK_MODE "Installs to a contained location" on)10option(CLICK_MODE "Installs to a contained location" on)
1111
12set(APP_NAME docviewer)12set(APP_NAME docviewer)
13set(DESKTOP_FILE "ubuntu-docviewer-app.desktop")13set(DESKTOP_FILE "${PROJECT_NAME}.desktop")
14#set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")14#set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")
15set(MAIN_QML ubuntu-docviewer-app.qml)15set(MAIN_QML ubuntu-docviewer-app.qml)
16set(ICON_FILE docviewer@30.png)16set(ICON_FILE docviewer@30.png)
17set(AUTOPILOT_DIR ubuntu_docviewer_app)17set(AUTOPILOT_DIR ubuntu_docviewer_app)
18set(APP_HARDCODE docviewer-app)18set(APP_HARDCODE docviewer-app)
19set(UBUNTU_MANIFEST_PATH "manifest.json" CACHE INTERNAL "Relative path to the manifest file")19set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
2020
21if(CLICK_MODE)21if(CLICK_MODE)
22 if(NOT DEFINED BZR_SOURCE)22 if(NOT DEFINED BZR_SOURCE)
23 set(BZR_SOURCE "lp:ubuntu-${APP_HARDCODE}")23 set(BZR_SOURCE "lp:ubuntu-${APP_HARDCODE}")
24 message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")24 message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
25 endif(NOT DEFINED BZR_SOURCE)25 endif(NOT DEFINED BZR_SOURCE)
26 if(NOT BZR_REVNO)
27 set(BZR_REVNO "latest")
28 endif(NOT BZR_REVNO)
26 set(CMAKE_INSTALL_PREFIX /)29 set(CMAKE_INSTALL_PREFIX /)
27 set(CMAKE_INSTALL_BINDIR /)30 set(CMAKE_INSTALL_BINDIR /)
28 set(DATA_DIR /)31 set(DATA_DIR /)
29 set (ICON ${ICON_FILE})32 set (ICON ${ICON_FILE})
30 set(EXEC "qmlscene %u ${MAIN_QML}")33 set(EXEC "qmlscene %u ${MAIN_QML}")
31 set(DESKTOP_DIR ${DATA_DIR})34 set(DESKTOP_DIR ${DATA_DIR})
32 set(URLS_DIR ${DATA_DIR})35 set(URLS_DIR ${DATA_DIR})
36 configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
37 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json docviewer.apparmor
38 DESTINATION ${CMAKE_INSTALL_PREFIX})
39 # Make the click files visible in Qt Creator
40 file(GLOB CLICK_FILES
41 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
42 *.json *.json.in *.apparmor)
43
44 add_custom_target(com_ubuntu_shorts_CLICKFiles ALL SOURCES ${CLICK_FILES})
33else(CLICK_MODE)45else(CLICK_MODE)
34 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/ubuntu-${APP_HARDCODE})46 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/ubuntu-${APP_HARDCODE})
35 set(EXEC ${APP_HARDCODE})47 set(EXEC ${APP_HARDCODE})
36 set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE})48 set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE})
37 configure_file(${APP_HARDCODE}.in49 configure_file(${APP_HARDCODE}.in
38 ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE})50 ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE})
39 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}51 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}
40 DESTINATION ${CMAKE_INSTALL_BINDIR})52 DESTINATION ${CMAKE_INSTALL_BINDIR})
41 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)53 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
42 set(URLS_DIR ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls)54 set(URLS_DIR ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls)
43endif(CLICK_MODE)55endif(CLICK_MODE)
4456
45file(GLOB_RECURSE I18N_SRC_FILES57file(GLOB_RECURSE I18N_SRC_FILES
4658
=== removed file 'avatar@8.png'
47Binary files avatar@8.png 2013-02-12 16:18:48 +0000 and avatar@8.png 1970-01-01 00:00:00 +0000 differ59Binary files avatar@8.png 2013-02-12 16:18:48 +0000 and avatar@8.png 1970-01-01 00:00:00 +0000 differ
=== renamed file 'ubuntu-docviewer-app.desktop.in.in' => 'com.ubuntu.docviewer.desktop.in.in'
--- ubuntu-docviewer-app.desktop.in.in 2014-09-11 20:10:32 +0000
+++ com.ubuntu.docviewer.desktop.in.in 2014-09-24 09:47:51 +0000
@@ -1,12 +1,11 @@
1[Desktop Entry]1[Desktop Entry]
2Encoding=UTF-8
3Version=1.02Version=1.0
4Type=Application3Type=Application
5Terminal=false4Terminal=false
6Exec=@EXEC@5Exec=@EXEC@
7Icon=@ICON@6Icon=@ICON@
8Name=Document Viewer7_Name=Document Viewer
8_Keywords=documents;viewer;pdf;reader;
9MimeType=text/plain;image/png;image/jpeg;image/svg+xml;application/pdf9MimeType=text/plain;image/png;image/jpeg;image/svg+xml;application/pdf
10Path=/usr/share/ubuntu-docviewer-app
11X-Ubuntu-Touch=true10X-Ubuntu-Touch=true
12X-Ubuntu-StageHint=SideStage11X-Ubuntu-StageHint=SideStage
1312
=== modified file 'docviewer.apparmor'
--- docviewer.apparmor 2014-09-14 16:09:19 +0000
+++ docviewer.apparmor 2014-09-24 09:47:51 +0000
@@ -1,4 +1,4 @@
1{1{
2 "policy_groups": [],2 "policy_groups": [],
3 "policy_version": 1.23 "policy_version": 1.2
4}4}
5\ No newline at end of file5\ No newline at end of file
66
=== renamed file 'manifest.json' => 'manifest.json.in'
--- manifest.json 2014-09-12 21:37:38 +0000
+++ manifest.json.in 2014-09-24 09:47:51 +0000
@@ -1,15 +1,15 @@
1{1{
2 "description": "Document Viewer application for Ubuntu devices",2 "description": "Document Viewer application for Ubuntu devices",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-14.10-qml-dev3",
4 "architecture": "@CLICK_ARCH@",4 "architecture": "all",
5 "hooks": {5 "hooks": {
6 "ubuntu-docviewer-app": {6 "docviewer": {
7 "apparmor": "docviewer.apparmor",7 "apparmor": "docviewer.apparmor",
8 "desktop": "ubuntu-docviewer-app.desktop"8 "desktop": "com.ubuntu.docviewer.desktop"
9 }9 }
10 },10 },
11 "maintainer": "Granger Anthony <grangeranthony@gmail.com>",11 "maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",
12 "name": "com.ubuntu.ubuntu-docviewer-app",12 "name": "com.ubuntu.docviewer",
13 "title": "Docviewer",13 "title": "Document viewer",
14 "version": "0.1"14 "version": "0.1.@BZR_REVNO@"
15}15}
1616
=== modified file 'ubuntu-docviewer-app.qml'
--- ubuntu-docviewer-app.qml 2014-03-13 18:11:54 +0000
+++ ubuntu-docviewer-app.qml 2014-09-24 09:47:51 +0000
@@ -11,7 +11,7 @@
11MainView {11MainView {
12 objectName: "docviewer"12 objectName: "docviewer"
1313
14 applicationName: "ubuntu-docviewer-app"14 applicationName: "com.ubuntu.docviewer"
15 15
16 width: units.gu(50)16 width: units.gu(50)
17 height: units.gu(75)17 height: units.gu(75)

Subscribers

People subscribed via source and target branches