GLdc/tests/CMakeLists.txt

27 lines
699 B
CMake
Raw Normal View History

2023-08-26 19:34:11 +00:00
FILE(GLOB GL_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/test_*.h)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
SET(TEST_GENERATOR_BIN ${CMAKE_SOURCE_DIR}/tools/test_generator.py)
SET(TEST_MAIN_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/main.cpp)
ADD_CUSTOM_COMMAND(
OUTPUT ${TEST_MAIN_FILENAME}
COMMAND ${TEST_GENERATOR_BIN} --output ${TEST_MAIN_FILENAME} ${TEST_FILES} ${GL_TESTS}
DEPENDS ${TEST_FILES} ${GL_TESTS} ${TEST_GENERATOR_BIN}
)
add_executable(gldc_tests ${TEST_FILES} ${TEST_SOURCES} ${TEST_MAIN_FILENAME})
target_link_libraries(gldc_tests GLdc)
2023-08-31 07:45:05 +00:00
if(NOT PLATFORM_DREAMCAST)
2023-08-26 19:34:11 +00:00
set_target_properties(
gldc_tests
PROPERTIES
COMPILE_OPTIONS "-m32"
LINK_OPTIONS "-m32"
)
endif()