mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-30 14:57:50 +00:00
Add RGBGFX tests
This commit is contained in:
21
test/CMakeLists.txt
Normal file
21
test/CMakeLists.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
add_executable(randtilegen gfx/randtilegen.c)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(randtilegen PRIVATE -Wno-vla)
|
||||
endif()
|
||||
|
||||
add_executable(rgbgfx_test gfx/rgbgfx_test.cpp)
|
||||
|
||||
install(TARGETS randtilegen rgbgfx_test DESTINATION ${rgbds_SOURCE_DIR}/test/gfx)
|
||||
|
||||
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()
|
||||
Reference in New Issue
Block a user