Build: Simplify LibGfx test's CMakeLists.txt with serenity_test(..)

Now that everything is LibTest based, we can just use the normal
pattern of iterating + serenity_test(..).
This commit is contained in:
Brian Gianforcaro 2021-04-28 18:44:24 -07:00 committed by Andreas Kling
parent a8835b2d8f
commit 7a0d7525f1

View file

@ -1,16 +1,5 @@
file(GLOB CMD_SOURCES CONFIGURE_DEPENDS "*.cpp")
list(REMOVE_ITEM CMD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/BenchmarkGfxPainter.cpp)
list(REMOVE_ITEM CMD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/TestImageDecoder.cpp)
list(REMOVE_ITEM CMD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/TestFontHandling.cpp)
file(GLOB TEST_SOURCES CONFIGURE_DEPENDS "*.cpp")
# FIXME These tests do not use LibTest
foreach(CMD_SRC ${CMD_SOURCES})
get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE)
add_executable(${CMD_NAME} ${CMD_SRC})
target_link_libraries(${CMD_NAME} LibCore LibGUI)
install(TARGETS ${CMD_NAME} RUNTIME DESTINATION usr/Tests/LibGfx)
foreach(source ${TEST_SOURCES})
serenity_test(${source} LibGfx LIBS LibGUI)
endforeach()
serenity_test(TestFontHandling.cpp LibGfx LIBS LibGUI)
serenity_test(TestImageDecoder.cpp LibGfx LIBS LibGUI)
serenity_test(BenchmarkGfxPainter.cpp LibGfx LIBS LibGUI)