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 "6.6.0") 0011 set(KF6_MIN_VERSION "5.240.0") 0012 0013 set(CMAKE_CXX_STANDARD 20) 0014 set(CMAKE_CXX_STANDARD_REQUIRED ON) 0015 0016 add_definitions(-DTRANSLATION_DOMAIN="kcm_flatpak") 0017 0018 find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE) 0019 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) 0020 0021 find_package(PkgConfig REQUIRED) 0022 pkg_check_modules(Flatpak REQUIRED IMPORTED_TARGET flatpak>=0.11.8) 0023 0024 include(KDEInstallDirs) 0025 include(KDECMakeSettings) 0026 include(KDECompilerSettings NO_POLICY_SCOPE) 0027 include(KDEClangFormat) 0028 include(KDEGitCommitHooks) 0029 include(FeatureSummary) 0030 include(ECMDeprecationSettings) 0031 0032 find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS 0033 Quick 0034 Svg 0035 ) 0036 0037 find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS 0038 Config 0039 CoreAddons 0040 I18n 0041 KCMUtils 0042 ItemModels 0043 ) 0044 0045 ecm_set_disabled_deprecation_versions(QT 6.5 0046 KF 5.240 0047 ) 0048 0049 # Can't use regular KDE_INSTALL_FULL_LOCALSTATEDIR because it is wrong in developer setup. 0050 # This variable has to point at a directory which Flapak itself was configured with. 0051 set(LOCALSTATEDIR "/var") 0052 configure_file(config.h.in ${CMAKE_BINARY_DIR}/config.h) 0053 0054 add_library(kcm_flatpak_static STATIC 0055 flatpakreference.cpp flatpakreference.h 0056 flatpakpermission.cpp flatpakpermission.h 0057 flatpakhelper.cpp flatpakhelper.h 0058 flatpakcommon.cpp flatpakcommon.h 0059 ) 0060 set_property(TARGET kcm_flatpak_static PROPERTY POSITION_INDEPENDENT_CODE ON) 0061 target_link_libraries(kcm_flatpak_static 0062 KF6::ConfigCore 0063 KF6::CoreAddons 0064 KF6::I18n 0065 KF6::KCMUtilsQuick 0066 PkgConfig::Flatpak 0067 Qt::Core 0068 ) 0069 0070 kcmutils_add_qml_kcm(kcm_flatpak SOURCES kcm.cpp kcm.h) 0071 0072 target_link_libraries(kcm_flatpak PRIVATE kcm_flatpak_static) 0073 0074 ki18n_install(po) 0075 0076 add_subdirectory(autotests) 0077 0078 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) 0079 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 0080 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) 0081 0082 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)