summaryrefslogtreecommitdiffstats
path: root/src/widgets/CMakeLists.txt
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-03-30 16:49:00 +0200
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-04-03 12:41:14 +0200
commit7e074bd8a0d0137043cf43aa2473d0c3082fe3be (patch)
tree09f4cf0858a0f27602e35db4ffb5612bad63e12a /src/widgets/CMakeLists.txt
parentc19504e708bf099922180ab99f3cf4b94d91fc7e (diff)
Use Qt CMake APIs to exclude files from Unity Build
This is a bit of a cleanup, mainly around unity build, and a few other minor things: - I replaced the direct inclusion of sources files using `set_source_files_properties`, and instead used `NO_UNITY_BUILD_SOURCES` when possible. In most cases, they are being excluded in their respective `qt_internal_extend_target` but sometimes I had to make a new extension. - In few cases, we had to manually exclude the NO_PCH files, so, I instead passed them directly to the NO_PCH_SOURCES which also exclude them from the unity build as well. - Removed a few unnecessary "" Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I466576592c1d115a2da4d88672c1e4b9f995f2ed Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/widgets/CMakeLists.txt')
-rw-r--r--src/widgets/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index 417f6a2d8e..39c197eeba 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -68,10 +68,10 @@ qt_internal_add_module(Widgets
GENERATE_CPP_EXPORTS
)
-if(APPLE)
- set_source_files_properties(kernel/qapplication.cpp
- PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
-endif()
+qt_internal_extend_target(Widgets CONDITION APPLE
+ NO_UNITY_BUILD_SOURCES
+ kernel/qapplication.cpp
+)
# Resources:
set(qstyle_resource_files