Merge lp:~pete-woods/hud/cmake-cleanup into lp:hud/phablet

Proposed by Pete Woods
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 362
Merged at revision: 362
Proposed branch: lp:~pete-woods/hud/cmake-cleanup
Merge into: lp:hud/phablet
Diff against target: 123 lines (+17/-17)
5 files modified
CMakeLists.txt (+11/-11)
build.sh (+1/-1)
cmake/UseGSettings.cmake (+1/-1)
debian/rules (+2/-2)
tests/CMakeLists.txt (+2/-2)
To merge this branch: bzr merge lp:~pete-woods/hud/cmake-cleanup
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+156488@code.launchpad.net

Commit message

Clean up CMake variables and make it so that LOCAL_INSTALL applies to gsettings, too

Description of the change

Clean up CMake variables and make it so that LOCAL_INSTALL applies to gsettings, too

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good

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 2013-03-28 02:50:17 +0000
3+++ CMakeLists.txt 2013-04-02 08:41:25 +0000
4@@ -10,12 +10,12 @@
5 message(FATAL_ERROR "In-tree build attempt detected, aborting. Set your build dir outside your source dir, delete CMakeCache.txt from source root and try again.")
6 endif()
7
8-option(enable_tests "Enable tests." ON)
9-option(enable_voice_tests "Enable voice tests" ON)
10-option(enable_scalability_tests "Additional scalability tests that are potentially very slow to run." OFF)
11-option(full_warnings "Full compiler warnings." OFF)
12-option(debug_messages "Print debug messages." OFF)
13-option(local_install "Support local installation." OFF)
14+option(ENABLE_TESTS "Enable tests." ON)
15+option(ENABLE_VOICE_TESTS "Enable voice tests" ON)
16+option(ENABLE_SCALABILITY_TESTS "Additional scalability tests that are potentially very slow to run." OFF)
17+option(FULL_WARNINGS "Full compiler warnings." OFF)
18+option(DEBUG_MESSAGES "Print debug messages." OFF)
19+option(LOCAL_INSTALL "Support local installation." OFF)
20
21 find_package(PkgConfig REQUIRED)
22 include(GNUInstallDirs)
23@@ -34,11 +34,11 @@
24 set(CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBEXECDIR}")
25 endif()
26
27-if(${full_warnings})
28+if(${FULL_WARNINGS})
29 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
30 endif()
31
32-if(${debug_messages})
33+if(${DEBUG_MESSAGES})
34 add_definitions(-DDEBUG_MESSAGES)
35 endif()
36
37@@ -106,14 +106,14 @@
38 include_directories(${BAMF_INCLUDE_DIRS})
39 endif()
40
41-if(${local_install})
42+if(${LOCAL_INSTALL})
43 set(DBUSSERVICEDIR "${CMAKE_INSTALL_DATADIR}/dbus-1/services/")
44 else()
45 EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable session_bus_services_dir OUTPUT_VARIABLE DBUSSERVICEDIR )
46 endif()
47 message("Installing DBus services to ${DBUSSERVICEDIR}")
48
49-if(${local_install})
50+if(${LOCAL_INSTALL})
51 set(DBUSIFACEDIR "${CMAKE_INSTALL_DATADIR}/dbus-1/interfaces/")
52 else()
53 EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable interfaces_dir OUTPUT_VARIABLE DBUSIFACEDIR )
54@@ -132,7 +132,7 @@
55 add_subdirectory(src)
56 add_subdirectory(tools)
57
58-if(${enable_tests})
59+if(${ENABLE_TESTS})
60 enable_testing()
61
62 pkg_check_modules(DBUSTEST REQUIRED dbustest-1)
63
64=== modified file 'build.sh'
65--- build.sh 2013-03-27 18:22:19 +0000
66+++ build.sh 2013-04-02 08:41:25 +0000
67@@ -13,6 +13,6 @@
68 echo "Using $BUILD_COMMAND to build"
69 (
70 cd build
71- cmake .. $EXTRA_ARGS -DCMAKE_INSTALL_PREFIX=../../install -Dlocal_install=ON -DGSETTINGS_LOCALINSTALL=ON
72+ cmake .. $EXTRA_ARGS -DCMAKE_INSTALL_PREFIX=../../install -DLOCAL_INSTALL=ON
73 $BUILD_COMMAND
74 )
75
76=== modified file 'cmake/UseGSettings.cmake'
77--- cmake/UseGSettings.cmake 2013-03-27 23:46:44 +0000
78+++ cmake/UseGSettings.cmake 2013-04-02 08:41:25 +0000
79@@ -1,6 +1,6 @@
80 # GSettings.cmake, CMake macros written for Marlin, feel free to re-use them.
81
82-option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" OFF)
83+option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ${LOCAL_INSTALL})
84
85 option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL})
86
87
88=== modified file 'debian/rules'
89--- debian/rules 2013-03-28 02:50:17 +0000
90+++ debian/rules 2013-04-02 08:41:25 +0000
91@@ -8,7 +8,7 @@
92 dh $@ --parallel
93
94 override_dh_auto_configure:
95- dh_auto_configure -- -DDEBIAN_TARGET_DIR="${DEBIAN_TARGET_DIR}" -Denable_voice_tests=OFF
96+ dh_auto_configure -- -DDEBIAN_TARGET_DIR="${DEBIAN_TARGET_DIR}" -DENABLE_VOICE_TESTS=OFF
97
98 override_dh_install:
99- dh_install --fail-missing
100\ No newline at end of file
101+ dh_install --fail-missing
102
103=== modified file 'tests/CMakeLists.txt'
104--- tests/CMakeLists.txt 2013-03-29 16:38:22 +0000
105+++ tests/CMakeLists.txt 2013-04-02 08:41:25 +0000
106@@ -159,7 +159,7 @@
107 # Voice tests (needs working pulse)
108 ####################################
109
110-if(${enable_voice_tests})
111+if(${ENABLE_VOICE_TESTS})
112 hudtest(test-voice test-voice.c test-voice.xml)
113 endif()
114
115@@ -173,7 +173,7 @@
116 hud-test
117 ${GIO2_LIBRARIES}
118 )
119-if(${enable_scalability_tests})
120+if(${ENABLE_SCALABILITY_TESTS})
121 add_test(hud-performance
122 "${CMAKE_CURRENT_SOURCE_DIR}/test-runner.sh"
123 "${CMAKE_CURRENT_SOURCE_DIR}"

Subscribers

People subscribed via source and target branches