aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2023-03-09 09:01:06 +0100
committerChristian Stenger <christian.stenger@qt.io>2023-03-09 10:08:13 +0000
commit87be1f63708cb3fc2374021dac70e69a60246769 (patch)
treed09d87a0774a7e2b7b24f4cee92b055629c677ba
parente16ddefbdd0b077210af290314217087b418a37b (diff)
AutoTest: Tweak generated cmake project file a bit
Using Quick Test with cmake as "build tool" does not list the important part for the testing - the test sources. Explicitly add the qml files to the project and list them to be able to see and access them directly. Change-Id: Id136a017989a5bfb4b9058576e008edb792e5866 Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r--share/qtcreator/templates/wizards/autotest/files/tst.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/share/qtcreator/templates/wizards/autotest/files/tst.txt b/share/qtcreator/templates/wizards/autotest/files/tst.txt
index 5852153e89..7e1bd4c46e 100644
--- a/share/qtcreator/templates/wizards/autotest/files/tst.txt
+++ b/share/qtcreator/templates/wizards/autotest/files/tst.txt
@@ -49,6 +49,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
# no need to copy around qml test files for shadow builds - just set the respective define
add_definitions(-DQUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
+file(GLOB_RECURSE QML_FILES *.qml)
+add_custom_target(qmlfiles SOURCES ${QML_FILES})
+
@if "%{UseSetupCode}" === "true"
add_executable(%{TestCaseName} %{MainCppName}
setup.cpp setup.h)