summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Meta/CMake/unicode_data.cmake42
1 files changed, 15 insertions, 27 deletions
diff --git a/Meta/CMake/unicode_data.cmake b/Meta/CMake/unicode_data.cmake
index 95cc46315a..3cdb05dc4a 100644
--- a/Meta/CMake/unicode_data.cmake
+++ b/Meta/CMake/unicode_data.cmake
@@ -69,14 +69,6 @@ set(CLDR_NUMBERS_PATH "${CLDR_PATH}/${CLDR_NUMBERS_SOURCE}")
set(CLDR_UNITS_SOURCE cldr-units-modern)
set(CLDR_UNITS_PATH "${CLDR_PATH}/${CLDR_UNITS_SOURCE}")
-function(download_ucd_file url path)
- if (NOT EXISTS "${path}")
- get_filename_component(file "${path}" NAME)
- message(STATUS "Downloading UCD ${file} from ${url}...")
- file(DOWNLOAD "${url}" "${path}" INACTIVITY_TIMEOUT 10)
- endif()
-endfunction()
-
function(extract_cldr_file source path)
if(EXISTS "${CLDR_ZIP_PATH}" AND NOT EXISTS "${path}")
message(STATUS "Extracting CLDR ${source} from ${CLDR_ZIP_PATH}...")
@@ -91,25 +83,21 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
remove_path_if_version_changed("${UCD_VERSION}" "${UCD_VERSION_FILE}" "${UCD_PATH}")
remove_path_if_version_changed("${CLDR_VERSION}" "${CLDR_VERSION_FILE}" "${CLDR_PATH}")
- download_ucd_file("${UNICODE_DATA_URL}" "${UNICODE_DATA_PATH}")
- download_ucd_file("${SPECIAL_CASING_URL}" "${SPECIAL_CASING_PATH}")
- download_ucd_file("${DERIVED_GENERAL_CATEGORY_URL}" "${DERIVED_GENERAL_CATEGORY_PATH}")
- download_ucd_file("${PROP_LIST_URL}" "${PROP_LIST_PATH}")
- download_ucd_file("${DERIVED_CORE_PROP_URL}" "${DERIVED_CORE_PROP_PATH}")
- download_ucd_file("${DERIVED_BINARY_PROP_URL}" "${DERIVED_BINARY_PROP_PATH}")
- download_ucd_file("${PROP_ALIAS_URL}" "${PROP_ALIAS_PATH}")
- download_ucd_file("${PROP_VALUE_ALIAS_URL}" "${PROP_VALUE_ALIAS_PATH}")
- download_ucd_file("${NAME_ALIAS_URL}" "${NAME_ALIAS_PATH}")
- download_ucd_file("${SCRIPTS_URL}" "${SCRIPTS_PATH}")
- download_ucd_file("${SCRIPT_EXTENSIONS_URL}" "${SCRIPT_EXTENSIONS_PATH}")
- download_ucd_file("${EMOJI_DATA_URL}" "${EMOJI_DATA_PATH}")
- download_ucd_file("${NORM_PROPS_URL}" "${NORM_PROPS_PATH}")
-
- if (NOT EXISTS "${CLDR_ZIP_PATH}")
- message(STATUS "Downloading CLDR database from ${CLDR_ZIP_URL}...")
- file(DOWNLOAD "${CLDR_ZIP_URL}" "${CLDR_ZIP_PATH}" INACTIVITY_TIMEOUT 10)
- endif()
-
+ download_file("${UNICODE_DATA_URL}" "${UNICODE_DATA_PATH}")
+ download_file("${SPECIAL_CASING_URL}" "${SPECIAL_CASING_PATH}")
+ download_file("${DERIVED_GENERAL_CATEGORY_URL}" "${DERIVED_GENERAL_CATEGORY_PATH}")
+ download_file("${PROP_LIST_URL}" "${PROP_LIST_PATH}")
+ download_file("${DERIVED_CORE_PROP_URL}" "${DERIVED_CORE_PROP_PATH}")
+ download_file("${DERIVED_BINARY_PROP_URL}" "${DERIVED_BINARY_PROP_PATH}")
+ download_file("${PROP_ALIAS_URL}" "${PROP_ALIAS_PATH}")
+ download_file("${PROP_VALUE_ALIAS_URL}" "${PROP_VALUE_ALIAS_PATH}")
+ download_file("${NAME_ALIAS_URL}" "${NAME_ALIAS_PATH}")
+ download_file("${SCRIPTS_URL}" "${SCRIPTS_PATH}")
+ download_file("${SCRIPT_EXTENSIONS_URL}" "${SCRIPT_EXTENSIONS_PATH}")
+ download_file("${EMOJI_DATA_URL}" "${EMOJI_DATA_PATH}")
+ download_file("${NORM_PROPS_URL}" "${NORM_PROPS_PATH}")
+
+ download_file("${CLDR_ZIP_URL}" "${CLDR_ZIP_PATH}")
extract_cldr_file("${CLDR_CORE_SOURCE}" "${CLDR_CORE_PATH}")
extract_cldr_file("${CLDR_DATES_SOURCE}" "${CLDR_DATES_PATH}")
extract_cldr_file("${CLDR_LOCALES_SOURCE}" "${CLDR_LOCALES_PATH}")