CMake: Ensure test defines are present for tools as well

Fixes the sdktool auto test.

Change-Id: I9e1779dc17a0cb79131e17182290255aed2f7d0e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Christian Stenger
2021-04-30 13:11:51 +02:00
parent c362df32ee
commit 0bcb5953ed
+4
View File
@@ -651,6 +651,10 @@ function(add_qtc_executable name)
endif()
endif()
if (WITH_TESTS)
set(TEST_DEFINES WITH_TESTS SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
endif()
add_executable("${name}" ${_arg_SOURCES})
extend_qtc_target("${name}"