Skip to content

Commit

Permalink
DolphinQt: Fix generation of /external:I flags
Browse files Browse the repository at this point in the history
Mainly concerns to building with Ninja, as that's what I tested it with.
Originally it would only prepend the first path with `/external:I`,
however all paths in the list have to be prepended with `/external:I`.
The MS documentation seems to support this, as it makes no mention of it
accepting a list.

This is probably the worst way to implement this, I am unfamiliar with
CMake.
  • Loading branch information
RA-Kooi committed Dec 27, 2021
1 parent 4dcf232 commit d6c9831
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Source/Core/DolphinQt/CMakeLists.txt
Expand Up @@ -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)
Expand Down

0 comments on commit d6c9831

Please sign in to comment.