Added the test program to the CMake setup.

This commit is contained in:
Pietro Gagliardi 2016-06-01 14:07:43 -04:00
parent 0fff9c6fd6
commit 08c06f24c0
2 changed files with 38 additions and 3 deletions

View File

@ -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)

26
test/CMakeLists.txt Normal file
View File

@ -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
)