summaryrefslogtreecommitdiffstats
path: root/tests/CMakeLists.txt
blob: 6dfe07098d5d6d3f9b946f5f43395676fb2abbcf (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#################################################
#
#  (C) 2019 Michele Calgaro
#  michele (DOT) calgaro (AT) yahoo (DOT) it
#
#  Improvements and feedbacks are welcome
#
#  This file is released under GPL >= 3
#
#################################################

include_directories(
  ${TQT_INCLUDE_DIRS}
  ${TDE_INCLUDE_DIR}
  ${CMAKE_SOURCE_DIR}
  ${CMAKE_BINARY_DIR}
  ${CMAKE_SOURCE_DIR}/lib
  ${CMAKE_BINARY_DIR}/lib
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
)

link_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${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} )

tde_add_check_executable( testconstants
  SOURCES testconstants.cpp
  LINK kpilot-shared ${TQT_LIBRARIES}
  TEST
)

tde_add_check_executable( testcategories
  SOURCES testcategories.cpp
  LINK kpilot-shared ${TQT_LIBRARIES}
  TEST
)

tde_add_check_executable( testaddresses
  SOURCES testaddress.cpp
  LINK kpilot-shared ${TQT_LIBRARIES}
  TEST
)

tde_add_check_executable( testdatebook
  SOURCES testdatebook.cpp
  LINK kpilot-shared ${TQT_LIBRARIES}
  TEST
)

tde_add_check_executable( importaddresses
  SOURCES importaddresses.cpp
  LINK kpilot-shared tdeabc-shared tdeabc_file-shared ${TQT_LIBRARIES}
)
add_test(importaddresses ${EXECUTABLE_OUTPUT_PATH}/importaddresses --data-dir "${CMAKE_CURRENT_BINARY_DIR}" --address-file "${CMAKE_CURRENT_SOURCE_DIR}/data/AddressDB.pdb")

if (HAVE_CALENDARLOCAL_H)
	tde_add_check_executable( importdatebook
		SOURCES importdatebook.cpp
		LINK kpilot-shared kcal-shared ${TQT_LIBRARIES}
	  TEST
	)

	tde_add_check_executable( exportdatebook
		SOURCES exportdatebook.cpp
		LINK kpilot-shared kcal-shared ${TQT_LIBRARIES}
	  TEST
	)

	tde_add_check_executable( mergecalendars
		SOURCES mergecalendars.cpp
		LINK kpilot-shared kcal-shared ${TQT_LIBRARIES}
	  TEST
	)
endif (HAVE_CALENDARLOCAL_H)