Skip to content

Commit 6699445

Browse files
committed
Consolidate MSBuild properties for ICU
1 parent 79cfa06 commit 6699445

11 files changed

Lines changed: 23 additions & 26 deletions

Build/Chakra.Build.props

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@
2525
<!-- ARM does not support ICU until we figure out how to link icudtXXl.dat without genccode.exe -->
2626
<ChakraICU Condition="'$(Platform)'=='ARM'">false</ChakraICU>
2727

28-
<WindowsICU Condition="'$(WindowsICU)'==''">false</WindowsICU>
29-
30-
<UseICU Condition="'$(UseICU)'==''">false</UseICU>
31-
<UseICU Condition="'$(BuildLite)'=='true'">false</UseICU>
32-
<UseICU Condition="'$(ChakraICU)'!='false' OR '$(WindowsICU)'=='true'">true</UseICU>
33-
</PropertyGroup>
34-
<PropertyGroup Condition="'$(WindowsICU)'=='true'">
35-
<IcuLibraryDependencies>icuuc.lib;icuin.lib</IcuLibraryDependencies>
28+
<IcuLibraryDependencies Condition="'$(ChakraICU)'=='windows'">icuuc.lib;icuin.lib</IcuLibraryDependencies>
3629
</PropertyGroup>
3730
<Import Condition="'$(ChakraICU)'!='false' AND exists('$(ChakraCoreRootDirectory)deps\Chakra.ICU\Chakra.ICU.props')" Project="$(ChakraCoreRootDirectory)deps\Chakra.ICU\Chakra.ICU.props" />
3831
<ItemDefinitionGroup>
@@ -56,24 +49,24 @@
5649
%(PreprocessorDefinitions);
5750
CHAKRACORE_LITE
5851
</PreprocessorDefinitions>
59-
<PreprocessorDefinitions Condition="'$(UseICU)'=='true'">
52+
<PreprocessorDefinitions Condition="'$(ChakraICU)'!='false'">
6053
%(PreprocessorDefinitions);
6154
HAS_ICU;
6255
U_DISABLE_RENAMING=1; <!-- Disable renaming to maintain compatibility with Windows Kit ICU's icuuc/icuin.lib -->
6356
</PreprocessorDefinitions>
64-
<PreprocessorDefinitions Condition="'$(EnableIntl)'=='true' AND '$(UseICU)'=='true'">
57+
<PreprocessorDefinitions Condition="'$(EnableIntl)'=='true' AND '$(ChakraICU)'!='false'">
6558
%(PreprocessorDefinitions);
6659
INTL_ICU=1
6760
</PreprocessorDefinitions>
6861
<PreprocessorDefinitions Condition="'$(ChakraICU)'=='static'">
6962
%(PreprocessorDefinitions);
7063
U_STATIC_IMPLEMENTATION=1
7164
</PreprocessorDefinitions>
72-
<PreprocessorDefinitions Condition="'$(WindowsICU)'=='true'">
65+
<PreprocessorDefinitions Condition="'$(ChakraICU)'=='windows'">
7366
%(PreprocessorDefinitions);
7467
WINDOWS10_ICU
7568
</PreprocessorDefinitions>
76-
<PreprocessorDefinitions Condition="'$(WindowsICU)'=='false'">
69+
<PreprocessorDefinitions Condition="'$(ChakraICU)'!='windows' AND '$(ChakraICU)'!='false'">
7770
%(PreprocessorDefinitions);
7871
ICU_VERSION=$(IcuVersionMajor)
7972
</PreprocessorDefinitions>

