Merge lp:~gary-wzl77/day-scope/arch_and_shadow_build into lp:day-scope

Proposed by Gary.Wang on 2016-07-13
Status: Merged
Approved by: Kyle Nitzsche on 2016-07-13
Approved revision: 52
Merged at revision: 52
Proposed branch: lp:~gary-wzl77/day-scope/arch_and_shadow_build
Merge into: lp:day-scope
Diff against target: 69 lines (+15/-9)
2 files modified
CMakeLists.txt (+14/-8)
manifest.json.in (+1/-1)
To merge this branch: bzr merge lp:~gary-wzl77/day-scope/arch_and_shadow_build
Reviewer Review Type Date Requested Status
Kyle Nitzsche 2016-07-13 Approve on 2016-07-13
Review via email: mp+299903@code.launchpad.net

Commit message

1.detect arch when cmake to make sure click package name correct.
2.do not generate file in build-in source folder when shadow build.

Description of the change

1.detect arch when cmake to make sure click package name correct.
2.do not generate file in build-in source folder when shadow build.

To post a comment you must log in.
Kyle Nitzsche (knitzsche) wrote :

LGTM

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-11 00:51:35 +0000
3+++ CMakeLists.txt 2016-07-13 03:58:57 +0000
4@@ -1,4 +1,4 @@
5-set(VERSION "1.5")
6+set(VERSION "1.5.2")
7
8 # Supress qDebug() output
9 ADD_DEFINITIONS( -DQT_NO_DEBUG_OUTPUT )
10@@ -6,6 +6,13 @@
11 project(day CXX)
12 cmake_minimum_required(VERSION 2.8.12)
13
14+# This command figures out the target architecture and puts it into the manifest file
15+execute_process(
16+ COMMAND dpkg-architecture -qDEB_HOST_ARCH
17+ OUTPUT_VARIABLE ARCH
18+ OUTPUT_STRIP_TRAILING_WHITESPACE
19+)
20+
21 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra -s")
22 set(UBUNTU_PROJECT_TYPE "Scope" CACHE INTERNAL "Tells QtCreator this is a Scope project")
23
24@@ -32,7 +39,6 @@
25 set(GETTEXT_DOMAIN ${SCOPE_NAME})
26 set(AUTHOR "Canonical Ltd.")
27 set(MAINTAINER "Kyle Nitzsche <kyle.nitzsche@canonical.com>")
28-set(ARCH "armhf")
29
30 # AUTOPILOT GENERIC TESTS CONTROL ===============================
31 # These settings control whether generic autopilot tests are run
32@@ -75,12 +81,12 @@
33 )
34
35 configure_file (
36- "manifest.json.in"
37- "manifest.json"
38+ "${CMAKE_CURRENT_SOURCE_DIR}/manifest.json.in"
39+ "${CMAKE_CURRENT_BINARY_DIR}/manifest.json"
40 )
41 configure_file (
42- "security.json.in"
43- "${PKG_PREFIX}.${PKG}_${APP}.security.json"
44+ "${CMAKE_CURRENT_SOURCE_DIR}/security.json.in"
45+ "${CMAKE_CURRENT_BINARY_DIR}/${PKG_PREFIX}.${PKG}_${APP}.security.json"
46 )
47
48 add_subdirectory(tests)
49@@ -89,5 +95,5 @@
50 add_subdirectory(data)
51 add_subdirectory(po)
52
53-install(FILES manifest.json DESTINATION "/")
54-install(FILES "${PKG_PREFIX}.${PKG}_${APP}.security.json" DESTINATION "/")
55+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION "/")
56+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PKG_PREFIX}.${PKG}_${APP}.security.json" DESTINATION "/")
57
58=== modified file 'manifest.json.in'
59--- manifest.json.in 2016-07-11 00:51:35 +0000
60+++ manifest.json.in 2016-07-13 03:58:57 +0000
61@@ -2,7 +2,7 @@
62 "name": "${PKG_PREFIX}.${PKG}",
63 "description": "${DISPLAY_DESC}",
64 "framework": "ubuntu-sdk-15.04.4",
65- "architecture": "armhf",
66+ "architecture": "${ARCH}",
67 "title": "${DISPLAY_NAME}",
68 "hooks": {
69 "${SCOPE_NAME}": {

Subscribers

People subscribed via source and target branches

to all changes: