ICU-66108.tar.gz
[apple/icu.git] / icuSources / allinone / Build.Windows.UWP.ProjectConfiguration.props
index 4b51960dfa78d5fe3bdb7ad48a783b24fc29af3d..359d2c2de438f3e8dca46612ccfc7faa78a475e8 100644 (file)
@@ -1,41 +1,64 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<!-- Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html -->\r
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <!-- This file is used to set common configuration options for all *_uwp projects. -->\r
-  <PropertyGroup>\r
-    <!-- If not already set, use this version of the Win10 SDK -->\r
-    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
-    <!-- If not already set, set the minimum Win10 SDK version to TH1/RTM -->\r
-    <WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>\r
-    \r
-    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>\r
-    <AppContainerApplication>true</AppContainerApplication>\r
-    <ApplicationType>Windows Store</ApplicationType>\r
-    <ApplicationTypeRevision>10.0</ApplicationTypeRevision>\r
-  </PropertyGroup>\r
-  <PropertyGroup>\r
-    <!-- This is the version of the MSVC tool-set to use. -->\r
-    <!-- v141 is the Visual Studio 2017 toolset. -->\r
-    <PlatformToolset>v141</PlatformToolset>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup>\r
-    <Midl>\r
-      <PreprocessorDefinitions>\r
-        %(PreprocessorDefinitions)\r
-        U_PLATFORM_HAS_WINUWP_API=1;\r
-      </PreprocessorDefinitions>\r
-    </Midl>\r
-    <ClCompile>\r
-      <PreprocessorDefinitions>\r
-        %(PreprocessorDefinitions);\r
-        U_PLATFORM_HAS_WINUWP_API=1;\r
-      </PreprocessorDefinitions>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <PreprocessorDefinitions>\r
-        %(PreprocessorDefinitions)\r
-        U_PLATFORM_HAS_WINUWP_API=1;\r
-      </PreprocessorDefinitions>\r
-    </ResourceCompile>\r
-  </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html -->
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!-- This file is used to set common configuration options for all *_uwp projects. -->
+  <PropertyGroup>
+    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
+    <AppContainerApplication>true</AppContainerApplication>
+    <ApplicationType>Windows Store</ApplicationType>
+    <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
+  </PropertyGroup>
+  <!-- If not already set, then we will default to using the latest installed Windows 10 SDK version. -->
+  <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'==''">
+    <!-- Detect the SDK version. -->
+    <WindowsSdkInstallFolder_10 Condition="'$(WindowsSdkInstallFolder_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</WindowsSdkInstallFolder_10>
+    <WindowsSdkInstallFolder_10 Condition="'$(WindowsSdkInstallFolder_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</WindowsSdkInstallFolder_10>
+    <WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</WindowsTargetPlatformVersion_10>
+    <WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</WindowsTargetPlatformVersion_10>
+    <!-- Sometimes the version in the registry has the '.0' suffix, and sometimes it doesn't. Check and add it. -->
+    <WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' != '' and !$(WindowsTargetPlatformVersion_10.EndsWith('.0'))">$(WindowsTargetPlatformVersion_10).0</WindowsTargetPlatformVersion_10>
+    <!-- Set the default. -->
+    <WindowsTargetPlatformVersion>$(WindowsTargetPlatformVersion_10)</WindowsTargetPlatformVersion>
+    <!-- Set the minimum Win10 SDK version to TH1/RTM. -->
+    <WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <!-- The following import will set the PlatformToolset configuration. -->
+  <Import Project="..\allinone\Build.Windows.PlatformToolset.props" />
+  <!-- The following PropertyGroups are used to set the binary and lib output locations -->
+  <PropertyGroup Condition="'$(Platform)'=='Win32'">
+    <IcuBinOutputDir>bin32uwp</IcuBinOutputDir>
+    <IcuLibOutputDir>lib32uwp</IcuLibOutputDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Platform)'=='x64'">
+    <IcuBinOutputDir>bin64uwp</IcuBinOutputDir>
+    <IcuLibOutputDir>lib64uwp</IcuLibOutputDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Platform)'=='ARM'">
+    <IcuBinOutputDir>binARMuwp</IcuBinOutputDir>
+    <IcuLibOutputDir>libARMuwp</IcuLibOutputDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Platform)'=='ARM64'">
+    <IcuBinOutputDir>binARM64uwp</IcuBinOutputDir>
+    <IcuLibOutputDir>libARM64uwp</IcuLibOutputDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Midl>
+      <PreprocessorDefinitions>
+        %(PreprocessorDefinitions)
+        U_PLATFORM_HAS_WINUWP_API=1;
+      </PreprocessorDefinitions>
+    </Midl>
+    <ClCompile>
+      <PreprocessorDefinitions>
+        %(PreprocessorDefinitions);
+        U_PLATFORM_HAS_WINUWP_API=1;
+      </PreprocessorDefinitions>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>
+        %(PreprocessorDefinitions)
+        U_PLATFORM_HAS_WINUWP_API=1;
+      </PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
 </Project>
\ No newline at end of file