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

Cmake 3.1.x generates WinMD reference HintPaths with unnecessary quotes #4

Open
sgtcoolguy opened this issue Jun 4, 2015 · 2 comments

Comments

@sgtcoolguy
Copy link

We've been using a build of cmake 3.1.x for some time now to build Windows Phone 8.1 and Store apps. If we add a reference to a winmd file on disk and the path contains spaces, the resulting entry in the vcxproj is incorrectly quoted.

Here's where we add the reference:

set_property(TARGET MyTarget
  PROPERTY VS_WINRT_REFERENCES
  "C:/ProgramData/Application\ Data/some/path/to/Component.winmd"
)

And the resulting section of the vcxproj is:

<Reference Include="Component">
      <IsWinMDFile>true</IsWinMDFile>
      <HintPath>"C:\ProgramData\Application Data\some\path\to\Component.winmd"</HintPath>    </Reference>

So when we run MSBuild, we get errors about being unable to resolve the reference, notably:

For SearchPath "{HintPathFromItem}".
                 Considered ""C:\ProgramData\Application Data\some\path\to\Component.winmd"", but it didn't exist.
@sgtcoolguy
Copy link
Author

For now, we work around this issue by "hacking" the contents of the vcxproj after it's generated by cmake, but before we run MSBuild - to remove the quotes.

@khouzam
Copy link

khouzam commented Jun 5, 2015

Thanks for reporting this. Looking at the code, the HintPath is not output in the vcxproj, but the whole path is added to the include. I'll look at this some more and see where that HintPath is being created.

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

No branches or pull requests

2 participants