Warning, /utilities/konsole/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # Konsole project 0002 0003 # KDE Application Version, managed by release script 0004 set (RELEASE_SERVICE_VERSION_MAJOR "24") 0005 set (RELEASE_SERVICE_VERSION_MINOR "04") 0006 set (RELEASE_SERVICE_VERSION_MICRO "70") 0007 set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") 0008 0009 # Do not increase these requirements without a merge-request or/and 0010 # approval from maintainer(s). 0011 # minimal requirements 0012 0013 # See comments in https://invent.kde.org/utilities/konsole/-/commit/9d8e47298c81fc1e47c998eda1b6e980589274eb 0014 cmake_minimum_required(VERSION 3.16 FATAL_ERROR) 0015 0016 set(QT_MIN_VERSION "6.5.0") 0017 set(KF5_DEP_VERSION "5.240.0") 0018 set(QT_MAJOR_VERSION "6") 0019 0020 # Release script will create bugzilla versions 0021 project(konsole VERSION ${RELEASE_SERVICE_VERSION}) 0022 0023 find_package(ECM ${KF5_DEP_VERSION} REQUIRED NO_MODULE) 0024 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) 0025 0026 include(KDEInstallDirs) 0027 include(KDECMakeSettings) 0028 include(KDECompilerSettings NO_POLICY_SCOPE) 0029 include(ECMOptionalAddSubdirectory) 0030 include(ECMInstallIcons) 0031 include(ECMSetupVersion) 0032 include(ECMMarkNonGuiExecutable) 0033 include(ECMGenerateHeaders) 0034 include(GenerateExportHeader) 0035 include(FeatureSummary) 0036 include(ECMQtDeclareLoggingCategory) 0037 include(KDEClangFormat) 0038 # Remove OPTIONAL when we require EMC >= 5.79 0039 include(KDEGitCommitHooks OPTIONAL) 0040 include(CheckFunctionExists) 0041 include(CheckIncludeFiles) 0042 0043 # Allows passing e.g. -DECM_ENABLE_SANITIZERS='address;undefined' to cmake. 0044 include(ECMEnableSanitizers) 0045 0046 find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED 0047 Core 0048 DBus 0049 Multimedia 0050 PrintSupport 0051 Widgets 0052 Core5Compat 0053 ) 0054 0055 find_package(KF6 ${KF5_DEP_VERSION} REQUIRED 0056 Bookmarks 0057 Config 0058 ConfigWidgets 0059 CoreAddons 0060 Crash 0061 GuiAddons 0062 DBusAddons 0063 I18n 0064 IconThemes 0065 KIO 0066 NewStuff 0067 Notifications 0068 NotifyConfig 0069 Parts 0070 Service 0071 TextWidgets 0072 WidgetsAddons 0073 WindowSystem 0074 XmlGui 0075 ) 0076 0077 if (NOT WIN32) 0078 find_package(KF6 ${KF5_DEP_VERSION} REQUIRED 0079 GlobalAccel 0080 Pty 0081 ) 0082 endif() 0083 0084 find_package(KF6DocTools ${KF5_DEP_VERSION}) 0085 set_package_properties(KF6DocTools PROPERTIES DESCRIPTION 0086 "Tools to generate documentation" 0087 TYPE OPTIONAL 0088 ) 0089 0090 find_package(ICU 61.0 COMPONENTS uc i18n REQUIRED) 0091 0092 if(NOT APPLE) 0093 option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF) 0094 if (NOT WITHOUT_X11) 0095 find_package(X11) 0096 set_package_properties(X11 PROPERTIES TYPE OPTIONAL) 0097 set(HAVE_X11 ${X11_FOUND}) 0098 endif() 0099 endif() 0100 0101 # Check for function GETPWUID 0102 check_symbol_exists(getpwuid "pwd.h" HAVE_GETPWUID) 0103 0104 check_function_exists(malloc_trim HAVE_MALLOC_TRIM) 0105 0106 # See above includes for defaults 0107 add_definitions( 0108 -DQT_NO_FOREACH 0109 -DQT_STRICT_ITERATORS 0110 -DQT_NO_URL_CAST_FROM_STRING 0111 ) 0112 0113 set(CMAKE_CXX_STANDARD 17) 0114 set(CMAKE_CXX_STANDARD_REQUIRED ON) 0115 set(CMAKE_CXX_EXTENSIONS OFF) 0116 0117 include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ) 0118 0119 file(GLOB ICONS_SRCS "data/icons/*.png") 0120 0121 option(ENABLE_PLUGIN_SSHMANAGER "Build the SSHManager plugin" ON) 0122 option(ENABLE_PLUGIN_QUICKCOMMANDS "Build the Quick Commands plugin" ON) 0123 0124 add_subdirectory( src ) 0125 add_subdirectory( data ) 0126 add_subdirectory( desktop ) 0127 0128 if (NOT WIN32) 0129 add_subdirectory( kconf_update ) 0130 endif() 0131 0132 if (KF6DocTools_FOUND) 0133 add_subdirectory( doc/manual ) 0134 endif() 0135 0136 add_subdirectory( tools ) 0137 0138 # Conditionally install icons for Linux as they may not be provided by the user theme 0139 option(INSTALL_ICONS "Install icons" OFF) 0140 if (INSTALL_ICONS) 0141 include(ECMInstallIcons) 0142 ecm_install_icons( ICONS ${ICONS_SRCS} DESTINATION ${KDE_INSTALL_ICONDIR} ) 0143 endif() 0144 0145 ecm_qt_install_logging_categories( 0146 EXPORT KONSOLE 0147 FILE konsole.categories 0148 DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}" 0149 ) 0150 0151 ki18n_install( po ) 0152 if (KF6DocTools_FOUND) 0153 kdoctools_install( po ) 0154 endif() 0155 0156 if (ECM_VERSION VERSION_GREATER_EQUAL 5.101.0) 0157 install(FILES completions/konsole.zsh RENAME _konsole DESTINATION ${KDE_INSTALL_ZSHAUTOCOMPLETEDIR}) 0158 endif() 0159 0160 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) 0161 0162 # add clang-format target for all our real source files 0163 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.c *.cpp *.h *.hpp) 0164 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 0165 if (ECM_VERSION VERSION_GREATER_EQUAL 5.79.0) 0166 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) 0167 endif()