change icu4c compile way

This commit is contained in:
qianlong 2020-07-07 14:22:45 +08:00
parent 7f37bfbb16
commit 0c35247b58
3 changed files with 10 additions and 8 deletions

View File

@ -9,11 +9,11 @@ else()
LIBS ${LIB_ICU_COMMON} ${LIB_ICU_DATA} ${LIB_ICU_I18N}
URL https://github.com/unicode-org/icu/archive/release-67-1.tar.gz
MD5 0c2662a2b0bc80b0eb56495205247c8f
CONFIGURE_COMMAND ./icu4c/source/runConfigureICU Linux --enable-rpath --disable-tests --disable-samples --disable-icuio --disable-extras ICU_DATA_FILTER_FILE=${CMAKE_SOURCE_DIR}/third_party/icu4c/filter.json
CONFIGURE_COMMAND ${CMAKE_SOURCE_DIR}/scripts/build_icu4c.sh
)
include_directories(${icu4c_INC})
add_library(mindspore::icuuc ALIAS icu4c::${LIB_ICU_COMMON})
add_library(mindspore::icudata ALIAS icu4c::${LIB_ICU_DATA})
add_library(mindspore::icui18n ALIAS icu4c::${LIB_ICU_I18N})
add_definitions(-D ENABLE_ICU4C)
endif()
endif()

8
scripts/build_icu4c.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
echo '{
"strategy": "additive",
"featureFilters": {
"normalization": "include"
}
}' > filter.json
./icu4c/source/runConfigureICU Linux --enable-rpath --disable-tests --disable-samples --disable-icuio --disable-extras ICU_DATA_FILTER_FILE=filter.json "$@"

View File

@ -1,6 +0,0 @@
{
"strategy": "additive",
"featureFilters": {
"normalization": "include"
}
}