diff options
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0375700..c606d22 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -554,6 +554,20 @@ set_target_properties(throwntogethertest PROPERTIES COMPILE_FLAGS "-DENABLE_OPEN target_link_libraries(throwntogethertest tests-offscreen tests-cgal ${OPENCSG_LIBRARY} ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${COCOA_LIBRARY}) # +# gui tests (simple wrappers around the GUI binary built by qmake) +# +if(APPLE) + set(GUI_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../OpenSCAD.app/Contents/MacOS/OpenSCAD") +elseif(WIN32) + set(GUI_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../Release/openscad.exe") +else() + set(GUI_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../openscad") +endif() + +add_executable(guicgalpngtest guicgalpngtest.cc) +set_target_properties(guicgalpngtest PROPERTIES COMPILE_FLAGS "-DBINPATH=${GUI_BINPATH}") + +# # Tags tests as disabled. This is more convenient than removing them manually # from the lists of filenames # @@ -790,19 +804,6 @@ foreach(FILE ${EXAMPLE_FILES}) set_test_config(Examples ${TEST_FULLNAME}) endforeach() -# GUI test - -message(STATUS "copying openscad GUI binary...") -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/guicgalpngtest - DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -IF (APPLE) - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../OpenSCAD.app - DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -ELSE() - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../openscad - DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -ENDIF() - # Add tests add_cmdline_test(echotest txt ${ECHO_FILES}) |