summaryrefslogtreecommitdiffstats
path: root/testfiles/CMakeLists.txt
blob: 933d8478c14b07d953d798df1e1b37066ee729d5 (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
# -----------------------------------------------------------------------------
#
# -----------------------------------------------------------------------------
add_subdirectory(${GMOCK_DIR} ${CMAKE_BINARY_DIR}/gmock)

include_directories(SYSTEM ${GMOCK_DIR}/gtest/include
                           ${GMOCK_DIR}/include
                           ${CMAKE_SOURCE_DIR}/gtest/gtest/include)

set_source_files_properties(
		${CMAKE_BINARY_DIR}/src/inkscape-version.cpp
		PROPERTIES GENERATED TRUE)

include_directories(${CMAKE_BINARY_DIR}/src)

set(TEST_SOURCES
	attributes-test
	color-profile-test
	dir-util-test
	sp-object-test
	object-set-test)

set(TEST_LIBS
	gmock_main
	inkscape_base)

foreach(source ${TEST_SOURCES})
	add_executable(${source} src/${source}.cpp unittest.cpp doc-per-case-test.cpp)
	target_link_libraries(${source} ${TEST_LIBS})
	add_test(NAME ${source} COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source})
	add_dependencies(${source} inkscape_version)
	add_dependencies(check ${source})
endforeach()