summaryrefslogtreecommitdiffstats
path: root/tests/CMakeLists.txt
blob: f147b5c380c48b90a178bb27f0ccbabd1e87d8a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
link_directories(${CMAKE_BINARY_DIR}/lib ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_BINARY_DIR}/lib)

# Tests don't need to go into toplevel/bin, they are fine in the current dir.
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )

set(testconstants_SRCS testconstants.cc)
trinity_add_executable(testconstants ${testconstants_SRCS})
target_link_libraries(testconstants kpilot ${TQT_LIBRARIES})
add_test(testconstants ${EXECUTABLE_OUTPUT_PATH}/testconstants)

set(testcategories_SRCS testcategories.cc)
trinity_add_executable(testcategories ${testcategories_SRCS})
target_link_libraries(testcategories kpilot ${TQT_LIBRARIES})
add_test(testcategories ${EXECUTABLE_OUTPUT_PATH}/testcategories)

set(testaddresses_SRCS testaddress.cc)
trinity_add_executable(testaddresses ${testaddresses_SRCS})
target_link_libraries(testaddresses kpilot ${TQT_LIBRARIES})
add_test(testaddresses ${EXECUTABLE_OUTPUT_PATH}/testaddresses)

set(testdatebook_SRCS testdatebook.cc)
trinity_add_executable(testdatebook ${testdatebook_SRCS})
target_link_libraries(testdatebook kpilot ${TQT_LIBRARIES})
add_test(testdatebook ${EXECUTABLE_OUTPUT_PATH}/testdatebook)

set(testidmapper_SRCS testidmapper.cc)
trinity_add_executable(testidmapper ${testidmapper_SRCS})
target_link_libraries(testidmapper kpilot ${TQT_LIBRARIES})
add_test(testidmapper ${EXECUTABLE_OUTPUT_PATH}/testidmapper)

if (HAVE_CALENDARLOCAL_H)
	set(importdatebook_SRCS importdatebook.cc)
	set(exportdatebook_SRCS exportdatebook.cc)
	set(mergecalendars_SRCS mergecalendars.cc)
	trinity_add_executable(importdatebook ${importdatebook_SRCS})
	trinity_add_executable(exportdatebook ${exportdatebook_SRCS})
	trinity_add_executable(mergecalendars ${mergecalendars_SRCS})
	target_link_libraries(importdatebook kpilot ${TQT_LIBRARIES} kcal)
	target_link_libraries(exportdatebook kpilot ${TQT_LIBRARIES} kcal)
	target_link_libraries(mergecalendars ${TQT_LIBRARIES} kcal)
	add_test(importdatebook ${EXECUTABLE_OUTPUT_PATH}/importdatebook)
	add_test(exportdatebook ${EXECUTABLE_OUTPUT_PATH}/exportdatebook)
	add_test(mergecalendars ${EXECUTABLE_OUTPUT_PATH}/mergecalendars)
endif (HAVE_CALENDARLOCAL_H)

set(importaddresses_SRCS importaddresses.cc)
trinity_add_executable(importaddresses ${importaddresses_SRCS})
target_link_libraries(importaddresses kpilot ${TQT_LIBRARIES} tdeabc tdeabc_file)
add_test(importaddresses ${EXECUTABLE_OUTPUT_PATH}/importaddresses)