Warning, /network/konqueror/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
0003 include(CMakeDependentOption)
0004 
0005 # KDE Application Version, managed by release script
0006 set (RELEASE_SERVICE_MAJOR_VERSION "23")
0007 set (RELEASE_SERVICE_VERSION_MINOR "04")
0008 set (RELEASE_SERVICE_VERSION_MICRO "70")
0009 set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_MAJOR_VERSION}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0010 
0011 project(Konqueror VERSION ${RELEASE_SERVICE_VERSION})
0012 
0013 set(QT_MIN_VERSION "5.15.2")
0014 set(KF5_MIN_VERSION "5.101.0")
0015 
0016 
0017 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
0018 find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
0019 list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0020 
0021 include(KDEInstallDirs)
0022 include(KDECMakeSettings)
0023 include(ECMInstallIcons)
0024 include(ECMSetupVersion)
0025 include(ECMAddAppIcon)
0026 include(ECMQtDeclareLoggingCategory)
0027 include(CMakePackageConfigHelpers)
0028 include(GenerateExportHeader)
0029 
0030 
0031 if (QT_MAJOR_VERSION STREQUAL "6")
0032     set(KF_MAJOR_VERSION "6")
0033 else()
0034     set(KF_MAJOR_VERSION "5")
0035 endif()
0036 include(KDECompilerSettings NO_POLICY_SCOPE)
0037 remove_definitions(-DQT_NO_KEYWORDS)
0038 remove_definitions(-DQT_NO_CAST_FROM_ASCII)
0039 
0040 include(FeatureSummary)
0041 
0042 set(KONQUEROR_LIB_VERSION "${RELEASE_SERVICE_VERSION}")
0043 set(KONQUEROR_VERSION "${KONQUEROR_LIB_VERSION}")
0044 
0045 find_package(Qt${KF_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Widgets WebEngineWidgets)
0046 find_package(KF${KF_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS Parts KCMUtils Archive Crash WindowSystem IconThemes DBusAddons GuiAddons I18n Sonnet TextWidgets Codecs)
0047 if (KF_MAJOR_VERSION STRLESS "6")
0048     find_package(KF${KF_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS Init)
0049 endif()
0050 
0051 find_package(KF${KF_MAJOR_VERSION} ${KF_MIN_VERSION} COMPONENTS DocTools) # Optional
0052 if (KF_MAJOR_VERSION STRLESS "6")
0053     find_package(KF${KF_MAJOR_VERSION} ${KF_MIN_VERSION} COMPONENTS Activities DocTools) # Optional
0054     set(KActivities_FOUND ${KF5Activities_FOUND})
0055 else()
0056     find_package(PlasmaActivities ${KF_MIN_VERSION}) # Optional
0057     set(KActivities_FOUND ${PlasmaActivities_FOUND})
0058 endif()
0059 
0060 if (QT_MAJOR_VERSION STRLESS 6)
0061     find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras)
0062 endif()
0063 
0064 add_definitions(
0065     -DQT_USE_QSTRINGBUILDER
0066 )
0067 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
0068 
0069 cmake_dependent_option(DontUseKCookieJar "Don't use KCookieJar to manage cookies" FALSE "QT_MAJOR_VERSION STREQUAL 5" TRUE)
0070 if(DontUseKCookieJar)
0071 add_compile_definitions(MANAGE_COOKIES_INTERNALLY)
0072 else()
0073 endif()
0074 
0075 include (CheckSymbolExists)
0076 check_symbol_exists(mallinfo        "malloc.h"                 KDE_MALLINFO_MALLOC)
0077 check_symbol_exists(mallinfo        "stdlib.h"                 KDE_MALLINFO_STDLIB)
0078 # TODO KDE_MALLINFO_FIELD_hblkhd
0079 # TODO KDE_MALLINFO_FIELD_uordblks
0080 # TODO KDE_MALLINFO_FIELD_usmblks
0081 
0082 
0083 configure_file (config-konqueror.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konqueror.h )
0084 
0085 configure_file (konqueror-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/konqueror-version.h)
0086 include_directories(${CMAKE_CURRENT_BINARY_DIR})
0087 
0088 add_subdirectory( libkonq )
0089 add_subdirectory( src )
0090 add_subdirectory( client )
0091 if(BUILD_TESTING)
0092     add_subdirectory( autotests )
0093 endif()
0094 add_subdirectory( webenginepart )
0095 
0096 add_subdirectory( pics )
0097 add_subdirectory( sidebar )
0098 add_subdirectory( settings )
0099 add_subdirectory( plugins )
0100 add_subdirectory( kioworkers )
0101 
0102 if (KF${KF_MAJOR_VERSION}DocTools_FOUND)
0103     add_subdirectory( doc )
0104 endif()
0105 
0106 set(DEVELOPER_MODE false CACHE BOOL "Enables developer mode, which allows running separate instances of Konqueror")
0107 
0108 ########### install files ###############
0109 install( PROGRAMS
0110    kfmclient.desktop kfmclient_html.desktop kfmclient_war.desktop kfmclient_dir.desktop
0111    konqbrowser.desktop
0112    DESTINATION  ${KDE_INSTALL_APPDIR} )
0113 install(FILES org.kde.konqueror.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0114 
0115 # Make sure kfmclient can find konqueror.desktop even if people remove it from the K menu (#62242)
0116 # This is why konqueror.desktop is installed into services.
0117 #TODO KF6: check whether the above comment is still relevant (remove Konqueror from the K menu and check
0118 #whether kfmclient works correctly. If it doesn't, find out how to make it work in KF6
0119 if (KF_MAJOR_VERSION STRLESS "6")
0120     install( FILES org.kde.konqueror.desktop  DESTINATION  ${KDE_INSTALL_KSERVICES5DIR} )
0121 endif()
0122 # On Wayland the icon to use for the main window is read from the desktop file, which needs
0123 # to be in the applications directory, so it needs to be installed there, too (bug #452149)
0124 install( FILES org.kde.konqueror.desktop  DESTINATION  ${KDE_INSTALL_APPDIR} )
0125 
0126 install(FILES konqy_preload.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})
0127 
0128 install(FILES konqueror.categories  DESTINATION  ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
0129 
0130 ki18n_install(po)
0131 if (KF${KF_MAJOR_VERSION}DocTools_FOUND)
0132     kdoctools_install(po)
0133 endif()
0134 
0135 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0136