summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-04-18 16:37:16 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-04-19 10:57:45 +0000
commitedc004ae7f5c42f95b3fd51524c481a4fe38be4e (patch)
tree277706a702b7f130da9b64a937311b81ebb08b89 /cmake
parente81212e01a11c75255de2a2b169ca525512bb463 (diff)
cmake: Add opt-out for adding -no_warn_duplicate_libraries linker flag
The classic linker (triggered via -ld_classic) doesn't support this flag, and we can't construct a genex that takes this into account, so add an opt-out for Qt WebEngine. Change-Id: I62418e0ff37fe8f5bdda2fa8d01b36a8fd44542a Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit b74369c03325e49132dc77f2a83af8fd25c81a8a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtInternalTargets.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index 576530752a..8e8dd5cc80 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -249,8 +249,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
# - https://gitlab.kitware.com/cmake/cmake/-/issues/25297 and
# - https://indiestack.com/2023/10/xcode-15-duplicate-library-linker-warnings/
set(is_xcode15 "$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,15>")
+ set(not_disabled "$<NOT:$<BOOL:$<TARGET_PROPERTY:QT_NO_DISABLE_WARN_DUPLICATE_LIBRARIES>>>")
target_link_options(PlatformCommonInternal INTERFACE
- "$<${is_xcode15}:LINKER:-no_warn_duplicate_libraries>")
+ "$<$<AND:${not_disabled},${is_xcode15}>:LINKER:-no_warn_duplicate_libraries>")
endif()
if(MSVC)