2022-11-30 18:28:50 +00:00
|
|
|
|
|
|
|
set(PLATFORM_UNIT_TEST_FILES)
|
|
|
|
if(UNIX)
|
|
|
|
find_package(Freetype QUIET)
|
|
|
|
if(Freetype_FOUND)
|
|
|
|
set(PLATFORM_UNIT_TEST_FILES
|
2023-01-25 16:51:36 +00:00
|
|
|
TestFreeTypeFontEngine.cpp
|
2022-11-30 18:28:50 +00:00
|
|
|
)
|
|
|
|
endif()
|
2023-01-10 17:24:37 +00:00
|
|
|
else()
|
|
|
|
set(PLATFORM_UNIT_TEST_FILES
|
2023-01-25 16:51:36 +00:00
|
|
|
TestDirectWriteFontEngine.cpp
|
2023-01-10 17:24:37 +00:00
|
|
|
)
|
2022-11-30 18:28:50 +00:00
|
|
|
endif()
|
2023-01-25 16:51:36 +00:00
|
|
|
|
|
|
|
set(MODULE_NAME fonts)
|
2022-11-30 18:28:50 +00:00
|
|
|
|
2023-01-25 16:51:36 +00:00
|
|
|
list(APPEND UNIT_TEST_FILES
|
|
|
|
TestFontReader.cpp
|
|
|
|
${PLATFORM_UNIT_TEST_FILES}
|
|
|
|
)
|
2022-11-30 18:28:50 +00:00
|
|
|
|
2023-01-25 16:51:36 +00:00
|
|
|
set(UNIT_TEST_TARGET_NAME ${MODULE_NAME}_unit_tests)
|
|
|
|
|
|
|
|
add_executable(${UNIT_TEST_TARGET_NAME} ${CMAKE_SOURCE_DIR}/test/test_runner.cpp ${UNIT_TEST_FILES})
|
|
|
|
target_link_libraries(${UNIT_TEST_TARGET_NAME} PUBLIC test_utils fonts)
|
|
|
|
set_property(TARGET ${UNIT_TEST_TARGET_NAME} PROPERTY FOLDER test/${MODULE_NAME})
|