Warning, /plasma/kactivitymanagerd/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # vim:set softtabstop=3 shiftwidth=3 tabstop=3 expandtab: 0002 0003 cmake_minimum_required(VERSION 3.16) 0004 0005 project (KActivityManagerd) 0006 0007 set (QT_MIN_VERSION "5.15.2") 0008 set (KF5_MIN_VERSION "5.102.0") 0009 set (KDE_COMPILERSETTINGS_LEVEL "5.82") 0010 set (Boost_MINIMUM_VERSION "1.58") 0011 0012 # We don't build in-source 0013 if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") 0014 message ( 0015 FATAL_ERROR 0016 "kactivities require an out of source build. Please create a separate build directory and run 'cmake path_to_plasma [options]' there." 0017 ) 0018 endif () 0019 0020 set (KACTIVITIES_CURRENT_ROOT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) 0021 0022 # Extra CMake stuff 0023 include (FeatureSummary) 0024 find_package(ECM ${KF5_MIN_VERSION} NO_MODULE) 0025 set_package_properties(ECM PROPERTIES 0026 DESCRIPTION "Extra CMake Modules." 0027 URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules" 0028 TYPE REQUIRED 0029 ) 0030 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) 0031 0032 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) 0033 0034 include (KDEInstallDirs) 0035 include (KDECMakeSettings) 0036 include (KDECompilerSettings NO_POLICY_SCOPE) 0037 include (GenerateExportHeader) 0038 include (ECMConfiguredInstall) 0039 include (ECMGenerateDBusServiceFile) 0040 include (ECMGenerateHeaders) 0041 include (ECMQtDeclareLoggingCategory) 0042 include (KDEClangFormat) 0043 include (KDEGitCommitHooks) 0044 include(ECMDeprecationSettings) 0045 0046 # C++17 0047 set (CMAKE_CXX_STANDARD 17) 0048 set (CMAKE_CXX_STANDARD_REQUIRED ON) 0049 0050 # Qt 0051 find_package (Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Widgets) 0052 0053 if (QT_MAJOR_VERSION STREQUAL "6") 0054 find_package(Qt6Core5Compat ${REQUIRED_QT_VERSION} REQUIRED) # QTextCodec 0055 endif() 0056 0057 0058 # KDE Frameworks 0059 find_package (KF5DBusAddons ${KF5_MIN_VERSION} CONFIG REQUIRED) 0060 find_package (KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED) 0061 find_package (KF5Crash ${KF5_MIN_VERSION} CONFIG REQUIRED) 0062 0063 # Basic includes 0064 include (CPack) 0065 0066 # Adding local CMake modules 0067 set ( 0068 CMAKE_MODULE_PATH 0069 ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules 0070 ${CMAKE_MODULE_PATH} 0071 ) 0072 0073 add_definitions( 0074 -DQT_NO_URL_CAST_FROM_STRING 0075 -DQT_NO_SIGNALS_SLOTS_KEYWORDS 0076 ) 0077 add_definitions (-DTRANSLATION_DOMAIN=\"kactivities5\") 0078 if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") 0079 ki18n_install (po) 0080 endif () 0081 0082 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") 0083 set (CMAKE_CXX_VISIBILITY_PRESET default) 0084 set (CMAKE_VISIBILITY_INLINES_HIDDEN 0) 0085 endif () 0086 0087 ecm_set_disabled_deprecation_versions(QT 5.15.2 0088 KF 5.101 0089 ) 0090 0091 add_subdirectory (src) 0092 0093 # add clang-format target for all our real source files 0094 file (GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) 0095 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 0096 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) 0097 0098 ecm_qt_install_logging_categories( 0099 EXPORT KACTIVITYMANAGERD 0100 FILE kactivitymanagerd.categories 0101 DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} 0102 ) 0103 0104 # Write out the features 0105 feature_summary (WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)