summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@XPS-UNITY.(none)>2010-12-13 05:09:28 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-12-13 05:09:59 +0800
commit861a1d44b2041d760226ffc2e7d8f62f4afd4d0d (patch)
treee0db6f0a9e0deb136155b1d167486cb1695aaf10
parent62cec93a771d7f74e5d9225862db197ec06b5e12 (diff)
downloadcompizconfig-backend-gsettings-861a1d44b2041d760226ffc2e7d8f62f4afd4d0d.tar.gz
compizconfig-backend-gsettings-861a1d44b2041d760226ffc2e7d8f62f4afd4d0d.tar.bz2
Fix branch confusion
-rw-r--r--CMakeLists.txt155
1 files changed, 1 insertions, 154 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67f4ffa..0ab43d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,157 +4,7 @@ find_package (CompizConfig REQUIRED)
include (LibCompizConfigCommon)
-# Generate GConf Schemas for existing installed plugins
-
-set (GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS 1 CACHE BOOL "Generate GConf schemas for existing plugins")
-
-if (GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS)
- pkg_check_modules (GCONF gconf-2.0)
-
- find_program (GCONFTOOL_EXECUTABLE gconftool-2)
- mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE)
- set (COMPIZ_GCONF_SCHEMAS_XSLT "${CMAKE_SOURCE_DIR}/xslt/compiz_gconf_schemas.xslt")
-
- if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (SCHEMADIR "${CMAKE_INSTALL_PREFIX}/share/gconf/schemas")
- else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
- endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
-
- if (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE)
- set (GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS 0)
- else ()
- option (
- COMPIZ_DISABLE_SCHEMAS_INSTALL
- "Disables gconf schema installation with gconftool"
- OFF
- )
-
- set (
- COMPIZ_INSTALL_GCONF_SCHEMA_DIR ${COMPIZ_INSTALL_GCONF_SCHEMA_DIR} CACHE PATH
- "Installation path of the gconf schema file"
- )
-
- function (compiz_install_gconf_schema _src _dst _name)
- find_program (GCONFTOOL_EXECUTABLE gconftool-2)
- mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE)
-
- if (GCONFTOOL_EXECUTABLE AND NOT COMPIZ_DISABLE_SCHEMAS_INSTALL)
- install (CODE "
- if (\"\$ENV{USER}\" STREQUAL \"root\")
- exec_program (${GCONFTOOL_EXECUTABLE}
- ARGS \"--get-default-source\"
- OUTPUT_VARIABLE ENV{GCONF_CONFIG_SOURCE})
- exec_program (${GCONFTOOL_EXECUTABLE}
- ARGS \"--makefile-install-rule ${_src} > /dev/null\")
- else (\"\$ENV{USER}\" STREQUAL \"root\")
- exec_program (${GCONFTOOL_EXECUTABLE}
- ARGS \"--install-schema-file=${_src} > /dev/null\")
- endif (\"\$ENV{USER}\" STREQUAL \"root\")
- ")
- endif ()
- install (
- FILES "${_src}"
- DESTINATION "${COMPIZ_DESTDIR}${_dst}"
- RENAME "${_name}"
- )
- endfunction ()
-
- # generate gconf schema
- function (compiz_gconf_schema _src _dst _inst _name)
- find_program (XSLTPROC_EXECUTABLE xsltproc)
- mark_as_advanced (FORCE XSLTPROC_EXECUTABLE)
-
- if (XSLTPROC_EXECUTABLE)
- add_custom_command (
- OUTPUT ${_dst}
- COMMAND ${XSLTPROC_EXECUTABLE}
- -o ${_dst}
- ${COMPIZ_GCONF_SCHEMAS_XSLT}
- ${_src}
- DEPENDS ${_src}
- )
- compiz_install_gconf_schema (${_dst} ${_inst} ${_name})
- endif ()
- endfunction ()
-
- # generate schemas for existing plugins in compiz prefix
-
- file (GLOB _compiz_schema_files "${COMPIZ_PREFIX}/share/compiz/*.xml")
- foreach (_file ${_compiz_schema_files})
- string (LENGTH "${COMPIZ_PREFIX}/share/compiz/" _dir_len)
- string (LENGTH ${_file} _path_len)
-
- math (EXPR _file_len "${_path_len} - ${_dir_len}")
- math (EXPR _plugin_name_len "${_file_len} - 4")
-
- string (SUBSTRING ${_file} ${_dir_len} ${_file_len} _plugin_name)
- string (SUBSTRING ${_plugin_name} 0 ${_plugin_name_len} _plugin_name)
- if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${COMPIZ_PREFIX}/share/gconf/schemas")
- else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
- endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- compiz_gconf_schema (${_file} "${CMAKE_BINARY_DIR}/generated/compiz-${_plugin_name}.schemas"
- ${PLUGIN_SCHEMADIR} compiz-${_plugin_name}.schemas)
- list (APPEND _gconf_files_add "${CMAKE_BINARY_DIR}/generated/compiz-${_plugin_name}.schemas")
- endforeach ()
-
- # generate schemas for existing plugins in package prefix
-
- file (GLOB _compiz_schema_files "${datadir}/compiz/*.xml")
- foreach (_file ${_compiz_schema_files})
- string (LENGTH "${datadir}/compiz/" _dir_len)
- string (LENGTH ${_file} _path_len)
-
- math (EXPR _file_len "${_path_len} - ${_dir_len}")
- math (EXPR _plugin_name_len "${_file_len} - 4")
-
- string (SUBSTRING ${_file} ${_dir_len} ${_file_len} _plugin_name)
- string (SUBSTRING ${_plugin_name} 0 ${_plugin_name_len} _plugin_name)
-
- if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${datadir}/gconf/schemas")
- else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
- endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
-
- compiz_gconf_schema (${_file} "${CMAKE_BINARY_DIR}/generated/package-${_plugin_name}.schemas"
- ${PLUGIN_SCHEMADIR} compiz-${_plugin_name}.schemas)
- list (APPEND _gconf_files_add "${CMAKE_BINARY_DIR}/generated/package-${_plugin_name}.schemas")
- endforeach ()
-
- # generate schemas for existing plugins in local prefix
-
- file (GLOB _compiz_schema_files "$ENV{HOME}/.compiz-1/metadata/*.xml")
- foreach (_file ${_compiz_schema_files})
- string (LENGTH "$ENV{HOME}/.compiz-1/metadata/" _dir_len)
- string (LENGTH ${_file} _path_len)
-
- math (EXPR _file_len "${_path_len} - ${_dir_len}")
- math (EXPR _plugin_name_len "${_file_len} - 4")
-
- string (SUBSTRING ${_file} ${_dir_len} ${_file_len} _plugin_name)
- string (SUBSTRING ${_plugin_name} 0 ${_plugin_name_len} _plugin_name)
-
- if (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "$ENV{HOME}/.gconf/schemas")
- else (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
- set (PLUGIN_SCHEMADIR "${COMPIZ_INSTALL_GCONF_SCHEMA_DIR}")
- endif (NOT COMPIZ_INSTALL_GCONF_SCHEMA_DIR)
-
- compiz_gconf_schema (${_file} "${CMAKE_BINARY_DIR}/generated/local-${_plugin_name}.schemas"
- ${PLUGIN_SCHEMADIR} compiz-${_plugin_name}.schemas)
- list (APPEND _gconf_files_add "${CMAKE_BINARY_DIR}/generated/local-${_plugin_name}.schemas")
- endforeach ()
-
- endif ()
-endif ()
-
-compizconfig_backend (gconf PKGDEPS glib-2.0 gconf-2.0 FILESADD ${_gconf_files_add})
-
-add_subdirectory (xslt)
-add_subdirectory (cmake)
+compizconfig_backend (gconf PKGDEPS glib-2.0 gconf-2.0)
# compizconfig-gconf package version number
# An odd micro number indicates in-progress development.
@@ -166,9 +16,6 @@ set (COMPIZCONFIG_GCONF_VERSION_MACRO 1)
set (VERSION ${COMPIZCONFIG_GCONF_VERSION_MAJOR}.${COMPIZCONFIG_GCONF_VERSION_MINOR}.${COMPIZCONFIG_GCONF_VERSION_MICRO}.${COMPIZCONFIG_GCONF_VERSION_MACRO})
compiz_print_configure_header ("CompizConfig GConf Storage Backend")
-compiz_color_message ("\n${_escape}[4mOptional features:${_escape}[0m\n")
-
-compiz_print_result_message ("generate schemas for existing plugins" GENERATE_SCHEMAS_FOR_EXISTING_PLUGINS)
compiz_print_configure_footer ()
compiz_add_uninstall ()