diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake index bbb4db462e7..ecb6d17f360 100644 --- a/cmake/QtCreatorAPIInternal.cmake +++ b/cmake/QtCreatorAPIInternal.cmake @@ -182,7 +182,7 @@ endfunction() function(qtc_add_link_flags_no_undefined target) # needs CheckLinkerFlags - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18) + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18 AND NOT MSVC) set(no_undefined_flag "-Wl,--no-undefined") check_linker_flag(CXX ${no_undefined_flag} QTC_LINKER_SUPPORTS_NO_UNDEFINED) if (NOT QTC_LINKER_SUPPORTS_NO_UNDEFINED)