CMakeLists.txt 1.71 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
include_directories(
  ${XAPIAN_INCLUDE_DIR}
  ${LIBXML2_INCLUDE_DIR}
)

# Xapian does not like signals/slots #define's
add_definitions(-DQT_NO_KEYWORDS)

# Xapian indexer
set(khc_xapianindexer_SOURCES
   cachereader.cpp
   htmltextdump.cpp
   xapiancommon.cpp
   xapianindexer.cpp
)
add_executable(khc_xapianindexer ${khc_xapianindexer_SOURCES})
kde_target_enable_exceptions(khc_xapianindexer PRIVATE)
ecm_mark_nongui_executable(khc_xapianindexer)
Bastian Köcher's avatar
Bastian Köcher committed
19
target_link_libraries(khc_xapianindexer Qt5::Core KF5::Archive KF5::CoreAddons ${XAPIAN_LIBRARIES} ${LIBXML2_LIBRARIES})
20
21
if (${KF5_VERSION} VERSION_GREATER 5.35.0)
    # practically means >=5.36
22
23
    target_link_libraries(khc_xapianindexer KF5::DocTools)
endif()
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
install(TARGETS khc_xapianindexer DESTINATION ${LIBEXEC_INSTALL_DIR})

# Xapian search
set(khc_xapiansearch_SOURCES
   xapiancommon.cpp
   xapiansearch.cpp
)
add_executable(khc_xapiansearch ${khc_xapiansearch_SOURCES})
kde_target_enable_exceptions(khc_xapiansearch PRIVATE)
ecm_mark_nongui_executable(khc_xapiansearch)
target_link_libraries(khc_xapiansearch Qt5::Core ${XAPIAN_LIBRARIES})
install(TARGETS khc_xapiansearch DESTINATION ${LIBEXEC_INSTALL_DIR})

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/xapian.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/xapian.desktop)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/xapian.desktop DESTINATION ${DATA_INSTALL_DIR}/khelpcenter/searchhandlers)

40
if (NOT WIN32)
41
42
43
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/man.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/man.desktop )

44
45
########### install files ###############

Pino Toscano's avatar
Pino Toscano committed
46
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man.desktop DESTINATION ${DATA_INSTALL_DIR}/khelpcenter/searchhandlers)
Laurent Montel's avatar
Laurent Montel committed
47

Pino Toscano's avatar
Pino Toscano committed
48
install(PROGRAMS khc_mansearch.pl DESTINATION ${LIBEXEC_INSTALL_DIR})
49

50
endif ()