Warning, /plasma/flatpak-kcm/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2022 Suhaas Joshi <joshiesuhaas0@gmail.com> 0002 # SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk> 0003 # 0004 # SPDX-License-Identifier: BSD-2-Clause 0005 0006 cmake_minimum_required(VERSION 3.16) 0007 0008 project(flatpakkcm) 0009 0010 set(QT_MIN_VERSION "5.15.2") 0011 set(KF5_MIN_VERSION "5.102.0") 0012 0013 add_definitions(-DTRANSLATION_DOMAIN="kcm_flatpak") 0014 0015 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) 0016 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) 0017 set(KF_IGNORE_PLATFORM_CHECK ON) 0018 0019 find_package(PkgConfig REQUIRED) 0020 pkg_check_modules(Flatpak REQUIRED IMPORTED_TARGET flatpak>=0.11.8) 0021 0022 include(KDEInstallDirs) 0023 include(KDECMakeSettings) 0024 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0025 include(KDEClangFormat) 0026 include(KDEGitCommitHooks) 0027 include(FeatureSummary) 0028 0029 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS 0030 Quick 0031 Svg 0032 ) 0033 0034 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS 0035 I18n 0036 KCMUtils 0037 Declarative 0038 Config 0039 ItemModels 0040 ) 0041 0042 # Can't use regular KDE_INSTALL_FULL_LOCALSTATEDIR because it is wrong in developer setup. 0043 # This variable has to point at a directory which Flapak itself was configured with. 0044 set(LOCALSTATEDIR "/var") 0045 configure_file(config.h.in ${CMAKE_BINARY_DIR}/config.h) 0046 0047 add_library(kcm_flatpak_static STATIC 0048 flatpakreference.cpp flatpakreference.h 0049 flatpakpermission.cpp flatpakpermission.h 0050 flatpakhelper.cpp flatpakhelper.h 0051 flatpakcommon.cpp flatpakcommon.h 0052 ) 0053 set_property(TARGET kcm_flatpak_static PROPERTY POSITION_INDEPENDENT_CODE ON) 0054 target_link_libraries(kcm_flatpak_static 0055 Qt::Core 0056 KF5::CoreAddons 0057 KF5::ConfigCore 0058 KF5::I18n 0059 KF5::QuickAddons 0060 PkgConfig::Flatpak 0061 Qt::DBus 0062 ) 0063 0064 add_library(kcm_flatpak MODULE 0065 kcm.cpp kcm.h 0066 ) 0067 target_link_libraries(kcm_flatpak kcm_flatpak_static) 0068 0069 install(TARGETS kcm_flatpak DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/kcms/systemsettings) 0070 0071 kpackage_install_package(package kcm_flatpak kcms) 0072 0073 kcmutils_generate_desktop_file(kcm_flatpak) 0074 0075 ki18n_install(po) 0076 0077 add_subdirectory(autotests) 0078 0079 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) 0080 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 0081 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) 0082 0083 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)