diff options
author | Brad King <brad.king@kitware.com> | 2019-02-04 12:47:08 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-04 12:47:15 (GMT) |
commit | 40e12882609619a902d19b94de442b2874bf7a45 (patch) | |
tree | 368bb0aafdd058b41fd1fc56fd55406a271f8d22 /Source | |
parent | dc4a2749a52cb7f96ad8d7146ee4d680a2beb5fa (diff) | |
parent | cff026dbc01f975857236a11fc033af48b5e130a (diff) | |
download | CMake-40e12882609619a902d19b94de442b2874bf7a45.zip CMake-40e12882609619a902d19b94de442b2874bf7a45.tar.gz CMake-40e12882609619a902d19b94de442b2874bf7a45.tar.bz2 |
Merge topic 'winrtrefs'
cff026dbc0 VS: Fix WinRT component references
6c21722adb Tests: Fix VSWinStorePhone test with Windows 10 SDK 17763
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2906
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 9d7dd07..c4040e1 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3884,8 +3884,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0) this->WriteDotNetReferenceCustomTags(e2, name); // If the dependency target is not managed (compiled with /clr or - // C# target) we cannot reference it and have to set - // 'ReferenceOutputAssembly' to false. + // C# target) and not a WinRT component we cannot reference it and + // have to set 'ReferenceOutputAssembly' to false. auto referenceNotManaged = dt->GetManagedType("") < cmGeneratorTarget::ManagedType::Mixed; // Workaround to check for manually set /clr flags. @@ -3902,6 +3902,12 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0) if (referenceNotManaged && dt->GetType() == cmStateEnums::STATIC_LIBRARY) { referenceNotManaged = !dt->IsCSharpOnly(); } + + // Referencing WinRT components is okay. + if (referenceNotManaged) { + referenceNotManaged = !dt->GetPropertyAsBool("VS_WINRT_COMPONENT"); + } + if (referenceNotManaged) { e2.Element("ReferenceOutputAssembly", "false"); e2.Element("CopyToOutputDirectory", "Never"); |