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 "6.6.0")
0008 set (KF6_MIN_VERSION "5.240.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 ${KF6_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 set (CMAKE_CXX_STANDARD 20)
0047 set (CMAKE_CXX_STANDARD_REQUIRED ON)
0048 
0049 # Qt
0050 find_package (Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Widgets)
0051 
0052 # KDE Frameworks
0053 find_package (KF6DBusAddons ${KF6_MIN_VERSION} CONFIG REQUIRED)
0054 find_package (KF6I18n ${KF6_MIN_VERSION} CONFIG REQUIRED)
0055 find_package (KF6Crash ${KF6_MIN_VERSION} CONFIG REQUIRED)
0056 find_package (KF6KIO ${KF6_MIN_VERSION} CONFIG REQUIRED)
0057 
0058 # Basic includes
0059 include (CPack)
0060 
0061 # Adding local CMake modules
0062 set (
0063    CMAKE_MODULE_PATH
0064    ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
0065    ${CMAKE_MODULE_PATH}
0066    )
0067 
0068 add_definitions(
0069     -DQT_NO_URL_CAST_FROM_STRING
0070     -DQT_NO_SIGNALS_SLOTS_KEYWORDS
0071 )
0072 add_definitions (-DTRANSLATION_DOMAIN=\"kactivities6\")
0073 if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
0074     ki18n_install (po)
0075 endif ()
0076 
0077 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
0078    set (CMAKE_CXX_VISIBILITY_PRESET default)
0079    set (CMAKE_VISIBILITY_INLINES_HIDDEN 0)
0080 endif ()
0081 
0082 ecm_set_disabled_deprecation_versions(QT 5.15.2
0083     KF 5.101
0084 )
0085 
0086 add_subdirectory (src)
0087 
0088 # add clang-format target for all our real source files
0089 file (GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0090 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0091 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0092 
0093 ecm_qt_install_logging_categories(
0094         EXPORT KACTIVITYMANAGERD
0095         FILE kactivitymanagerd.categories
0096         DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0097         )
0098 
0099 # Write out the features
0100 feature_summary (WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)