diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ find_package(KF5DBusAddons REQUIRED) find_package(GTK3 REQUIRED) find_package(GSettingSchemas REQUIRED) +find_package(XSettingsd) include(ECMSetupVersion) include(ECMInstallIcons) @@ -23,6 +24,12 @@ include(KDECompilerSettings NO_POLICY_SCOPE) include(KDEClangFormat) +set_package_properties(XSettingsd PROPERTIES + DESCRIPTION "XSettingsd daemon" + TYPE RUNTIME + PURPOSE "Allows GTK Config kded module to apply settings to GTK applications on the fly" +) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake kded/config.h) add_subdirectory(gtkproxies) diff --git a/cmake/modules/FindXSettingsd.cmake b/cmake/modules/FindXSettingsd.cmake new file mode 100644 --- /dev/null +++ b/cmake/modules/FindXSettingsd.cmake @@ -0,0 +1,32 @@ +# - Find XSettingsd +# This module defines the following variables: +# +# XSettingsd_FOUND - true if found +# XSettingsd_PATH - path to the bin (only when found) +# +# Copyright (c) 2020 Mikhail Zolotukhin +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +find_program(XSettingsd_PATH "xsettingsd") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(XSettingsd + FOUND_VAR XSettingsd_FOUND + REQUIRED_VARS XSettingsd_PATH +) +mark_as_advanced(XSettingsd_PATH) +