summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2022-10-14 18:00:24 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2022-10-31 15:39:14 +0200
commit703ac911f91aa2e6f2fc206ecae7ee97620cd476 (patch)
tree3320736e224b671bf5218cec99de7643b7d751a1 /cmake
parentecc425039755c1bae7c55005df2338f245939ce8 (diff)
Make sure that the generated dbus sources get extra compiler flags
Process the regular SOURCES and DBus sources the same way in the qt_internal_extend_target call. Previously the specified COMPILE_FLAGS had no effect on DBus sources. [ChangeLog][General] The internal DBus source files that are generated, now are compiled with the same set of compilation flags and options as other source files of the Qt module. Change-Id: I9bdeb8f45c6af1b0cb0235425b0ff7efcb952d59 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtTargetHelpers.cmake11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake
index 23a131e682..219d272389 100644
--- a/cmake/QtTargetHelpers.cmake
+++ b/cmake/QtTargetHelpers.cmake
@@ -76,6 +76,11 @@ function(qt_internal_extend_target target)
list(APPEND dbus_sources "${interface}")
endforeach()
+ set(all_sources
+ ${arg_SOURCES}
+ ${dbus_sources}
+ )
+
get_target_property(target_type ${target} TYPE)
set(is_library FALSE)
set(is_interface_lib FALSE)
@@ -108,14 +113,14 @@ function(qt_internal_extend_target target)
# functions. The property itself is not exported and should only be used in the Qt internal
# build tree.
if(NOT is_interface_lib OR CMAKE_VERSION VERSION_GREATER_EQUAL "3.19")
- target_sources("${target}" PRIVATE ${arg_SOURCES} ${dbus_sources})
+ target_sources("${target}" PRIVATE ${all_sources})
if(arg_COMPILE_FLAGS)
- set_source_files_properties(${arg_SOURCES} PROPERTIES
+ set_source_files_properties(${all_sources} PROPERTIES
COMPILE_FLAGS "${arg_COMPILE_FLAGS}")
endif()
else()
set_property(TARGET ${target} APPEND PROPERTY
- _qt_internal_target_sources ${arg_SOURCES} ${dbus_sources})
+ _qt_internal_target_sources ${all_sources})
endif()
set(public_visibility_option "PUBLIC")