summaryrefslogtreecommitdiffstats
path: root/cmake/QtBaseGlobalTargets.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-02-17 09:54:59 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2020-02-18 14:44:57 +0100
commiteaa29378b9009e36f643004e2df5265cc63409f6 (patch)
treef3ae00b3202c3b1d188db3067f242809ad915743 /cmake/QtBaseGlobalTargets.cmake
parent00eeed234f7c4cfc357b17424e0dcd714ff65e70 (diff)
CMake: Fix c++ standard config tests with MSVC
Need to pass additional -Zc:__cplusplus flag when using MSVC, so that the __cplusplus define has correct values. Additionally make the option be propagated to consumers of Qt via the public Platform target, which QtCore links against. Change-Id: Ie1283c25334b93f993529beb7fb32bdb001627f5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Diffstat (limited to 'cmake/QtBaseGlobalTargets.cmake')
-rw-r--r--cmake/QtBaseGlobalTargets.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index fb27618499..182d2986f0 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -17,6 +17,8 @@ if (ANDROID)
target_link_libraries(Platform INTERFACE log)
endif()
+qt_enable_msvc_cplusplus_define(Platform INTERFACE)
+
set(__GlobalConfig_path_suffix "${INSTALL_CMAKE_NAMESPACE}")
qt_path_join(__GlobalConfig_build_dir ${QT_CONFIG_BUILD_DIR} ${__GlobalConfig_path_suffix})
qt_path_join(__GlobalConfig_install_dir ${QT_CONFIG_INSTALL_DIR} ${__GlobalConfig_path_suffix})