Merge lp:~pete-woods/unity-scope-click/cmake-extras-compatibility into lp:unity-scope-click

Proposed by Pete Woods
Status: Merged
Approved by: Pete Woods
Approved revision: 507
Merged at revision: 511
Proposed branch: lp:~pete-woods/unity-scope-click/cmake-extras-compatibility
Merge into: lp:unity-scope-click
Diff against target: 82 lines (+3/-45)
3 files modified
CMakeLists.txt (+2/-2)
cmake/UseGSettings.cmake (+0/-42)
debian/control (+1/-1)
To merge this branch: bzr merge lp:~pete-woods/unity-scope-click/cmake-extras-compatibility
Reviewer Review Type Date Requested Status
dobey (community) Approve
unity-api-1-bot continuous-integration Pending
Michi Henning Pending
Review via email: mp+312929@code.launchpad.net

This proposal supersedes a proposal from 2016-12-09.

Commit message

Compatibility with unversioned cmake-extras modules

Description of the change

Compatibility with unversioned cmake-extras modules

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote : Posted in a previous version of this proposal

Looks good.

review: Approve
Revision history for this message
dobey (dobey) :
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 2016-12-02 18:37:59 +0000
+++ CMakeLists.txt 2016-12-09 16:36:07 +0000
@@ -19,7 +19,7 @@
1919
20find_program(INTLTOOL_MERGE intltool-merge)20find_program(INTLTOOL_MERGE intltool-merge)
2121
22include(UseGSettings)22find_package (GSettings)
23find_package (GMock)23find_package (GMock)
24find_package (PkgConfig REQUIRED)24find_package (PkgConfig REQUIRED)
2525
@@ -57,7 +57,7 @@
57add_subdirectory(po)57add_subdirectory(po)
58add_subdirectory(tools)58add_subdirectory(tools)
5959
60include(EnableCoverageReport)60find_package(CoverageReport)
61ENABLE_COVERAGE_REPORT(TARGETS ${SCOPE_LIB_NAME} ${APPS_LIB_UNVERSIONED}61ENABLE_COVERAGE_REPORT(TARGETS ${SCOPE_LIB_NAME} ${APPS_LIB_UNVERSIONED}
62 TESTS libclick-scope-tests apps-scope-tests init-departments62 TESTS libclick-scope-tests apps-scope-tests init-departments
63 FILTER /usr/include ${CMAKE_BINARY_DIR}/*63 FILTER /usr/include ${CMAKE_BINARY_DIR}/*
6464
=== removed directory 'cmake'
=== removed file 'cmake/UseGSettings.cmake'
--- cmake/UseGSettings.cmake 2014-07-04 13:10:05 +0000
+++ cmake/UseGSettings.cmake 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
1# GSettings.cmake, CMake macros written for Marlin, feel free to re-use them.
2
3option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ${LOCAL_INSTALL})
4
5option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL})
6
7if(GSETTINGS_LOCALINSTALL)
8 message(STATUS "GSettings schemas will be installed locally.")
9endif()
10
11if(GSETTINGS_COMPILE)
12 message(STATUS "GSettings shemas will be compiled.")
13endif()
14
15macro(add_schema SCHEMA_NAME)
16
17 set(PKG_CONFIG_EXECUTABLE pkg-config)
18 # Have an option to not install the schema into where GLib is
19 if (GSETTINGS_LOCALINSTALL)
20 SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/")
21 else (GSETTINGS_LOCALINSTALL)
22 execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
23 SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/")
24 endif (GSETTINGS_LOCALINSTALL)
25
26 # Run the validator and error if it fails
27 execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE)
28 execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE)
29
30 if (_schemas_invalid)
31 message (SEND_ERROR "Schema validation error: ${_schemas_invalid}")
32 endif (_schemas_invalid)
33
34 # Actually install and recomple schemas
35 message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}")
36 install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL)
37
38 if (GSETTINGS_COMPILE)
39 install (CODE "message (STATUS \"Compiling GSettings schemas\")")
40 install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})")
41 endif ()
42endmacro()
430
=== modified file 'debian/control'
--- debian/control 2016-10-24 21:28:14 +0000
+++ debian/control 2016-12-09 16:36:07 +0000
@@ -2,7 +2,7 @@
2Section: x112Section: x11
3Priority: optional3Priority: optional
4Build-Depends: cmake (>= 2.8.10),4Build-Depends: cmake (>= 2.8.10),
5 cmake-extras,5 cmake-extras (>= 0.10),
6 dbus-x11,6 dbus-x11,
7 debhelper (>= 9),7 debhelper (>= 9),
8 dh-python,8 dh-python,

Subscribers

People subscribed via source and target branches

to all changes: