summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorMikhail Korolev <stilriv@gmail.com>2018-08-28 18:14:12 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-30 16:46:57 (GMT)
commite78a0c8e8a0b002a1e0e71672efcf96418c3a26d (patch)
treedd951c2102c51545195b6e5e8c93bead8201acdb /Source/cmVisualStudio10TargetGenerator.cxx
parentc549deed7fc6dec2c3f5f3ab5f9ded1acb916239 (diff)
downloadCMake-e78a0c8e8a0b002a1e0e71672efcf96418c3a26d.zip
CMake-e78a0c8e8a0b002a1e0e71672efcf96418c3a26d.tar.gz
CMake-e78a0c8e8a0b002a1e0e71672efcf96418c3a26d.tar.bz2
VS: Add option to tell generator that platfrom is WinRT by default
Create a ``CMAKE_VS_WINRT_BY_DEFAULT`` variable to indicate this. Fixes: #18286
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4597bc6..e5b9d79 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2571,8 +2571,10 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
}
if (this->MSTools) {
- // If we have the VS_WINRT_COMPONENT set then force Compile as WinRT.
- if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT")) {
+ // If we have the VS_WINRT_COMPONENT or CMAKE_VS_WINRT_BY_DEFAULT
+ // set then force Compile as WinRT.
+ if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") ||
+ this->Makefile->IsOn("CMAKE_VS_WINRT_BY_DEFAULT")) {
clOptions.AddFlag("CompileAsWinRT", "true");
// For WinRT components, add the _WINRT_DLL define to produce a lib
if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY ||