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 "5.26.80")
0005 set(PROJECT_VERSION_MAJOR 5)
0006 
0007 set(QT_MIN_VERSION "5.15.2")
0008 set(KF5_MIN_VERSION "5.98.0")
0009 
0010 set(CMAKE_CXX_STANDARD 17)
0011 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0012 
0013 find_package(ECM ${KF5_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 
0032 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)
0033 option(WITH_SENTRY "Submit crashes to KDE's Sentry instance" ${ECM_SOURCE_UNDER_VERSION_CONTROL})
0034 
0035 kde_enable_exceptions()
0036 
0037 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets Test DBus Concurrent Quick)
0038 
0039 find_package(
0040     KF5
0041     ${KF5_MIN_VERSION}
0042     REQUIRED
0043     COMPONENTS
0044         I18n
0045         CoreAddons
0046         Config
0047         Service
0048         JobWidgets
0049         KIO
0050         Crash
0051         Completion
0052         WidgetsAddons
0053         Wallet
0054         Notifications
0055         IdleTime
0056         WindowSystem
0057         SyntaxHighlighting
0058 )
0059 
0060 find_package(KUserFeedback)
0061 set_package_properties(KUserFeedback PROPERTIES TYPE REQUIRED PURPOSE "Checking whether feedback is enabled or not")
0062 
0063 ecm_find_qmlmodule(org.kde.kirigami 2.19)
0064 ecm_find_qmlmodule(org.kde.kitemmodels 1.0)
0065 ecm_find_qmlmodule(org.kde.kcm 1.6)
0066 ecm_find_qmlmodule(org.kde.syntaxhighlighting 1.0)
0067 
0068 ecm_set_disabled_deprecation_versions(QT 5.15.2
0069     KF 5.92
0070 )
0071 
0072 find_package(Systemd)
0073 set_package_properties(Systemd PROPERTIES TYPE RECOMMENDED PURPOSE "Coredumpd integration.")
0074 
0075 if(Systemd_FOUND)
0076     find_package(coredumpctl)
0077     set_package_properties(
0078         coredumpctl
0079         PROPERTIES
0080         TYPE RUNTIME
0081         DESCRIPTION "coredumpd CLI. part of systemd"
0082         PURPOSE "Required for coredumpd support to work at runtime!"
0083     )
0084 endif()
0085 
0086 if(MINGW)
0087     find_package(ZLIB REQUIRED)
0088     find_library(INTL_LIBRARY NAMES intl)
0089     find_library(IBERTY_LIBRARY NAMES iberty)
0090     find_library(BFD_LIBRARY NAMES bfd)
0091     if(IBERTY_LIBRARY)
0092         set(iberty_FOUND 1)
0093     else()
0094         set(msg "iberty")
0095     endif()
0096     if(BFD_LIBRARY)
0097         set(bfd_FOUND 1)
0098     else()
0099         set(msg "${msg} bfd")
0100     endif()
0101     if(INTL_LIBRARY)
0102         set(intl_FOUND 1)
0103     else()
0104         set(msg "${msg} intl")
0105     endif()
0106     if(msg)
0107         message(FATAL_ERROR "could not find ${msg}")
0108     endif()
0109 
0110     add_library(intl SHARED IMPORTED)
0111     set_target_properties(intl PROPERTIES IMPORTED_IMPLIB ${INTL_LIBRARY})
0112     add_library(iberty STATIC IMPORTED)
0113     set_target_properties(iberty PROPERTIES IMPORTED_LOCATION ${IBERTY_LIBRARY})
0114     add_library(bfd STATIC IMPORTED)
0115     set_target_properties(
0116         bfd
0117         PROPERTIES
0118             IMPORTED_LOCATION ${BFD_LIBRARY}
0119             # bfd header requires this to be defined
0120             INTERFACE_COMPILE_DEFINITIONS "PACKAGE;PACKAGE_VERSION"
0121     )
0122     find_path(BFD_INCLUDE_DIR bfd.h)
0123     include_directories(${BFD_INCLUDE_DIR})
0124 endif()
0125 
0126 include_directories("${CMAKE_CURRENT_BINARY_DIR}")
0127 
0128 add_subdirectory(src)
0129 
0130 # add clang-format target for all our real source files
0131 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0132 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0133 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0134 
0135 ecm_qt_install_logging_categories(
0136     EXPORT DRKONQI
0137     FILE drkonqi.categories
0138     DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0139 )
0140 
0141 ki18n_install(po)
0142 
0143 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)