CMake: Fix testlib compile definitions not to be overridden

Amends 70464b355e

Pick-to: 6.2
Change-Id: I92424d830afc0aaad9001817be82a06adabd014b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Alexandru Croitor 2021-08-12 12:41:22 +02:00
parent e599be12d6
commit ab2669a9fa

View File

@ -119,7 +119,7 @@ set(qt_bool_tc_build_dir "$<BOOL:${qt_tc_build_dir}>")
set(qt_tc_build_dir_def
"$<IF:${qt_bool_tc_build_dir},${qt_tc_build_dir},$<TARGET_PROPERTY:BINARY_DIR>>"
)
set_property(TARGET Test PROPERTY INTERFACE_COMPILE_DEFINITIONS
set_property(TARGET Test APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS
QT_TESTCASE_BUILDDIR="${qt_tc_build_dir_def}"
QT_TESTCASE_SOURCEDIR="$<TARGET_PROPERTY:SOURCE_DIR>"
)