summaryrefslogtreecommitdiffstats
path: root/cmake/QtInternalTargets.cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-01-20 19:34:26 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2021-01-22 10:27:17 +0100
commite425a2a4b8dd469920eede57e9c4094523aa9ad7 (patch)
tree5f1d0d5f67eb95b23012a1b05c5c5536a5107848 /cmake/QtInternalTargets.cmake
parentdf0e98d4080f50de7ecacdc4cae079ab31280481 (diff)
Tune compilation flags to reduce libraries size
Add '_WINDLL' definition for the MSVC compilers family. Check the 'FEATURE_optimize_size' value before replacing compiler flags in the qt_internal_add_optimize_full_flags function. This is required, because Qt::Core and Qt::Gui modules lost their ability to shrink, when selecting the appropriate build type or features. Fixes: QTBUG-89952 Change-Id: I982c25ea84e4793b4006ead0ee516b3f3eb2a054 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtInternalTargets.cmake')
-rw-r--r--cmake/QtInternalTargets.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index 4ed2f1c21a..97386e22d8 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -149,6 +149,11 @@ endif()
if(WIN32)
target_compile_definitions(PlatformCommonInternal INTERFACE "UNICODE;_UNICODE")
+ if(MSVC)
+ target_compile_definitions(PlatformCommonInternal INTERFACE
+ "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:_WINDLL>"
+ )
+ endif()
endif()
if(UIKIT)