Skip to content

Commit 3dd5d87

Browse files
committed
Addressing initial PR issues
1 parent 7f2888e commit 3dd5d87

4 files changed

Lines changed: 30 additions & 2 deletions

File tree

bin/ChakraCore/ChakraCore.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
Rpcrt4.lib;
5353
$(ChakraCommonLinkDependencies)
5454
</AdditionalDependencies>
55-
<AdditionalDependencies Condition="'$(UseICU)'=='true' AND '$(ChakraICU)'!='false'">
55+
<AdditionalDependencies Condition="'$(UseICU)'=='true' AND '$(ChakraICU)'=='false'">
5656
$(IcuLibraryDependencies)
5757
%(AdditionalDependencies)
5858
</AdditionalDependencies>

build.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ MULTICORE_BUILD=""
100100
NO_JIT=
101101
CMAKE_ICU="-DICU_SETTINGS_RESET=1"
102102
CMAKE_INTL="-DINTL_ICU_SH=1" # default to enabling intl
103-
USE_LOCAL_ICU=1 # default to using $CHAKRACORE_DIR/deps/Chakra.ICU/icu
103+
USE_LOCAL_ICU=0 # default to using system version of ICU
104104
STATIC_LIBRARY="-DSHARED_LIBRARY_SH=1"
105105
SANITIZE=
106106
WITHOUT_FEATURES=""
@@ -215,6 +215,20 @@ while [[ $# -gt 0 ]]; do
215215
USE_LOCAL_ICU=0
216216
;;
217217

218+
# allow legacy --icu flag for compatability
219+
--icu=*)
220+
ICU_PATH=$1
221+
# `eval` used to resolve tilde in the path
222+
eval ICU_PATH="${ICU_PATH:13}"
223+
if [[ ! -d $ICU_PATH || ! -d $ICU_PATH/unicode ]]; then
224+
# if --custom-icu is given, do not fallback to no-icu
225+
echo "!!! couldn't find ICU at $ICU_PATH"
226+
exit 1
227+
fi
228+
CMAKE_ICU="-DICU_INCLUDE_PATH_SH=$ICU_PATH"
229+
USE_LOCAL_ICU=0
230+
;;
231+
218232
--system-icu)
219233
CMAKE_ICU="-DSYSTEM_ICU_SH=1"
220234
USE_LOCAL_ICU=0
@@ -373,6 +387,12 @@ if [[ $USE_LOCAL_ICU == 1 ]]; then
373387
python "$CHAKRACORE_DIR/tools/configure_icu.py" 57.1 $ALWAYS_YES
374388
fi
375389

390+
# if there is still no directory, then the user declined the license agreement
391+
if [[ ! -d $LOCAL_ICU_DIR ]]; then
392+
echo "You must accept the ICU license agreement in order to use this configuration"
393+
exit 1
394+
fi
395+
376396
LOCAL_ICU_DIST="$LOCAL_ICU_DIR/output"
377397

378398
if [ ! -d "$LOCAL_ICU_DIST" ]; then

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
<ItemGroup Condition="'$(ChakraICU)'!='false'">
3333
<ClCompile Include="$(IcuCommonSources)" />
3434
<ClInclude Include="$(IcuCommonHeaders)" />
35+
<ProjectReference Include="$(MSBuildThisFileDirectory)Chakra.ICU.Stubdata.vcxproj">
36+
<Project>{E14F373D-05A0-4259-A5E9-AFE8405FB847}</Project>
37+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
38+
</ProjectReference>
3539
</ItemGroup>
3640
<Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')" />
3741
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
<ItemGroup Condition="'$(ChakraICU)'!='false'">
4141
<ClCompile Include="$(IcuI18nSources)" />
4242
<ClInclude Include="$(IcuI18nHeaders)" />
43+
<ProjectReference Include="$(MSBuildThisFileDirectory)Chakra.ICU.Stubdata.vcxproj">
44+
<Project>{E14F373D-05A0-4259-A5E9-AFE8405FB847}</Project>
45+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
46+
</ProjectReference>
4347
</ItemGroup>
4448
<Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')" />
4549
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

0 commit comments

Comments
 (0)