@@ -73,8 +73,10 @@ add_dashview_try_test(horizontaljournal HorizontalJournal)
7373add_dashview_try_test(organicgrid OrganicGrid)
7474
7575# Install data files needed for tests
76−file(GLOB qml_files *.qml)
77−install(FILES ${qml_files} DESTINATION "${SHELL_APP_DIR}/tests/plugins/Dash")
76+file(GLOB qml_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.qml)
77+foreach(qml_file ${qml_files})
78+ add_qml_test_data(. "${qml_file}")
79+endforeach()
7880
7981# CardCreator test
8082add_executable(CardCreatorTestExec cardcreatortest.cpp)
@@ -88,7 +90,9 @@ install(DIRECTORY cardcreator DESTINATION "${SHELL_APP_DIR}/tests/plugins/Dash")
8890
8991# This one qml file imports a file in an arch-specific directory, so to make its
9092# import line relative, we install it into an arch-specific directory too.
91−install(FILES cardcreatortest.qml DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Dash")
93+add_qml_test_data(. cardcreatortest.qml
94+ DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Dash"
95+)
9296
9397# plain qml test
9498foreach(dash_test ScopeStyle ListViewWithPageHeaderQML CardAttributes CroppedImageMinimumSourceSize)