From 8179a097f837a9593d738a8567d95f9f40aaa1b3 Mon Sep 17 00:00:00 2001 From: Benjamin Winger Date: Wed, 20 Apr 2022 19:00:23 -0400 Subject: [PATCH] Added ICU feature filters to limit the size of the data library when building ICU ourselves --- extern/CMakeLists.txt | 2 ++ extern/icufilters.json | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 extern/icufilters.json diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index c95a9273af..898dfeffad 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -244,6 +244,7 @@ if (NOT OPENMW_USE_SYSTEM_YAML_CPP) endif() if (NOT OPENMW_USE_SYSTEM_ICU) + set(ICU_ENV "ICU_DATA_FILTER_FILE=${CMAKE_CURRENT_SOURCE_DIR}/icufilters.json") if (ANDROID) # Note: Must be a build directory, not an install root, since the configure script # looks for a configuration file which does not get installed. @@ -261,6 +262,7 @@ if (NOT OPENMW_USE_SYSTEM_ICU) # -clang etc. string(REGEX MATCH "^[^-]\+-[^-]+-[^-]+" ICU_TOOLCHAIN_NAME ${ANDROID_TOOLCHAIN_NAME}) set(ICU_ENV + ${ICU_ENV} "CC=${CMAKE_C_COMPILER_LAUNCHER} ${NDK_STANDARD_ROOT}/bin/${ICU_TOOLCHAIN_NAME}${ANDROIDVER}-clang" "CXX=${CMAKE_CXX_COMPILER_LAUNCHER} ${NDK_STANDARD_ROOT}/bin/${ICU_TOOLCHAIN_NAME}${ANDROIDVER}-clang" "RANLIB=${NDK_STANDARD_ROOT}/bin/${ICU_TOOLCHAIN_NAME}-ranlib" diff --git a/extern/icufilters.json b/extern/icufilters.json new file mode 100644 index 0000000000..837658e5c7 --- /dev/null +++ b/extern/icufilters.json @@ -0,0 +1,19 @@ +{ + "featureFilters": { + "brkitr_rules": "exclude", + "brkitr_dictionaries": "exclude", + "brkitr_tree": "exclude", + "coll_ucadata": "exclude", + "coll_tree": "exclude", + "confusables": "exclude", + "conversion_mappings": "exclude", + "zone_tree": "exclude", + "zone_supplemental": "exclude", + "translit": "exclude", + "cnvalias": "exclude", + "lang_tree": "exclude", + "normalization": "exclude", + "region_tree": "exclude", + "stringprep": "exclude" + } +}