diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-05-24 15:11:27 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-05-24 15:16:18 +0200 |
| commit | 4f6f3bcc9923b8b7c2d64ca2ea400ce55d2372fe (patch) | |
| tree | 8c37cfcc1b240315352d6796eb6c209c5b40acd2 /cmake/Modules/GlibCompileSchemas.cmake | |
| parent | f63a86c56987d04bb9e021cad3f1e6faca7f962f (diff) | |
| download | turns-4f6f3bcc9923b8b7c2d64ca2ea400ce55d2372fe.tar.xz turns-4f6f3bcc9923b8b7c2d64ca2ea400ce55d2372fe.zip | |
build: flatten modules
Diffstat (limited to 'cmake/Modules/GlibCompileSchemas.cmake')
| -rw-r--r-- | cmake/Modules/GlibCompileSchemas.cmake | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/cmake/Modules/GlibCompileSchemas.cmake b/cmake/Modules/GlibCompileSchemas.cmake deleted file mode 100644 index 90f6a10..0000000 --- a/cmake/Modules/GlibCompileSchemas.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2025 Felix Morgner <felix.morgner@gmail.com> -# SPDX-License-Identifier: LGPL-2.1-only - -find_program(GLIB_COMPILE_SCHEMAS_BIN - NAMES "glib-compile-schemas" - REQUIRED -) - -function(target_add_glib_schemas TARGET) - set(SINGLE_VALUE_ARGS "SCHEMA_DIR") - cmake_parse_arguments( - PARSE_ARGV 1 - "" - "${OPTIONS}" - "${SINGLE_VALUE_ARGS}" - "${MULTI_VALUE_ARGS}" - ) - - if(NOT TARGET "${TARGET}") - message(FATAL_ERROR "Target '${TARGET}' does not exist") - endif() - - if(NOT IS_ABSOLUTE "${_SCHEMA_DIR}") - get_filename_component(_SCHEMA_DIR "${_SCHEMA_DIR}" REALPATH) - endif() - - if(NOT IS_DIRECTORY "${_SCHEMA_DIR}") - message(FATAL_ERROR "Directory '${_SCHEMA_DIR}' does not exists") - endif() - - file(GLOB SCHAMA_FILES CONFIGURE_DEPENDS "${_SCHEMA_DIR}/*.gschema.xml") - - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/glib-2.0/schemas/gschemas.compiled" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - COMMAND "${GLIB_COMPILE_SCHEMAS_BIN}" - ARGS - "--targetdir=${CMAKE_CURRENT_BINARY_DIR}/glib-2.0/schemas" - "--strict" - "${_SCHEMA_DIR}" - VERBATIM - COMMENT "Compiling gsettings schemas" - DEPENDS - ${SCHEMA_FILES} - ) - - add_custom_target("${TARGET}_schemas" DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/glib-2.0/schemas/gschemas.compiled") - - add_dependencies("${TARGET}" "${TARGET}_schemas") -endfunction() |
