Warning, /plasma/drkonqi/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 project(drkonqi)
0004 set(PROJECT_VERSION "6.0.80")
0005 set(PROJECT_VERSION_MAJOR 6)
0006 
0007 set(QT_MIN_VERSION "6.6.0")
0008 set(KF6_MIN_VERSION "5.240.0")
0009 
0010 set(CMAKE_CXX_STANDARD 20)
0011 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0012 
0013 find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
0014 
0015 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
0016 
0017 include(KDEInstallDirs)
0018 include(KDECMakeSettings)
0019 include(KDECompilerSettings NO_POLICY_SCOPE)
0020 include(ECMQtDeclareLoggingCategory)
0021 include(ECMAddTests)
0022 include(ECMMarkAsTest)
0023 include(CheckFunctionExists)
0024 include(FeatureSummary)
0025 include(KDEClangFormat)
0026 include(KDEGitCommitHooks)
0027 include(ECMDeprecationSettings)
0028 include(ECMFindQmlModule)
0029 include(ECMSourceVersionControl)
0030 include(CMakeDependentOption)
0031 include(FindPythonModule)
0032 
0033 option(WITH_GDB12 "The gdb version available is at least GDB 12 (this enables dynamic debug symbol resolution even when no DEBUG_PACKAGE_INSTALLER_NAME is available)" FALSE)
0034 option(WITH_PYTHON_VENDORING "Python dependency vendoring (cmake will install python dependencies into drkonqi's python tree)" ON)
0035 
0036 kde_enable_exceptions()
0037 
0038 find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets Test DBus Concurrent Quick)
0039 
0040 find_package(
0041     KF6
0042     ${KF6_MIN_VERSION}
0043     REQUIRED
0044     COMPONENTS
0045         I18n
0046         CoreAddons
0047         Config
0048         Service
0049         JobWidgets
0050         KIO
0051         Crash
0052         WidgetsAddons
0053         Wallet
0054         Notifications
0055         IdleTime
0056         WindowSystem
0057         SyntaxHighlighting
0058         StatusNotifierItem
0059 )
0060 
0061 ecm_find_qmlmodule(org.kde.kirigami 2.19)
0062 ecm_find_qmlmodule(org.kde.kitemmodels 1.0)
0063 ecm_find_qmlmodule(org.kde.kcmutils 1.0)
0064 ecm_find_qmlmodule(org.kde.syntaxhighlighting 1.0)
0065 
0066 find_package(Python3 3.8 COMPONENTS Interpreter)
0067 
0068 find_pythonmodule(psutil)
0069 find_pythonmodule(pygdbmi)
0070 find_pythonmodule(sentry_sdk)
0071 
0072 ecm_set_disabled_deprecation_versions(QT 5.15.2
0073     KF 5.240
0074 )
0075 
0076 if(CMAKE_SYSTEM_NAME MATCHES Linux)
0077     find_package(Systemd 249)
0078     set_package_properties(Systemd PROPERTIES TYPE REQUIRED PURPOSE "Coredumpd integration.")
0079 endif()
0080 
0081 if(Systemd_FOUND)
0082     find_package(PolkitQt6-1) # This is only used when extracting crashes from coredumpd
0083     set_package_properties(PolkitQt6-1 PROPERTIES TYPE REQUIRED PURPOSE "Reading kwin_wayland crashes")
0084 
0085     find_package(coredumpctl)
0086     set_package_properties(
0087         coredumpctl
0088         PROPERTIES
0089         TYPE RUNTIME
0090         DESCRIPTION "coredumpd CLI. part of systemd"
0091         PURPOSE "Required for coredumpd support to work at runtime!"
0092     )
0093 endif()
0094 
0095 if(MINGW)
0096     find_package(ZLIB REQUIRED)
0097     find_library(INTL_LIBRARY NAMES intl)
0098     find_library(IBERTY_LIBRARY NAMES iberty)
0099     find_library(BFD_LIBRARY NAMES bfd)
0100     if(IBERTY_LIBRARY)
0101         set(iberty_FOUND 1)
0102     else()
0103         set(msg "iberty")
0104     endif()
0105     if(BFD_LIBRARY)
0106         set(bfd_FOUND 1)
0107     else()
0108         set(msg "${msg} bfd")
0109     endif()
0110     if(INTL_LIBRARY)
0111         set(intl_FOUND 1)
0112     else()
0113         set(msg "${msg} intl")
0114     endif()
0115     if(msg)
0116         message(FATAL_ERROR "could not find ${msg}")
0117     endif()
0118 
0119     add_library(intl SHARED IMPORTED)
0120     set_target_properties(intl PROPERTIES IMPORTED_IMPLIB ${INTL_LIBRARY})
0121     add_library(iberty STATIC IMPORTED)
0122     set_target_properties(iberty PROPERTIES IMPORTED_LOCATION ${IBERTY_LIBRARY})
0123     add_library(bfd STATIC IMPORTED)
0124     set_target_properties(
0125         bfd
0126         PROPERTIES
0127             IMPORTED_LOCATION ${BFD_LIBRARY}
0128             # bfd header requires this to be defined
0129             INTERFACE_COMPILE_DEFINITIONS "PACKAGE;PACKAGE_VERSION"
0130     )
0131     find_path(BFD_INCLUDE_DIR bfd.h)
0132     include_directories(${BFD_INCLUDE_DIR})
0133 endif()
0134 
0135 include_directories("${CMAKE_CURRENT_BINARY_DIR}")
0136 
0137 add_subdirectory(src)
0138 
0139 # add clang-format target for all our real source files
0140 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0141 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0142 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0143 
0144 ecm_qt_install_logging_categories(
0145     EXPORT DRKONQI
0146     FILE drkonqi.categories
0147     DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0148 )
0149 
0150 ki18n_install(po)
0151 
0152 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)