stuff-from-scratch/test/CMakeLists.txt

76 lines
2 KiB
CMake
Raw Normal View History

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"
)
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
compiler/TestTemplatingEngine.cpp
2022-08-01 15:14:14 +00:00
compression/TestStreamCompressor.cpp
2022-11-28 10:16:04 +00:00
compression/TestHuffmanStream.cpp
compression/TestLz77Encoder.cpp
2022-11-29 18:00:19 +00:00
core/TestByteUtils.cpp
core/TestBitStream.cpp
core/TestTomlReader.cpp
core/TestDataStructures.cpp
2022-01-01 18:46:31 +00:00
database/TestDatabase.cpp
2022-07-31 19:01:13 +00:00
fonts/TestFontReader.cpp
2022-05-15 13:58:31 +00:00
graphics/TestRasterizer.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-11-29 18:00:19 +00:00
web/TestXmlParser.cpp
)
2022-10-03 06:45:10 +00:00
if (${HAS_FFMPEG})
list(APPEND TestFiles
video/TestVideoDecoder.cpp
2022-10-03 06:45:10 +00:00
)
endif()
if (${HAS_WAYLAND})
list(APPEND TestFiles
windows/TestWaylandWindow.cpp
)
endif()
2022-11-11 09:14:41 +00:00
set(OpenGL_GL_PREFERENCE "GLVND")
find_package(OpenGL QUIET)
if (OpenGL_FOUND)
list(APPEND TestFiles
graphics/TestOpenGlRendering.cpp
)
2022-10-03 06:45:10 +00:00
endif()
2022-01-01 18:46:31 +00:00
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)
if (DBUS_FOUND)
include_directories(${DBUS_INCLUDE_DIRS})
link_directories(${DBUS_LIBRARY_DIRS})
list(APPEND TestFiles
ipc/TestDbus.cpp
)
endif()
2022-01-01 18:46:31 +00:00
2022-11-10 20:35:00 +00:00
if(UNIX)
find_package(Freetype QUIET)
if(Freetype_FOUND)
list(APPEND TestFiles
fonts/TestFreeTypeFontEngine.cpp
)
endif()
endif()
2022-11-29 18:00:19 +00:00
add_executable(test_runner test_runner.cpp ${TestFiles})
2021-05-23 20:02:38 +00:00
2022-11-29 18:00:19 +00:00
target_link_libraries(test_runner PUBLIC test_utils publishing core compiler fonts network database geometry audio graphics web client)