CMake: Add missing linker flags for MSVC

This patch adds missing linker flags for MSVC in order to match
qmake's msvc-desktop.conf.

Change-Id: Ieb1206dae4517e8d9f36175f8fcebccd30e52d01
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Leander Beernaert 2020-02-25 13:53:13 +01:00
parent 4987476d9b
commit c1c011e355

View File

@ -133,4 +133,10 @@ if (MSVC)
endif()
target_compile_options(PlatformCommonInternal INTERFACE -Zc:wchar_t -utf-8)
target_link_options(PlatformCommonInternal INTERFACE
-DYNAMICBASE -NXCOMPAT
$<$<CONFIG:Release>:-OPT:REF>
$<$<CONFIG:RelWithDebInfo>:-OPT:REF>
)
endif()