Add missing compile definitions to the resource object library
The resource object library must be compiled with the definitions specified in Qt::Core. Missing the required definitions causes linker problems when QT_NAMESPACE is defined. Change-Id: If0ca20604e251822279e0d4906c47b94d3b4ceb4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9466b3629a391ae93c4f06d3627e3dc9e10bba9f) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
5c8fb37253
commit
71bf10ee5e
@ -1185,6 +1185,9 @@ function(__qt_propagate_generated_resource target resource_name generated_source
|
||||
|
||||
set(resource_target "${target}_resources_${resource_count}")
|
||||
add_library("${resource_target}" OBJECT "${generated_source_code}")
|
||||
target_compile_definitions("${resource_target}" PRIVATE
|
||||
"$<TARGET_PROPERTY:${QT_CMAKE_EXPORT_NAMESPACE}::Core,INTERFACE_COMPILE_DEFINITIONS>"
|
||||
)
|
||||
set_property(TARGET ${resource_target} APPEND PROPERTY _qt_resource_name ${resource_name})
|
||||
|
||||
# Save the path to the generated source file, relative to the the current build dir.
|
||||
|
Loading…
x
Reference in New Issue
Block a user