CMakeLists.txt 3.3 KB
Newer Older
1
cmake_minimum_required(VERSION 3.0)
2

David Faure's avatar
David Faure committed
3 4
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "20")
5
set (RELEASE_SERVICE_VERSION_MINOR "08")
6
set (RELEASE_SERVICE_VERSION_MICRO "2")
David Faure's avatar
David Faure committed
7 8
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")

9 10
project(Konqueror)

11
set(QT_MIN_VERSION "5.12.0")
12
set(KF5_MIN_VERSION "5.71.0")
13

14
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
15 16 17 18 19 20 21

include(FeatureSummary)

set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})

include(KDEInstallDirs)
include(KDECMakeSettings)
22
include(KDECompilerSettings NO_POLICY_SCOPE)
23 24
include(ECMInstallIcons)
include(ECMSetupVersion)
25
include(ECMAddAppIcon)
Laurent Montel's avatar
Laurent Montel committed
26
include(ECMQtDeclareLoggingCategory)
27
include(CMakePackageConfigHelpers)
28

David Faure's avatar
David Faure committed
29
set(KONQUEROR_LIB_VERSION "${RELEASE_SERVICE_VERSION}")
30
set(KONQUEROR_VERSION "${KONQUEROR_LIB_VERSION}")
31

32
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Widgets WebEngineWidgets)
Nicolas Fella's avatar
Nicolas Fella committed
33
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Parts KCMUtils Archive Crash WindowSystem Init IconThemes DBusAddons)
34
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS KDELibs4Support)
35

36
find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS Activities DocTools) # Optional
37

38 39 40 41
if(NOT Qt5WebEngineWidgets_VERSION VERSION_LESS "5.13.0")
  add_definitions(-DWEBENGINE_PDF_VIEWER)
endif()

42 43 44 45 46 47
find_package(X11)
set(KONQ_HAVE_X11 ${X11_FOUND})

if (X11_FOUND)
  find_package(Qt5 REQUIRED X11Extras)
endif(X11_FOUND)
48

49
add_definitions(-DQT_USE_FAST_OPERATOR_PLUS)
50
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
51

52 53 54 55 56 57 58
include (CheckSymbolExists)
check_symbol_exists(mallinfo        "malloc.h"                 KDE_MALLINFO_MALLOC)
check_symbol_exists(mallinfo        "stdlib.h"                 KDE_MALLINFO_STDLIB)
# TODO KDE_MALLINFO_FIELD_hblkhd
# TODO KDE_MALLINFO_FIELD_uordblks
# TODO KDE_MALLINFO_FIELD_usmblks

59
configure_file (config-konqueror.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konqueror.h )
60
configure_file (konqueror-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/konqueror-version.h)
61
include_directories(${CMAKE_CURRENT_BINARY_DIR})
62

David Faure's avatar
David Faure committed
63
add_subdirectory( libkonq )
64
add_subdirectory( src )
65
add_subdirectory( client )
66 67 68
if(BUILD_TESTING)
    add_subdirectory( autotests )
endif()
69
add_subdirectory( webenginepart )
70

David Faure's avatar
David Faure committed
71
add_subdirectory( pics )
72
add_subdirectory( sidebar )
Laurent Montel's avatar
Laurent Montel committed
73
add_subdirectory( settings )
David Faure's avatar
David Faure committed
74
add_subdirectory( plugins )
75

76 77 78 79
if (KF5DocTools_FOUND)
    add_subdirectory( doc )
endif()

80
########### install files ###############
81
install( PROGRAMS
82
   kfmclient.desktop kfmclient_html.desktop kfmclient_war.desktop kfmclient_dir.desktop
83
   konqbrowser.desktop
Laurent Montel's avatar
Laurent Montel committed
84
   DESTINATION  ${KDE_INSTALL_APPDIR} )
85
install(FILES org.kde.konqueror.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
86 87 88

# Make sure kfmclient can find konqueror.desktop even if people remove it from the K menu (#62242)
# This is why konqueror.desktop is installed into services.
Laurent Montel's avatar
Laurent Montel committed
89
install( FILES org.kde.konqueror.desktop  DESTINATION  ${KDE_INSTALL_KSERVICES5DIR} )
90

91 92
install(FILES konqy_preload.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})

93 94 95 96 97
if (${ECM_VERSION} STRGREATER "5.58.0")
    install(FILES konqueror.categories  DESTINATION  ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
else()
    install(FILES konqueror.categories  DESTINATION ${KDE_INSTALL_CONFDIR})
endif()
Laurent Montel's avatar
Laurent Montel committed
98

Laurent Montel's avatar
Laurent Montel committed
99
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)