You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
741 B

find_package(Qt5QuickTest ${REQUIRED_QT_VERSION} CONFIG QUIET)
if(NOT Qt5QuickTest_FOUND)
message(STATUS "Qt5QuickTest not found, autotests will not be built.")
return()
endif()
add_executable(qmltest qmltest.cpp)
target_link_libraries(qmltest Qt::QuickTest)
macro(qtquick_add_tests)
if (WIN32)
set(_extra_args -platform offscreen)
endif()
foreach(test ${ARGV})
add_test(NAME ${test}
COMMAND qmltest
${_extra_args}
-import ${CMAKE_BINARY_DIR}/bin
-input ${test}.qml
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endforeach()
endmacro()
qtquick_add_tests(
tst_triangleFilter
)