2021-10-31 13:04:48 +00:00
|
|
|
add_library(test_utils STATIC
|
2021-05-23 20:02:38 +00:00
|
|
|
test_utils/TestCase.h
|
|
|
|
test_utils/TestCaseRunner.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(test_utils PUBLIC
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/test_utils"
|
2020-06-07 17:11:36 +00:00
|
|
|
)
|
2021-05-23 20:02:38 +00:00
|
|
|
|
|
|
|
list(APPEND TestFiles
|
|
|
|
audio/TestAudioWriter.cpp
|
2021-09-26 12:40:52 +00:00
|
|
|
audio/TestMidiReader.cpp
|
2022-07-31 19:01:13 +00:00
|
|
|
core/TestBinaryStream.cpp
|
2022-10-09 16:39:46 +00:00
|
|
|
core/TestTomlReader.cpp
|
2022-08-22 16:11:00 +00:00
|
|
|
compiler/TestLexer.cpp
|
2022-08-01 15:14:14 +00:00
|
|
|
compression/TestStreamCompressor.cpp
|
2022-01-01 18:46:31 +00:00
|
|
|
database/TestDatabase.cpp
|
2022-07-31 19:01:13 +00:00
|
|
|
fonts/TestFontReader.cpp
|
2022-01-01 18:46:31 +00:00
|
|
|
graphics/TestOpenGlRendering.cpp
|
2022-05-15 13:58:31 +00:00
|
|
|
graphics/TestRasterizer.cpp
|
2022-01-01 18:46:31 +00:00
|
|
|
ipc/TestDbus.cpp
|
2022-08-01 13:00:40 +00:00
|
|
|
image/TestPngReader.cpp
|
|
|
|
image/TestPngWriter.cpp
|
2022-05-18 07:42:44 +00:00
|
|
|
network/TestNetworkManagerClient.cpp
|
|
|
|
network/TestNetworkManagerServer.cpp
|
2022-10-03 06:45:10 +00:00
|
|
|
publishing/TestPdfWriter.cpp
|
|
|
|
web/TestMarkdownParser.cpp
|
2022-01-01 18:46:31 +00:00
|
|
|
web/TestXmlParser.cpp)
|
2022-10-03 06:45:10 +00:00
|
|
|
|
|
|
|
if (${HAS_FFMPEG})
|
|
|
|
list(APPEND TestFiles
|
|
|
|
video/TestVideoDecoder.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${HAS_WAYLAND})
|
|
|
|
list(APPEND TestFiles
|
|
|
|
windows/TestWaylandWindow.cpp
|
|
|
|
)
|
|
|
|
endif()
|
2022-01-01 18:46:31 +00:00
|
|
|
|
|
|
|
find_package(PkgConfig)
|
2022-08-17 08:04:52 +00:00
|
|
|
pkg_check_modules(DBUS dbus-1)
|
2022-01-01 18:46:31 +00:00
|
|
|
include_directories(${DBUS_INCLUDE_DIRS})
|
|
|
|
link_directories(${DBUS_LIBRARY_DIRS})
|
|
|
|
|
2022-08-28 13:55:22 +00:00
|
|
|
foreach(TestFile ${TestFiles})
|
|
|
|
cmake_path(GET TestFile FILENAME TestFileName)
|
|
|
|
cmake_path(GET TestFileName STEM TestName)
|
|
|
|
|
2021-10-31 13:04:48 +00:00
|
|
|
add_executable(${TestName} ${TestFile})
|
2022-08-28 13:57:54 +00:00
|
|
|
|
2022-08-01 15:14:14 +00:00
|
|
|
target_link_libraries(${TestName} PUBLIC core compression fonts network image publishing video database geometry audio graphics web client test_utils ${DBUS_LIBRARIES})
|
2022-08-28 13:55:22 +00:00
|
|
|
set_property(TARGET ${TestName} PROPERTY FOLDER test)
|
2021-05-23 20:02:38 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
|
|
|
add_executable(test_runner test_runner.cpp)
|
2022-08-01 13:00:40 +00:00
|
|
|
target_link_libraries(test_runner PUBLIC core fonts network database geometry audio graphics web client)
|