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