add_library(test_utils STATIC test_utils/TestCase.h test_utils/TestCaseRunner.cpp ) target_include_directories(test_utils PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/test_utils" ) list(APPEND TestFiles audio/TestAudioWriter.cpp audio/TestMidiReader.cpp compiler/TestTemplatingEngine.cpp compression/TestStreamCompressor.cpp compression/TestHuffmanStream.cpp compression/TestLz77Encoder.cpp core/TestByteUtils.cpp core/TestBitStream.cpp core/TestTomlReader.cpp core/TestDataStructures.cpp database/TestDatabase.cpp fonts/TestFontReader.cpp graphics/TestRasterizer.cpp image/TestPngReader.cpp image/TestPngWriter.cpp network/TestNetworkManagerClient.cpp network/TestNetworkManagerServer.cpp publishing/TestPdfWriter.cpp web/TestMarkdownParser.cpp web/TestXmlParser.cpp ) if (${HAS_FFMPEG}) list(APPEND TestFiles video/TestVideoDecoder.cpp ) endif() find_package(Wayland QUIET) if(WAYLAND_FOUND) list(APPEND TestFiles windows/TestWaylandWindow.cpp ) endif() set(OpenGL_GL_PREFERENCE "GLVND") find_package(OpenGL QUIET) if (OpenGL_FOUND) list(APPEND TestFiles graphics/TestOpenGlRendering.cpp ) endif() find_package(PkgConfig) pkg_check_modules(DBUS dbus-1 QUIET) if (DBUS_FOUND) include_directories(${DBUS_INCLUDE_DIRS}) link_directories(${DBUS_LIBRARY_DIRS}) list(APPEND TestFiles ipc/TestDbus.cpp ) endif() if(UNIX) find_package(Freetype QUIET) if(Freetype_FOUND) list(APPEND TestFiles fonts/TestFreeTypeFontEngine.cpp ) endif() endif() add_executable(test_runner test_runner.cpp ${TestFiles}) target_link_libraries(test_runner PUBLIC test_utils publishing core compiler fonts network database geometry audio graphics web client)