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
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-03-28 02:50:17 +0000
+++ CMakeLists.txt 2013-04-02 08:41:25 +0000
@@ -10,12 +10,12 @@
10 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.")10 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.")
11endif()11endif()
1212
13option(enable_tests "Enable tests." ON)13option(ENABLE_TESTS "Enable tests." ON)
14option(enable_voice_tests "Enable voice tests" ON)14option(ENABLE_VOICE_TESTS "Enable voice tests" ON)
15option(enable_scalability_tests "Additional scalability tests that are potentially very slow to run." OFF)15option(ENABLE_SCALABILITY_TESTS "Additional scalability tests that are potentially very slow to run." OFF)
16option(full_warnings "Full compiler warnings." OFF)16option(FULL_WARNINGS "Full compiler warnings." OFF)
17option(debug_messages "Print debug messages." OFF)17option(DEBUG_MESSAGES "Print debug messages." OFF)
18option(local_install "Support local installation." OFF)18option(LOCAL_INSTALL "Support local installation." OFF)
1919
20find_package(PkgConfig REQUIRED)20find_package(PkgConfig REQUIRED)
21include(GNUInstallDirs)21include(GNUInstallDirs)
@@ -34,11 +34,11 @@
34 set(CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBEXECDIR}")34 set(CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBEXECDIR}")
35endif()35endif()
3636
37if(${full_warnings})37if(${FULL_WARNINGS})
38 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")38 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
39endif()39endif()
4040
41if(${debug_messages})41if(${DEBUG_MESSAGES})
42 add_definitions(-DDEBUG_MESSAGES)42 add_definitions(-DDEBUG_MESSAGES)
43endif()43endif()
4444
@@ -106,14 +106,14 @@
106 include_directories(${BAMF_INCLUDE_DIRS})106 include_directories(${BAMF_INCLUDE_DIRS})
107endif()107endif()
108108
109if(${local_install})109if(${LOCAL_INSTALL})
110 set(DBUSSERVICEDIR "${CMAKE_INSTALL_DATADIR}/dbus-1/services/")110 set(DBUSSERVICEDIR "${CMAKE_INSTALL_DATADIR}/dbus-1/services/")
111else()111else()
112 EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable session_bus_services_dir OUTPUT_VARIABLE DBUSSERVICEDIR )112 EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable session_bus_services_dir OUTPUT_VARIABLE DBUSSERVICEDIR )
113endif()113endif()
114message("Installing DBus services to ${DBUSSERVICEDIR}")114message("Installing DBus services to ${DBUSSERVICEDIR}")
115115
116if(${local_install})116if(${LOCAL_INSTALL})
117 set(DBUSIFACEDIR "${CMAKE_INSTALL_DATADIR}/dbus-1/interfaces/")117 set(DBUSIFACEDIR "${CMAKE_INSTALL_DATADIR}/dbus-1/interfaces/")
118else()118else()
119 EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable interfaces_dir OUTPUT_VARIABLE DBUSIFACEDIR )119 EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable interfaces_dir OUTPUT_VARIABLE DBUSIFACEDIR )
@@ -132,7 +132,7 @@
132add_subdirectory(src)132add_subdirectory(src)
133add_subdirectory(tools)133add_subdirectory(tools)
134134
135if(${enable_tests})135if(${ENABLE_TESTS})
136 enable_testing()136 enable_testing()
137 137
138 pkg_check_modules(DBUSTEST REQUIRED dbustest-1)138 pkg_check_modules(DBUSTEST REQUIRED dbustest-1)
139139
=== modified file 'build.sh'
--- build.sh 2013-03-27 18:22:19 +0000
+++ build.sh 2013-04-02 08:41:25 +0000
@@ -13,6 +13,6 @@
13echo "Using $BUILD_COMMAND to build"13echo "Using $BUILD_COMMAND to build"
14(14(
15 cd build15 cd build
16 cmake .. $EXTRA_ARGS -DCMAKE_INSTALL_PREFIX=../../install -Dlocal_install=ON -DGSETTINGS_LOCALINSTALL=ON16 cmake .. $EXTRA_ARGS -DCMAKE_INSTALL_PREFIX=../../install -DLOCAL_INSTALL=ON
17 $BUILD_COMMAND17 $BUILD_COMMAND
18)18)
1919
=== modified file 'cmake/UseGSettings.cmake'
--- cmake/UseGSettings.cmake 2013-03-27 23:46:44 +0000
+++ cmake/UseGSettings.cmake 2013-04-02 08:41:25 +0000
@@ -1,6 +1,6 @@
1# GSettings.cmake, CMake macros written for Marlin, feel free to re-use them.1# GSettings.cmake, CMake macros written for Marlin, feel free to re-use them.
22
3option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" OFF)3option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ${LOCAL_INSTALL})
44
5option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL})5option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL})
66
77
=== modified file 'debian/rules'
--- debian/rules 2013-03-28 02:50:17 +0000
+++ debian/rules 2013-04-02 08:41:25 +0000
@@ -8,7 +8,7 @@
8 dh $@ --parallel8 dh $@ --parallel
99
10override_dh_auto_configure:10override_dh_auto_configure:
11 dh_auto_configure -- -DDEBIAN_TARGET_DIR="${DEBIAN_TARGET_DIR}" -Denable_voice_tests=OFF11 dh_auto_configure -- -DDEBIAN_TARGET_DIR="${DEBIAN_TARGET_DIR}" -DENABLE_VOICE_TESTS=OFF
1212
13override_dh_install:13override_dh_install:
14 dh_install --fail-missing
15\ No newline at end of file14\ No newline at end of file
15 dh_install --fail-missing
1616
=== modified file 'tests/CMakeLists.txt'
--- tests/CMakeLists.txt 2013-03-29 16:38:22 +0000
+++ tests/CMakeLists.txt 2013-04-02 08:41:25 +0000
@@ -159,7 +159,7 @@
159# Voice tests (needs working pulse)159# Voice tests (needs working pulse)
160####################################160####################################
161161
162if(${enable_voice_tests})162if(${ENABLE_VOICE_TESTS})
163 hudtest(test-voice test-voice.c test-voice.xml)163 hudtest(test-voice test-voice.c test-voice.xml)
164endif()164endif()
165165
@@ -173,7 +173,7 @@
173 hud-test173 hud-test
174 ${GIO2_LIBRARIES}174 ${GIO2_LIBRARIES}
175)175)
176if(${enable_scalability_tests})176if(${ENABLE_SCALABILITY_TESTS})
177 add_test(hud-performance177 add_test(hud-performance
178 "${CMAKE_CURRENT_SOURCE_DIR}/test-runner.sh"178 "${CMAKE_CURRENT_SOURCE_DIR}/test-runner.sh"
179 "${CMAKE_CURRENT_SOURCE_DIR}"179 "${CMAKE_CURRENT_SOURCE_DIR}"

Subscribers

People subscribed via source and target branches