From 08c06f24c031550e36171fd7bad07fce5e7dd063 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 1 Jun 2016 14:07:43 -0400 Subject: [PATCH] Added the test program to the CMake setup. --- CMakeLists.txt | 15 ++++++++++++--- test/CMakeLists.txt | 26 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c6c3bb5..adb78166 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,6 @@ endmacro() if(APPLE) set(_OSDIR darwin) - set(_OSSRCEXT m) set(_SETVERSION TRUE) set(_VERSION "A") @@ -65,7 +64,6 @@ if(APPLE) set(CMAKE_MACOSX_RPATH TRUE) elseif(WIN32) set(_OSDIR windows) - set(_OSSRCEXT cpp) set(_SETVERSION FALSE) # note that usp10 comes before gdi32 @@ -81,7 +79,6 @@ elseif(WIN32) endif() else() set(_OSDIR unix) - set(_OSSRCEXT c) set(_SETVERSION TRUE) set(_VERSION "0") @@ -144,3 +141,15 @@ else() endif() set_target_properties(libui PROPERTIES OUTPUT_NAME ui) + +macro(_add_exec _name) + add_executable(${_name} + WIN32 EXCLUDE_FROM_ALL + ${ARGN}) + target_link_libraries(${_name} libui) +endmacro() + +add_subdirectory("test") +set_target_properties(tester PROPERTIES + OUTPUT_NAME test + WIN32_EXECUTABLE FALSE) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 00000000..6c2b2daf --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,26 @@ +# 1 june 2016 + +include_directories(.. .) + +_add_exec(tester + drawtests.c + main.c + menus.c + page1.c + page10.c + page11.c + page12.c + page13.c + page2.c + page3.c + page4.c + page5.c + page6.c + page7.c + page7a.c + page7b.c + page7c.c + page8.c + page9.c + spaced.c +)