CMake: Allow force use of builtin testdata
Builtin testdata packages all test files into resources. This is used on mobile platforms by default, but it can be useful on other platforms as well. Add CMake option to force this on other platforms. Change-Id: I67c82bc735960be53b351ed16526cbfacfbe9bb6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
8473b9ad19
commit
f3bf304de7
@ -566,12 +566,14 @@ function(qt_internal_add_test name)
|
|||||||
LIBRARIES ${QT_CMAKE_EXPORT_NAMESPACE}::QuickTest
|
LIBRARIES ${QT_CMAKE_EXPORT_NAMESPACE}::QuickTest
|
||||||
)
|
)
|
||||||
|
|
||||||
qt_internal_extend_target("${name}" CONDITION arg_QMLTEST AND NOT ANDROID
|
qt_internal_extend_target("${name}"
|
||||||
|
CONDITION arg_QMLTEST AND NOT ANDROID AND NOT QT_FORCE_BUILTIN_TESTDATA
|
||||||
DEFINES
|
DEFINES
|
||||||
QUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
|
QUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
qt_internal_extend_target("${name}" CONDITION arg_QMLTEST AND ANDROID
|
qt_internal_extend_target("${name}"
|
||||||
|
CONDITION arg_QMLTEST AND (ANDROID OR QT_FORCE_BUILTIN_TESTDATA)
|
||||||
DEFINES
|
DEFINES
|
||||||
QUICK_TEST_SOURCE_DIR=":/"
|
QUICK_TEST_SOURCE_DIR=":/"
|
||||||
)
|
)
|
||||||
@ -774,7 +776,7 @@ function(qt_internal_add_test name)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ANDROID OR IOS OR WASM OR INTEGRITY OR arg_BUILTIN_TESTDATA)
|
if(ANDROID OR IOS OR WASM OR INTEGRITY OR arg_BUILTIN_TESTDATA OR QT_FORCE_BUILTIN_TESTDATA)
|
||||||
set(builtin_testdata TRUE)
|
set(builtin_testdata TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user