2020-04-18 02:32:11 +02:00
|
|
|
project(gds-render-test)
|
|
|
|
|
2020-04-19 00:40:03 +02:00
|
|
|
add_custom_target(test "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}" "-s" DEPENDS ${PROJECT_NAME})
|
2020-04-18 02:32:11 +02:00
|
|
|
|
|
|
|
if(NOT WIN32)
|
|
|
|
string(ASCII 27 Esc)
|
|
|
|
set(ColorReset "${Esc}[m")
|
|
|
|
set(ColorBold "${Esc}[1m")
|
|
|
|
set(Red "${Esc}[31m")
|
|
|
|
set(Green "${Esc}[32m")
|
|
|
|
set(Yellow "${Esc}[33m")
|
|
|
|
set(Blue "${Esc}[34m")
|
|
|
|
set(Magenta "${Esc}[35m")
|
|
|
|
set(Cyan "${Esc}[36m")
|
|
|
|
set(White "${Esc}[37m")
|
|
|
|
set(BoldRed "${Esc}[1;31m")
|
|
|
|
set(BoldGreen "${Esc}[1;32m")
|
|
|
|
set(BoldYellow "${Esc}[1;33m")
|
|
|
|
set(BoldBlue "${Esc}[1;34m")
|
|
|
|
set(BoldMagenta "${Esc}[1;35m")
|
|
|
|
set(BoldCyan "${Esc}[1;36m")
|
|
|
|
set(BoldWhite "${Esc}[1;37m")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
|
2020-04-18 03:23:15 +02:00
|
|
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/catch-framework")
|
|
|
|
|
|
|
|
aux_source_directory("geometric" GEOMETRIC_TEST_SOURCES)
|
|
|
|
set(TEST_SOURCES
|
|
|
|
${GEOMETRIC_TEST_SOURCES}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(DUT_SOURCES
|
|
|
|
"../geometric/vector-operations.c"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(${PROJECT_NAME} EXCLUDE_FROM_ALL "test-main.cpp" ${TEST_SOURCES} ${DUT_SOURCES})
|
2020-04-18 02:45:23 +02:00
|
|
|
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m version ${CMAKE_DL_LIBS})
|
|
|
|
|