ba48e1b809
moc, qmake, rcc, and uic tests execute corresponding tools inside the test executables. This adds dependencies explicitly, to execute tests using _check targets, without the need to manually build dependencies. Pick-to: 6.3 6.2 Fixes: QTBUG-98576 Change-Id: I8b989276e21199b867591f7b0f6af9204695ac13 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
32 lines
703 B
CMake
32 lines
703 B
CMake
# Collect test data
|
|
file(GLOB_RECURSE test_data_glob
|
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
testdata/*)
|
|
list(APPEND test_data ${test_data_glob})
|
|
|
|
qt_internal_add_test(tst_qmake
|
|
SOURCES
|
|
testcompiler.cpp testcompiler.h
|
|
tst_qmake.cpp
|
|
TESTDATA ${test_data}
|
|
)
|
|
|
|
set(dependencies
|
|
Qt::moc
|
|
Qt::qmake
|
|
)
|
|
if(TARGET Qt::Gui)
|
|
list(APPEND dependencies Qt::Gui)
|
|
endif()
|
|
if(TARGET Qt::Widgets)
|
|
list(APPEND dependencies Qt::Widgets)
|
|
endif()
|
|
if(TARGET Qt::rcc)
|
|
list(APPEND dependencies Qt::rcc)
|
|
endif()
|
|
if(TARGET Qt::uic)
|
|
list(APPEND dependencies Qt::uic)
|
|
endif()
|
|
# Add dependencies that are implicitly used inside the test
|
|
add_dependencies(tst_qmake ${dependencies})
|