FreeRDP/libfreerdp/primitives/test/CMakeLists.txt

46 lines
1.2 KiB
CMake
Raw Normal View History

2013-01-19 02:32:58 +04:00
set(MODULE_NAME "TestPrimitives")
set(MODULE_PREFIX "TEST_FREERDP_PRIMITIVES")
2013-01-19 02:32:58 +04:00
set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c)
2013-01-19 02:32:58 +04:00
set(${MODULE_PREFIX}_TESTS
TestPrimitivesAdd.c
TestPrimitivesAlphaComp.c
TestPrimitivesAndOr.c
TestPrimitivesColors.c
TestPrimitivesCopy.c
TestPrimitivesSet.c
TestPrimitivesShift.c
TestPrimitivesSign.c
2016-03-02 17:16:49 +03:00
TestPrimitivesYUV.c
TestPrimitivesYCbCr.c
TestPrimitivesYCoCg.c)
2013-01-19 02:32:58 +04:00
create_test_sourcelist(${MODULE_PREFIX}_SRCS
${${MODULE_PREFIX}_DRIVER}
${${MODULE_PREFIX}_TESTS})
2013-01-19 02:32:58 +04:00
set(${MODULE_PREFIX}_EXTRA_SRCS
prim_test.c
prim_test.h
measure.h)
2013-01-19 02:32:58 +04:00
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_EXTRA_SRCS})
2013-01-19 02:32:58 +04:00
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
2013-01-19 02:32:58 +04:00
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
2013-01-19 02:32:58 +04:00
add_definitions(-DPRIM_STATIC=auto -DALL_PRIMITIVES_VERSIONS)
2013-01-19 02:32:58 +04:00
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
2014-07-03 00:30:04 +04:00
foreach(test ${${MODULE_PREFIX}_TESTS})
get_filename_component(TestName ${test} NAME_WE)
add_test(${TestName} ${TESTING_OUTPUT_DIRECTORY}/${MODULE_NAME} ${TestName})
endforeach()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/Test")