Skip to content

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

@sgtcoolguy

Description

@sgtcoolguy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions