CMakeLists.txt 1.83 KB
Newer Older
1
2
3
4
include_directories(
  ${CMAKE_CURRENT_SOURCE_DIR}/..
)

5
set(indexer_SRCS
6
7
    ../emailindexer.cpp
    ../contactindexer.cpp
8
9
    ../akonotesindexer.cpp
    ../calendarindexer.cpp
10
    ../abstractindexer.cpp
11
    ../collectionindexer.cpp
12
13
14
15
    ../../search/pimsearchstore.cpp
    ../../search/email/emailsearchstore.cpp
    ../../search/email/agepostingsource.cpp
    ../../search/contact/contactsearchstore.cpp
Laurent Montel's avatar
Laurent Montel committed
16
    ../akonadi_indexer_agent_debug.cpp
17
18
)

19
set(indexer_LIBS
20
    Qt5::Test
Laurent Montel's avatar
Laurent Montel committed
21
    KF5::AkonadiCore
22
    KF5::AkonadiMime
23
    KF5::Mime
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
24
    KF5::Contacts
25
    KF5::CalendarCore
26
27
    KF5::AkonadiSearchPIM
    KF5::AkonadiSearchXapian
28
29
    KF5::I18n
    KF5::Codecs
Nicolas Fella's avatar
Nicolas Fella committed
30
    KF5::ConfigCore
31
)
32
33
34
35
36
37

set(indexertest_SRCS
    indexertest.cpp
    ${indexer_SRCS}
)

38
add_definitions(-DAKONADI_SEARCH_NO_PLUGINS=TRUE)
39

40
add_executable(indexertest ${indexertest_SRCS})
Laurent Montel's avatar
Laurent Montel committed
41
add_test(NAME indexertest COMMAND indexertest)
42
ecm_mark_as_test(indexertest)
43
44
45
46
47
target_link_libraries(indexertest
    ${indexer_LIBS}
)

set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
48
49
50
if (KDEPIM_RUN_AKONADI_TEST)
	set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
	set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)
51

52
53
54
55
56
57
	set(scheduler_SRCS
	    ../scheduler.cpp
	    ../index.cpp
	    ../collectionindexingjob.cpp
	    ${indexer_SRCS}
	)
58

59
60
	add_akonadi_isolated_test_advanced(schedulertest.cpp "${scheduler_SRCS}" "${indexer_LIBS}")
	add_akonadi_isolated_test_advanced(collectionindexingjobtest.cpp "${scheduler_SRCS}" "${indexer_LIBS}")
61
62


63
if(NOT WIN32)
64
add_executable(collectionquerytest collectionquerytest.cpp ${query_SRCS} ${indexer_SRCS} ${scheduler_SRCS})
Laurent Montel's avatar
Laurent Montel committed
65
add_test(NAME collectionquerytest COMMAND collectionquerytest)
66
ecm_mark_as_test(collectionquerytest)
67
68
69
target_link_libraries(collectionquerytest
    ${indexer_LIBS}
    ${QJSON_LIBRARIES}
Laurent Montel's avatar
Laurent Montel committed
70
    KF5::AkonadiSearchPIM
71
    KF5::ConfigCore
72
73
    Qt5::Widgets
    Qt5::DBus
74
)
75
endif()
76
endif()