bin/ChakraCore/ChakraCore.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
bcrypt.lib;
5454
$(ChakraCommonLinkDependencies)
5555
</AdditionalDependencies>
56-
<AdditionalDependencies Condition="'$(UseICU)'=='true' AND '$(ChakraICU)'=='false'">
56+
<AdditionalDependencies Condition="'$(ChakraICU)'!='false' AND '$(IcuLibraryDependencies)'!=''">
5757
$(IcuLibraryDependencies);
5858
%(AdditionalDependencies)
5959
</AdditionalDependencies>
@@ -173,13 +173,13 @@
173173
<ProjectReference Include="..\..\lib\Runtime\Types\Chakra.Runtime.Types.vcxproj">
174174
<Project>{706083f7-6aa4-4558-a153-6352ef9110f6}</Project>
175175
</ProjectReference>
176-
<ProjectReference Condition="'$(ChakraICU)'!='false'" Include="..\..\deps\Chakra.ICU\Chakra.ICU.Common.vcxproj">
176+
<ProjectReference Condition="'$(ChakraICU)'=='static' OR '$(ChakraICU)'=='shared'" Include="..\..\deps\Chakra.ICU\Chakra.ICU.Common.vcxproj">
177177
<Project>{EE2A3111-4D85-427C-B0AB-E6B0EA7FFB44}</Project>
178178
</ProjectReference>
179-
<ProjectReference Condition="'$(ChakraICU)'!='false'" Include="..\..\deps\Chakra.ICU\Chakra.ICU.i18n.vcxproj">
179+
<ProjectReference Condition="'$(ChakraICU)'=='static' OR '$(ChakraICU)'=='shared'" Include="..\..\deps\Chakra.ICU\Chakra.ICU.i18n.vcxproj">
180180
<Project>{0494C753-5BB9-45AA-874E-E61B9922E88F}</Project>
181181
</ProjectReference>
182-
<ProjectReference Condition="'$(ChakraICU)'!='false'" Include="..\..\deps\Chakra.ICU\Chakra.ICU.Data.vcxproj">
182+
<ProjectReference Condition="'$(ChakraICU)'=='static' OR '$(ChakraICU)'=='shared'" Include="..\..\deps\Chakra.ICU\Chakra.ICU.Data.vcxproj">
183183
<Project>{347824B1-7100-4EE6-8A6B-4FF64E66B0C0}</Project>
184184
</ProjectReference>
185185
</ItemGroup>

bin/ch/ch.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
%(AdditionalIncludeDirectories);
2929
</AdditionalIncludeDirectories>
3030
<!-- For ChakraICU.h -->
31-
<AdditionalIncludeDirectories Condition="'$(UseICU)'=='true'">
31+
<AdditionalIncludeDirectories Condition="'$(ChakraICU)'!='false'">
3232
$(ChakraCoreRootDirectory)lib\Runtime;
3333
%(AdditionalIncludeDirectories)
3434
</AdditionalIncludeDirectories>
@@ -45,7 +45,7 @@
4545
version.lib;
4646
bcrypt.lib;
4747
</AdditionalDependencies>
48-
<AdditionalDependencies Condition="'$(UseICU)'=='true' AND '$(ChakraICU)'=='false'">
48+
<AdditionalDependencies Condition="'$(ChakraICU)'!='false' AND '$(IcuLibraryDependencies)'!=''">
4949
$(IcuLibraryDependencies);
5050
%(AdditionalDependencies)
5151
</AdditionalDependencies>
@@ -99,7 +99,7 @@
9999
<Project>{EA882C8D-81FC-42FE-ABD5-2666DB933FDB}</Project>
100100
</ProjectReference>
101101
<!-- for u_getVersion() referenced in PlatformAgnostic::ICUHelpers::GetICUMajorVersion -->
102-
<ProjectReference Condition="'$(ChakraICU)'!='false'" Include="..\..\deps\Chakra.ICU\Chakra.ICU.Common.vcxproj">
102+
<ProjectReference Condition="'$(ChakraICU)'=='static' OR '$(ChakraICU)'=='shared'" Include="..\..\deps\Chakra.ICU\Chakra.ICU.Common.vcxproj">
103103
<Project>{EE2A3111-4D85-427C-B0AB-E6B0EA7FFB44}</Project>
104104
</ProjectReference>
105105
</ItemGroup>

