CMakeLists.txt 3.1 KB
Newer Older
1
project(KHelpCenter)
2
set(PROJECT_VERSION "5.1.2")
3 4

cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
5
set(QT_MIN_VERSION "5.3.0")
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

find_package(ECM 0.0.11 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(ECMInstallIcons)
include(ECMMarkAsTest)
include(ECMMarkNonGuiExecutable)
include(FeatureSummary)
include(CheckIncludeFiles)

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Widgets
    DBus
)

24
find_package(KF5 REQUIRED COMPONENTS
25 26 27 28 29 30 31
    Config
    Init
    KCMUtils
    KHtml
    KDE4Support
)

32 33 34
add_subdirectory( plugins )
add_subdirectory( searchhandlers )
add_subdirectory( tests )
35
add_subdirectory( doc )
36

37 38
########### next target ###############

39
add_executable(khc_indexbuilder khc_indexbuilder.cpp)
40
target_compile_definitions(khc_indexbuilder PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
41
ecm_mark_nongui_executable(khc_indexbuilder)
42

Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
43
target_link_libraries(khc_indexbuilder KF5::CoreAddons KF5::I18n Qt5::DBus)
44

45
install(TARGETS khc_indexbuilder DESTINATION ${LIBEXEC_INSTALL_DIR})
46

47
configure_file(config-khelpcenter.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-khelpcenter.h )
48 49 50

########### next target ###############

Lukáš Tinkl's avatar
Lukáš Tinkl committed
51 52
add_definitions(-DTRANSLATION_DOMAIN="khelpcenter")

Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
set(khelpcenter_KDEINIT_SRCS
   navigator.cpp
   navigatoritem.cpp
   navigatorappitem.cpp
   view.cpp
   searchwidget.cpp
   searchengine.cpp
   docmetainfo.cpp
   docentrytraverser.cpp
   formatter.cpp
   glossary.cpp
   toc.cpp
   mainwindow.cpp
   docentry.cpp
   htmlsearch.cpp
   history.cpp
   application.cpp
   treebuilder.cpp
   infotree.cpp
   kcmhelpcenter.cpp
   htmlsearchconfig.cpp
   fontdialog.cpp
   plugintraverser.cpp
   scrollkeepertreebuilder.cpp
77 78
   searchhandler.cpp )

79
qt5_add_dbus_adaptor( khelpcenter_KDEINIT_SRCS org.kde.khelpcenter.kcmhelpcenter.xml kcmhelpcenter.h KCMHelpCenter )
80

81 82
kconfig_add_kcfg_files(khelpcenter_KDEINIT_SRCS prefs.kcfgc )
# kf5_add_app_icon(khelpcenter_KDEINIT_SRCS "${KDE4_INSTALL_DIR}/share/icons/oxygen/*/apps/help-browser.png")
83

84
kf5_add_kdeinit_executable( khelpcenter ${khelpcenter_KDEINIT_SRCS})
85
target_compile_definitions(kdeinit_khelpcenter PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
86
target_link_libraries(kdeinit_khelpcenter KF5::KHtml KF5::KCMUtils KF5::Service KF5::DBusAddons KF5::KDE4Support Qt5::Xml)
Ralf Habacker's avatar
Ralf Habacker committed
87 88
install(TARGETS kdeinit_khelpcenter  ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(TARGETS khelpcenter ${INSTALL_TARGETS_DEFAULT_ARGS})
89 90 91

########### install files ###############

92
install( PROGRAMS Help.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR} )
93 94
install( FILES khelpcenter.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
install( FILES khelpcenter.desktop  DESTINATION  ${SERVICES_INSTALL_DIR} )
95 96
install( FILES glossary.html.in table-of-contents.xslt glossary.xslt index.html.in DESTINATION ${DATA_INSTALL_DIR}/khelpcenter )
install( FILES khelpcenterui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/khelpcenter )
97
install( FILES org.kde.khelpcenter.kcmhelpcenter.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
98 99

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)