Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xplat: Improve ICU fallback conditions #3135

Merged
merged 2 commits into from
Jun 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ elseif(CC_TARGET_OS_OSX)
-DPLATFORM_UNIX
)

if(NOT ICULIB)
# in case ICU path was given but it doesn't exist, build script will fail.
# so, fallback only if ICU path wasn't given
if(NOT ICU_INCLUDE_PATH)
set(NO_ICU_PATH_GIVEN 1)
message("-- Couldn't find ICU. Falling back to --no-icu build")
endif()
Expand Down
12 changes: 11 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,17 @@ while [[ $# -gt 0 ]]; do

--icu=*)
ICU_PATH=$1
ICU_PATH="-DICU_INCLUDE_PATH_SH=${ICU_PATH:6}"
ICU_PATH="${ICU_PATH:6}"
if [[ ! -d ${ICU_PATH} ]]; then
if [[ -d "${CHAKRACORE_DIR}/${ICU_PATH}" ]]; then
ICU_PATH="${CHAKRACORE_DIR}/${ICU_PATH}"
else
# if ICU_PATH is given, do not fallback to no-icu
echo "!!! couldn't find ICU at $ICU_PATH"
exit 1
fi
fi
ICU_PATH="-DICU_INCLUDE_PATH_SH=${ICU_PATH}"
;;

--libs-only)
Expand Down