deps/Chakra.ICU/Chakra.ICU.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<BuildLocalICU>false</BuildLocalICU>
5+
<BuildLocalICU Condition="'$(ChakraICU)'=='static' OR '$(ChakraICU)'=='shared'">true</BuildLocalICU>
6+
</PropertyGroup>
37
<ItemDefinitionGroup>
48
<ClCompile>
59
<!-- ICU warning output is exceptionally noisy -->

deps/Chakra.ICU/Chakra.ICU.Common.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<SubSystem>Console</SubSystem>
3232
</Link>
3333
</ItemDefinitionGroup>
34-
<ItemGroup Condition="'$(ChakraICU)'!='false'">
34+
<ItemGroup Condition="'$(BuildLocalICU)'=='true'">
3535
<ClCompile Include="$(IcuCommonSources)" />
3636
<ClInclude Include="$(IcuCommonHeaders)" />
3737
<ProjectReference Include="$(MSBuildThisFileDirectory)Chakra.ICU.Stubdata.vcxproj">

deps/Chakra.ICU/Chakra.ICU.Data.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<NoEntryPoint>true</NoEntryPoint>
2828
</Link>
2929
</ItemDefinitionGroup>
30-
<ItemGroup Condition="'$(ChakraICU)'!='false'">
30+
<ItemGroup Condition="'$(BuildLocalICU)'=='true'">
3131
<None Include="$(IntDir)icudt$(IcuVersionMajor)l_dat.obj" /> <!-- forces the automagic build system to create a lib from the obj -->
3232
<CustomBuild Include="$(MSBuildThisFileDirectory)source\data\in\icudt$(IcuVersionMajor)l.dat">
3333
<Command>$(GenCCodePath) --object --destdir $(IntDir) --entrypoint icudt$(IcuVersionMajor) $(IcuSourceDirectory)\data\in\icudt$(IcuVersionMajor)l.dat</Command>

deps/Chakra.ICU/Chakra.ICU.GenCCode.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<SubSystem>Console</SubSystem>
3434
</Link>
3535
</ItemDefinitionGroup>
36-
<ItemGroup Condition="'$(ChakraICU)'!='false'">
36+
<ItemGroup Condition="'$(BuildLocalICU)'=='true'">
3737
<ClCompile Include="$(IcuGenccodeSources)" />
3838
<ClInclude Include="$(IcuGenccodeHeaders)" />
3939
<ProjectReference Include="$(MSBuildThisFileDirectory)Chakra.ICU.Common.vcxproj">

deps/Chakra.ICU/Chakra.ICU.Stubdata.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<ImportLibrary>$(OutDir)\Chakra.ICU.Data.lib</ImportLibrary>
4040
</Link>
4141
</ItemDefinitionGroup>
42-
<ItemGroup Condition="'$(ChakraICU)'!='false'">
42+
<ItemGroup Condition="'$(BuildLocalICU)'=='true'">
4343
<ClCompile Include="$(IcuStubdataSources)" />
4444
<ClInclude Include="$(IcuStubdataHeaders)" />
4545
</ItemGroup>

deps/Chakra.ICU/Chakra.ICU.Toolutil.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</AdditionalIncludeDirectories>
3434
</ClCompile>
3535
</ItemDefinitionGroup>
36-
<ItemGroup Condition="'$(ChakraICU)'!='false'">
36+
<ItemGroup Condition="'$(BuildLocalICU)'=='true'">
3737
<ClCompile Include="$(IcuToolutilSources)" />
3838
<ClInclude Include="$(IcuToolutilHeaders)" />
3939
</ItemGroup>

deps/Chakra.ICU/Chakra.ICU.i18n.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<SubSystem>Console</SubSystem>
4040
</Link>
4141
</ItemDefinitionGroup>
42-
<ItemGroup Condition="'$(ChakraICU)'!='false'">
42+
<ItemGroup Condition="'$(BuildLocalICU)'=='true'">
4343
<ClCompile Include="$(IcuI18nSources)" />
4444
<ClInclude Include="$(IcuI18nHeaders)" />
4545
<ProjectReference Include="$(MSBuildThisFileDirectory)Chakra.ICU.Stubdata.vcxproj">

0 commit comments

Comments
 (0)