Skip to content

Commit

Permalink
Bug 790620 - Failed to create file “/usr/share/glib-2.0/schemas/gsche…
Browse files Browse the repository at this point in the history
…mas.compiled.XY789Y”

Changed install rule for gschema.compiled to use a target.
  • Loading branch information
codesmythe committed Nov 23, 2017
1 parent 1674eb0 commit 0d8112b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Post install actions go here.

INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${GLIB_COMPILE_SCHEMAS} ${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas)")

IF (APPLE)
INSTALL(CODE "EXECUTE_PROCESS(
COMMAND /usr/bin/install_name_tool -add_rpath ${CMAKE_INSTALL_PREFIX}/lib
Expand All @@ -16,19 +14,25 @@ IF (${CMAKE_VERSION} VERSION_GREATER 3.1)
ENDIF()

SET(schema-targets business-gnome-gschema csv-exp-gschema csv-imp-gschema
generic-import-gschema gnome-gschema gnome-utils-gschema ofx-gschema qif-imp-gschema)
generic-import-gschema gnome-gschema gnome-utils-gschema qif-imp-gschema)

IF (WITH_AQBANKING)
LIST(APPEND schema-targets aqb-gschema)
ENDIF (WITH_AQBANKING)

SET(SCHEMA_DIRECTORY ${DATADIR_BUILD}/glib-2.0/schemas)
IF (WITH_OFX)
LIST(APPEND schema-targets ofx-gschema)
ENDIF (WITH_OFX)

SET(SCHEMA_BUILD_DIR ${DATADIR_BUILD}/glib-2.0/schemas)
ADD_CUSTOM_COMMAND(
OUTPUT ${SCHEMA_DIRECTORY}/gschemas.compiled
COMMAND ${CMAKE_COMMAND_TMP} ${GLIB_COMPILE_SCHEMAS} ${SCHEMA_DIRECTORY}
OUTPUT ${SCHEMA_BUILD_DIR}/gschemas.compiled
COMMAND ${CMAKE_COMMAND_TMP} ${GLIB_COMPILE_SCHEMAS} ${SCHEMA_BUILD_DIR}
DEPENDS ${schema-targets}
)

ADD_CUSTOM_TARGET(compiled-schemas ALL DEPENDS ${SCHEMA_DIRECTORY}/gschemas.compiled)
ADD_CUSTOM_TARGET(compiled-schemas ALL DEPENDS ${SCHEMA_BUILD_DIR}/gschemas.compiled)

INSTALL(FILES ${SCHEMA_BUILD_DIR}/gschemas.compiled DESTINATION ${DATADIR}/glib-2.0/schemas)

SET_DIST_LIST(cmake_DIST CMakeLists.txt README_CMAKE.txt cmake_uninstall.cmake.in)

0 comments on commit 0d8112b

Please sign in to comment.