Merge lp:~gary-wzl77/texts-scope/arch_detect into lp:texts-scope

Proposed by Gary.Wang
Status: Merged
Approved by: Kyle Nitzsche
Approved revision: 31
Merged at revision: 31
Proposed branch: lp:~gary-wzl77/texts-scope/arch_detect
Merge into: lp:texts-scope
Diff against target: 66 lines (+18/-10)
2 files modified
CMakeLists.txt (+16/-8)
manifest.json.in (+2/-2)
To merge this branch: bzr merge lp:~gary-wzl77/texts-scope/arch_detect
Reviewer Review Type Date Requested Status
Kyle Nitzsche Approve
Review via email: mp+299909@code.launchpad.net

Commit message

detect arch when cmake to make sure click package name correct.

Description of the change

detect arch when cmake to make sure click package name correct.

To post a comment you must log in.
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

LGTM, thanks Gary.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-07-08 06:30:00 +0000
3+++ CMakeLists.txt 2016-07-13 05:20:44 +0000
4@@ -1,11 +1,18 @@
5-set(VERSION "1.8")
6+project(texts CXX)
7+cmake_minimum_required(VERSION 2.8.10)
8+
9+set(VERSION "1.8.2")
10+
11+# This command figures out the target architecture and puts it into the manifest file
12+execute_process(
13+ COMMAND dpkg-architecture -qDEB_HOST_ARCH
14+ OUTPUT_VARIABLE ARCH
15+ OUTPUT_STRIP_TRAILING_WHITESPACE
16+)
17
18 # Supress qDebug() output
19 ADD_DEFINITIONS( -DQT_NO_DEBUG_OUTPUT )
20
21-project(texts CXX)
22-cmake_minimum_required(VERSION 2.8.10)
23-
24 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra -s")
25 set(UBUNTU_PROJECT_TYPE "Scope" CACHE INTERNAL "Tells QtCreator this is a Scope project")
26
27@@ -16,6 +23,7 @@
28 set(PKG_PREFIX "com.canonical.scopes")
29 set(PKG ${SCOPE_NAME})
30 set(APP ${SCOPE_NAME})
31+set(FRAMEWORK ubuntu-sdk-15.04.4)
32
33 set(SO_NAME ${PKG_PREFIX}.${PKG}_${APP})
34
35@@ -69,12 +77,12 @@
36 )
37
38 configure_file (
39- "manifest.json.in"
40- "manifest.json"
41+ "${CMAKE_CURRENT_SOURCE_DIR}/manifest.json.in"
42+ "${CMAKE_CURRENT_BINARY_DIR}/manifest.json"
43 )
44 configure_file (
45- "security.json.in"
46- "${PKG_PREFIX}.${PKG}_${APP}.security.json"
47+ "${CMAKE_CURRENT_SOURCE_DIR}/security.json.in"
48+ "${CMAKE_CURRENT_BINARY_DIR}/${PKG_PREFIX}.${PKG}_${APP}.security.json"
49 )
50
51 add_subdirectory(tests)
52
53=== modified file 'manifest.json.in'
54--- manifest.json.in 2016-04-13 17:25:50 +0000
55+++ manifest.json.in 2016-07-13 05:20:44 +0000
56@@ -1,8 +1,8 @@
57 {
58 "name": "${PKG_PREFIX}.${PKG}",
59 "description": "${DISPLAY_DESC}",
60- "framework": "ubuntu-sdk-15.04.4",
61- "architecture": "armhf",
62+ "framework": "${FRAMEWORK}",
63+ "architecture": "${ARCH}",
64 "title": "${DISPLAY_NAME}",
65 "hooks": {
66 "${APP}": {

Subscribers

People subscribed via source and target branches

to all changes: