summaryrefslogtreecommitdiffstats
path: root/cmake/QtPlatformTargetHelpers.cmake
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-12-14 09:38:29 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-12-14 20:04:43 +0100
commitf370a4c49c686a54325efc5499449da8cdc4056e (patch)
tree402531d24fe457f0cd2cbbb6dc73ba8346c5febb /cmake/QtPlatformTargetHelpers.cmake
parent2f30e9d75195e01024df5df2ccdca4067fd448d5 (diff)
Support configure -platform linux-clang-libc++
Detect libc++ config and add appropriate compiler and linker flags. Pick-to: 6.3 Change-Id: I9ec91b3ace987599d4e79e43b1b75aa67cd5caeb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtPlatformTargetHelpers.cmake')
-rw-r--r--cmake/QtPlatformTargetHelpers.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/QtPlatformTargetHelpers.cmake b/cmake/QtPlatformTargetHelpers.cmake
index 9c95c0883f..49bc558cec 100644
--- a/cmake/QtPlatformTargetHelpers.cmake
+++ b/cmake/QtPlatformTargetHelpers.cmake
@@ -26,6 +26,11 @@ function(qt_internal_setup_public_platform_target)
target_link_libraries(Platform INTERFACE log)
endif()
+ if (QT_FEATURE_stdlib_libcpp)
+ target_compile_options(Platform INTERFACE "-stdlib=libc++")
+ target_link_options(Platform INTERFACE "-stdlib=libc++")
+ endif()
+
qt_set_msvc_cplusplus_options(Platform INTERFACE)
# Propagate minimum C++ 17 via Platform to Qt consumers (apps), after the global features