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

3 4
project(Konqueror)

Laurent Montel's avatar
Laurent Montel committed
5
set(QT_MIN_VERSION "5.5.0")
6
set(KF5_MIN_VERSION "5.27.0")  # needs KIO 5.27 for KFileItemActions::addPluginActionsTo
7

8
find_package(ECM 5.27.0 CONFIG REQUIRED)
9 10 11 12 13 14 15

include(FeatureSummary)

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

include(KDEInstallDirs)
include(KDECMakeSettings)
16
include(KDECompilerSettings NO_POLICY_SCOPE)
David Faure's avatar
David Faure committed
17
include(ECMPackageConfigHelpers)
18 19
include(ECMInstallIcons)
include(ECMSetupVersion)
20
include(ECMAddAppIcon)
Laurent Montel's avatar
Laurent Montel committed
21
include(ECMQtDeclareLoggingCategory)
22 23

set(KONQUEROR_LIB_VERSION "5.0.97")
24
set(KONQUEROR_VERSION "${KONQUEROR_LIB_VERSION}")
25

26
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Widgets WebEngineWidgets)
27
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Parts KCMUtils KHtml KDELibs4Support Archive Crash)
28

29
find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS Activities DocTools) # Optional
30

31 32 33 34 35 36
find_package(X11)
set(KONQ_HAVE_X11 ${X11_FOUND})

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

38
add_definitions(-DQT_USE_FAST_OPERATOR_PLUS)
39
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
40

41 42 43 44 45 46 47
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

48
configure_file (config-konqueror.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konqueror.h )
49
configure_file (konqueror-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/konqueror-version.h)
50
include_directories(${CMAKE_CURRENT_BINARY_DIR})
51

David Faure's avatar
David Faure committed
52
add_subdirectory( libkonq )
53
add_subdirectory( src )
54
add_subdirectory( client )
55
add_subdirectory( autotests )
56
add_subdirectory( webenginepart )
57

David Faure's avatar
David Faure committed
58 59
add_subdirectory( about )
add_subdirectory( pics )
60
#add_subdirectory( sidebar )
Laurent Montel's avatar
Laurent Montel committed
61
add_subdirectory( settings )
David Faure's avatar
David Faure committed
62
add_subdirectory( plugins )
63

64 65 66 67
if (KF5DocTools_FOUND)
    add_subdirectory( doc )
endif()

68
########### install files ###############
69
install( PROGRAMS
70
   kfmclient.desktop kfmclient_html.desktop kfmclient_war.desktop kfmclient_dir.desktop
71
   konqbrowser.desktop
Laurent Montel's avatar
Laurent Montel committed
72
   DESTINATION  ${KDE_INSTALL_APPDIR} )
73
install(FILES org.kde.konqueror.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
74 75 76

# 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
77
install( FILES org.kde.konqueror.desktop  DESTINATION  ${KDE_INSTALL_KSERVICES5DIR} )
78

79 80
install(FILES konqy_preload.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})

Laurent Montel's avatar
Laurent Montel committed
81 82
install(FILES konqueror.categories DESTINATION ${KDE_INSTALL_CONFDIR})

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