/usr/share/cmake/Modules/ManageGConf.cmake is in cmake-fedora 2.5.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | # - GConf relative targets such as install/unstall schemas.
# This module finds gconftool-2 or gconftool for GConf manipulation.
#
# Defines the following macros:
# MANAGE_GCONF_SCHEMAS([FILE <schemasFile>]
# [INSTALL_DIR <dir>] [CONFIG_SOURCE <source>]
# )
# - Process schemas file.
# * Parameters:
# + FILE <schemasFile>: (Optional) Path to GConf .schema.
# Default: ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.schemas
# + INSTALL_DIR <dir>: (Optional) Directory to install GConf .schemas file.
# Default: ${SYSCONF_DIR}/gconf/schemas
# + CONFIG_SOURCE <source>: (Optional) Configuration source.
# Default: "" (Use the system default)
# * Variables to cache:
# + GCONF2_PKG_CONFIG: GConf2 pkg-config name
# Default: gconf-2.0
# + GCONF2_DEVEL_PACKAGE_NAME: GConf2 devel package name
# Default: GConf2-devel
# * Defines following targets:
# + install_schemas: install schemas.
# + uninstall_schemas: uninstall schemas.
#
IF(DEFINED _MANAGE_GCONF_CMAKE_)
RETURN()
ENDIF(DEFINED _MANAGE_GCONF_CMAKE_)
SET(_MANAGE_GCONF_CMAKE_ DEFINED)
INCLUDE(ManageDependency)
SET(GCONF2_PKG_CONFIG "gconf-2.0" CACHE STRING "GConf2 pkg-config name")
SET(GCONF2_PACKAGE_NAME "GConf2" CACHE STRING "GConf2 package name")
SET(GCONF2_DEVEL_PACKAGE_NAME "GConf2-devel" CACHE STRING "GConf2 devel package name")
MANAGE_DEPENDENCY(REQUIRES GCONF2 REQUIRED PACKAGE_NAME "GConf2")
MANAGE_DEPENDENCY(BUILD_REQUIRES GCONF2 REQUIRED
PKG_CONFIG ${GCONF2_PKG_CONFIG} PACKAGE_NAME "${GCONF2_DEVEL_PACKAGE_NAME}"
)
MANAGE_DEPENDENCY(REQUIRES_PRE GCONF2 REQUIRED
PACKAGE_NAME "${GCONF2_PACKAGE_NAME}"
)
MANAGE_DEPENDENCY(REQUIRES_PREUN GCONF2 REQUIRED
PACKAGE_NAME "${GCONF2_PACKAGE_NAME}"
)
MANAGE_DEPENDENCY(REQUIRES_POST GCONF2 REQUIRED
PACKAGE_NAME "${GCONF2_PACKAGE_NAME}"
)
SET(MANAGE_GCONF_SCHEMAS_VALID_OPTIONS "FILE" "INSTALL_DIR" "CONFIG_SOURCE")
FUNCTION(MANAGE_GCONF_SCHEMAS)
INCLUDE(ManageVersion)
VARIABLE_PARSE_ARGN(_o MANAGE_GCONF_SCHEMAS_VALID_OPTIONS ${ARGN})
IF(NOT _o_FILE)
SET(_o_FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.schemas")
ENDIF()
GET_FILENAME_COMPONENT(schemasBasename ${_o_FILE} NAME)
IF(NOT _o_INSTALL_DIR)
SET(_o_INSTALL_DIR "${SYSCONF_DIR}/gconf/schemas")
ENDIF()
ADD_CUSTOM_TARGET(uninstall_schemas
COMMAND GCONF_CONFIG_SOURCE=${_o_CONFIG_SOURCE}
${GCONF2_EXECUTABLE} --makefile-uninstall-rule
"${_o_INSTALL_DIR}/${schemasBasename}"
COMMENT "uninstall_schemas"
VERBATIM
)
ADD_CUSTOM_TARGET(install_schemas
COMMAND ${CMAKE_COMMAND} -E copy "${_o_FILE}" "${_o_INSTALL_DIR}/${schemasBasename}"
COMMAND GCONF_CONFIG_SOURCE=${GCONF_CONFIG_SOURCE}
${GCONF2_EXECUTABLE} --makefile-install-rule
"${_o_INSTALL_DIR}/${schemasBasename}"
DEPENDS "${_o_FILE}"
COMMENT "install_schemas"
VERBATIM
)
INSTALL(FILES ${_o_FILE} DESTINATION "${SYSCONF_DIR}/gconf/schemas")
ENDFUNCTION(MANAGE_GCONF_SCHEMAS)
|