Add missing dependency of terminfo on termex.src
[centerim5.git] / tests / CMakeLists.txt
blob5f3f4a2d97653f2b03840ddad07829d448e8ea22
1 set(check_DEPENDS "")
2 if(TERMEX_TESTS)
3   add_custom_command(OUTPUT terminfo VERBATIM
4     COMMAND "${TIC_EXECUTABLE}" -o terminfo
5       "${CMAKE_CURRENT_SOURCE_DIR}/termex.src"
6     COMMAND "${CMAKE_COMMAND}" -E touch terminfo
7     DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/termex.src")
8   list(APPEND check_DEPENDS terminfo)
9 endif()
11 add_custom_target(check DEPENDS ${check_DEPENDS})
13 if(NOT TERMEX_TESTS)
14   add_custom_command(TARGET check POST_BUILD VERBATIM
15     COMMAND "${CMAKE_COMMAND}" -E echo "Tests cannot be run because required \
16 dependencies are missing, reconfigure the build and install the tools that are \
17 reported as needed for the testing"
18     COMMAND false)
19 endif()
21 add_compile_options(${SIGC_CFLAGS})
22 link_libraries(${SIGC_LDFLAGS} cppconsui)
24 add_executable(button button.cpp main.cpp)
25 add_dependencies(check button)
26 add_executable(colorpicker colorpicker.cpp main.cpp)
27 add_dependencies(check colorpicker)
28 add_executable(label label.cpp main.cpp)
29 add_dependencies(check label)
30 add_executable(submenu submenu.cpp main.cpp)
31 add_dependencies(check submenu)
32 add_executable(textentry textentry.cpp main.cpp)
33 add_dependencies(check textentry)
34 add_executable(textview textview.cpp main.cpp)
35 add_dependencies(check textview)
36 add_executable(treeview treeview.cpp main.cpp)
37 add_dependencies(check treeview)
38 add_executable(window window.cpp main.cpp)
39 add_dependencies(check window)