Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DolphinQt: Add quotes around QtIncludeDir on Windows #9719

Conversation

Dentomologist
Copy link
Contributor

As of 99a7243 Visual Studio gets hopelessly confused if QtIncludeDirectory has any spaces in the path. Adding quotes around the include directive solves the issue.

If the path $(QtIncludeDir) has a space in it Visual Studio interprets
the first part as the full path and chokes on the second part. Quote the
path to fix the problem.
@@ -32,7 +33,7 @@
-->
<AdditionalOptions>%(AdditionalOptions) /experimental:external</AdditionalOptions>
<AdditionalOptions>%(AdditionalOptions) /external:W0</AdditionalOptions>
<AdditionalOptions>%(AdditionalOptions) /external:I$(QtIncludeDir)</AdditionalOptions>
<AdditionalOptions>%(AdditionalOptions) /external:I "$(QtIncludeDirWithoutTrailingSeparator)"</AdditionalOptions>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I put quotes around QtIncludeDir the trailing separator escapes the second quote and causes VS to barf in new and exciting ways. I could put \" afterward so the trailing separator escapes the \ instead, which ends up with the right result, but I think this way is clearer (if more verbose).

@shuffle2
Copy link
Contributor

lgtm

@JosJuice
Copy link
Member

Do we need this for CMake as well?

Either way, this change makes sense, so I'll merge this.

@JosJuice JosJuice merged commit 5dec4a0 into dolphin-emu:master May 17, 2021
10 of 11 checks passed
@Dentomologist
Copy link
Contributor Author

Do we need this for CMake as well?

As far as I know CMake doesn't have an issue with this particular path, but some testing shows it has a different space-in-path issue I'm looking into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants