mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Copy CMake-built test executables to test directory Fixes CI failures on Windows. CI should also have failed on Unices, but it turns out we instead merely hit the fallback that the `make` path relies on (building those executables with `make`), which fails on Windows since `make` is not set up to find libpng.
19 lines
746 B
CMake
19 lines
746 B
CMake
|
|
add_executable(randtilegen gfx/randtilegen.cpp)
|
|
|
|
add_executable(rgbgfx_test gfx/rgbgfx_test.cpp)
|
|
|
|
install(TARGETS randtilegen rgbgfx_test DESTINATION ${rgbds_SOURCE_DIR}/test/gfx COMPONENT "Test support programs" EXCLUDE_FROM_ALL)
|
|
|
|
foreach(TARGET randtilegen rgbgfx_test)
|
|
if(LIBPNG_FOUND) # pkg-config
|
|
target_include_directories(${TARGET} PRIVATE ${LIBPNG_INCLUDE_DIRS})
|
|
target_link_directories(${TARGET} PRIVATE ${LIBPNG_LIBRARY_DIRS})
|
|
target_link_libraries(${TARGET} PRIVATE ${LIBPNG_LIBRARIES})
|
|
else()
|
|
target_compile_definitions(${TARGET} PRIVATE ${PNG_DEFINITIONS})
|
|
target_include_directories(${TARGET} PRIVATE ${PNG_INCLUDE_DIRS})
|
|
target_link_libraries(${TARGET} PRIVATE ${PNG_LIBRARIES})
|
|
endif()
|
|
endforeach()
|