CMake: Fix compile warnings when MSVC and -DFEATURE_static_runtime=ON
When using MSVC compiler and -DFEATURE_static_runtime=ON, qrc_foo.cpp and qtentrypoint_win.cpp are still compiled with '-MD' or '-MDd' flag, which will cause following warnings and other possible problems: warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library Pick-to: 6.0 Change-Id: I6794930a64e9cff4dc1c9632fc3fc64227848af0 Reviewed-by: Yuhang Zhao <2546789017@qq.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
0a7f9297a8
commit
21e4e85a57
@ -86,5 +86,7 @@ function(qt_internal_record_rcc_object_files target resource_targets)
|
||||
# Make sure that the target cpp files are compiled with the regular Qt internal compile
|
||||
# flags, needed for building iOS apps with qmake where bitcode is involved.
|
||||
target_link_libraries("${out_target}" PRIVATE Qt::PlatformModuleInternal)
|
||||
|
||||
qt_set_common_target_properties(${out_target})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
@ -44,6 +44,7 @@ if(using_entrypoint_library)
|
||||
|
||||
qt_handle_multi_config_output_dirs(EntryPointImplementation)
|
||||
qt_internal_add_target_aliases(EntryPointImplementation)
|
||||
qt_set_common_target_properties(EntryPointImplementation)
|
||||
endif()
|
||||
|
||||
# ---- Now we're ready to set up the platform specifics ----
|
||||
|
Loading…
x
Reference in New Issue
Block a user