Merge pull request #10302 from RA-Kooi/CMakeQt

DolphinQt: Fix generation of /external:I flags
This commit is contained in:
JosJuice 2021-12-28 20:03:26 +01:00 committed by GitHub
commit 68fd94e063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -369,8 +369,15 @@ if (MSVC)
# Don't propogate warnings in qt headers to Dolphin
target_compile_options(dolphin-emu PRIVATE /experimental:external)
target_compile_options(dolphin-emu PRIVATE /external:W0)
target_compile_options(dolphin-emu PRIVATE "/external:I${Qt5Gui_PRIVATE_INCLUDE_DIRS}")
target_compile_options(dolphin-emu PRIVATE "/external:I${Qt5Widgets_PRIVATE_INCLUDE_DIRS}")
set(qtGui "")
set(qtGuiPriv "")
set(qtWidgetsPriv "")
list(TRANSFORM Qt5Gui_INCLUDE_DIRS PREPEND "/external:I" OUTPUT_VARIABLE qtGui)
list(TRANSFORM Qt5Gui_PRIVATE_INCLUDE_DIRS PREPEND "/external:I" OUTPUT_VARIABLE qtGuiPriv)
list(TRANSFORM Qt5Widgets_PRIVATE_INCLUDE_DIRS PREPEND "/external:I" OUTPUT_VARIABLE qtWidgetsPriv)
target_compile_options(dolphin-emu PRIVATE "${qtGui}")
target_compile_options(dolphin-emu PRIVATE "${qtGuiPriv}")
target_compile_options(dolphin-emu PRIVATE "${qtWidgets}")
endif()
if(WIN32)