summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-09-15 08:46:27 -0400
committerLinus Groh <mail@linusgroh.de>2021-09-30 17:37:57 +0100
commit87bca78ef29b148710fed5a5aa1705da7ff90a29 (patch)
tree8b322e22de8a0304ee09adc610f6cbc9cda4149a /Meta
parenteeb4f2fa9bf1b26d7667b3fc3643da9c155c6d1c (diff)
downloadserenity-87bca78ef29b148710fed5a5aa1705da7ff90a29.zip
LibUnicode: Extract UCD and CLDR versions to a CMake variable
This also surrounds expansion of affected URL and path variables with quotes.
Diffstat (limited to 'Meta')
-rw-r--r--Meta/CMake/unicode_data.cmake63
1 files changed, 33 insertions, 30 deletions
diff --git a/Meta/CMake/unicode_data.cmake b/Meta/CMake/unicode_data.cmake
index 28d92c5039..28cc816a46 100644
--- a/Meta/CMake/unicode_data.cmake
+++ b/Meta/CMake/unicode_data.cmake
@@ -1,56 +1,59 @@
+set(UCD_VERSION 13.0.0)
+set(CLDR_VERSION 39.0.0)
+
set(LOCALE_DATA_CACHE_LOCATION "${CMAKE_BINARY_DIR}/CLDR" CACHE PATH "Download location for CLDR files")
set(UNICODE_CACHE_LOCATION "${CMAKE_BINARY_DIR}/UCD" CACHE PATH "Download location for UCD files")
-set(UNICODE_DATA_URL https://www.unicode.org/Public/13.0.0/ucd/UnicodeData.txt)
-set(UNICODE_DATA_PATH ${UNICODE_CACHE_LOCATION}/UnicodeData.txt)
+set(UNICODE_DATA_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/UnicodeData.txt")
+set(UNICODE_DATA_PATH "${UNICODE_CACHE_LOCATION}/UnicodeData.txt")
-set(SPECIAL_CASING_URL https://www.unicode.org/Public/13.0.0/ucd/SpecialCasing.txt)
-set(SPECIAL_CASING_PATH ${UNICODE_CACHE_LOCATION}/SpecialCasing.txt)
+set(SPECIAL_CASING_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/SpecialCasing.txt")
+set(SPECIAL_CASING_PATH "${UNICODE_CACHE_LOCATION}/SpecialCasing.txt")
-set(DERIVED_GENERAL_CATEGORY_URL https://www.unicode.org/Public/13.0.0/ucd/extracted/DerivedGeneralCategory.txt)
-set(DERIVED_GENERAL_CATEGORY_PATH ${UNICODE_CACHE_LOCATION}/DerivedGeneralCategory.txt)
+set(DERIVED_GENERAL_CATEGORY_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/extracted/DerivedGeneralCategory.txt")
+set(DERIVED_GENERAL_CATEGORY_PATH "${UNICODE_CACHE_LOCATION}/DerivedGeneralCategory.txt")
-set(PROP_LIST_URL https://www.unicode.org/Public/13.0.0/ucd/PropList.txt)
-set(PROP_LIST_PATH ${UNICODE_CACHE_LOCATION}/PropList.txt)
+set(PROP_LIST_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/PropList.txt")
+set(PROP_LIST_PATH "${UNICODE_CACHE_LOCATION}/PropList.txt")
-set(DERIVED_CORE_PROP_URL https://www.unicode.org/Public/13.0.0/ucd/DerivedCoreProperties.txt)
-set(DERIVED_CORE_PROP_PATH ${UNICODE_CACHE_LOCATION}/DerivedCoreProperties.txt)
+set(DERIVED_CORE_PROP_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/DerivedCoreProperties.txt")
+set(DERIVED_CORE_PROP_PATH "${UNICODE_CACHE_LOCATION}/DerivedCoreProperties.txt")
-set(DERIVED_BINARY_PROP_URL https://www.unicode.org/Public/13.0.0/ucd/extracted/DerivedBinaryProperties.txt)
-set(DERIVED_BINARY_PROP_PATH ${UNICODE_CACHE_LOCATION}/DerivedBinaryProperties.txt)
+set(DERIVED_BINARY_PROP_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/extracted/DerivedBinaryProperties.txt")
+set(DERIVED_BINARY_PROP_PATH "${UNICODE_CACHE_LOCATION}/DerivedBinaryProperties.txt")
-set(PROP_ALIAS_URL https://www.unicode.org/Public/13.0.0/ucd/PropertyAliases.txt)
-set(PROP_ALIAS_PATH ${UNICODE_CACHE_LOCATION}/PropertyAliases.txt)
+set(PROP_ALIAS_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/PropertyAliases.txt")
+set(PROP_ALIAS_PATH "${UNICODE_CACHE_LOCATION}/PropertyAliases.txt")
-set(PROP_VALUE_ALIAS_URL https://www.unicode.org/Public/13.0.0/ucd/PropertyValueAliases.txt)
-set(PROP_VALUE_ALIAS_PATH ${UNICODE_CACHE_LOCATION}/PropertyValueAliases.txt)
+set(PROP_VALUE_ALIAS_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/PropertyValueAliases.txt")
+set(PROP_VALUE_ALIAS_PATH "${UNICODE_CACHE_LOCATION}/PropertyValueAliases.txt")
-set(SCRIPTS_URL https://www.unicode.org/Public/13.0.0/ucd/Scripts.txt)
-set(SCRIPTS_PATH ${UNICODE_CACHE_LOCATION}/Scripts.txt)
+set(SCRIPTS_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/Scripts.txt")
+set(SCRIPTS_PATH "${UNICODE_CACHE_LOCATION}/Scripts.txt")
-set(SCRIPT_EXTENSIONS_URL https://www.unicode.org/Public/13.0.0/ucd/ScriptExtensions.txt)
-set(SCRIPT_EXTENSIONS_PATH ${UNICODE_CACHE_LOCATION}/ScriptExtensions.txt)
+set(SCRIPT_EXTENSIONS_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/ScriptExtensions.txt")
+set(SCRIPT_EXTENSIONS_PATH "${UNICODE_CACHE_LOCATION}/ScriptExtensions.txt")
-set(EMOJI_DATA_URL https://www.unicode.org/Public/13.0.0/ucd/emoji/emoji-data.txt)
-set(EMOJI_DATA_PATH ${UNICODE_CACHE_LOCATION}/emoji-data.txt)
+set(EMOJI_DATA_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/emoji/emoji-data.txt")
+set(EMOJI_DATA_PATH "${UNICODE_CACHE_LOCATION}/emoji-data.txt")
-set(NORM_PROPS_URL https://www.unicode.org/Public/13.0.0/ucd/DerivedNormalizationProps.txt)
-set(NORM_PROPS_PATH ${UNICODE_CACHE_LOCATION}/DerivedNormalizationProps.txt)
+set(NORM_PROPS_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/DerivedNormalizationProps.txt")
+set(NORM_PROPS_PATH "${UNICODE_CACHE_LOCATION}/DerivedNormalizationProps.txt")
-set(CLDR_ZIP_URL https://github.com/unicode-org/cldr-json/releases/download/39.0.0/cldr-39.0.0-json-modern.zip)
-set(CLDR_ZIP_PATH ${LOCALE_DATA_CACHE_LOCATION}/cldr.zip)
+set(CLDR_ZIP_URL "https://github.com/unicode-org/cldr-json/releases/download/${CLDR_VERSION}/cldr-${CLDR_VERSION}-json-modern.zip")
+set(CLDR_ZIP_PATH "${LOCALE_DATA_CACHE_LOCATION}/cldr.zip")
set(CLDR_CORE_SOURCE cldr-core)
-set(CLDR_CORE_PATH ${LOCALE_DATA_CACHE_LOCATION}/${CLDR_CORE_SOURCE})
+set(CLDR_CORE_PATH "${LOCALE_DATA_CACHE_LOCATION}/${CLDR_CORE_SOURCE}")
set(CLDR_LOCALES_SOURCE cldr-localenames-modern)
-set(CLDR_LOCALES_PATH ${LOCALE_DATA_CACHE_LOCATION}/${CLDR_LOCALES_SOURCE})
+set(CLDR_LOCALES_PATH "${LOCALE_DATA_CACHE_LOCATION}/${CLDR_LOCALES_SOURCE}")
set(CLDR_MISC_SOURCE cldr-misc-modern)
-set(CLDR_MISC_PATH ${LOCALE_DATA_CACHE_LOCATION}/${CLDR_MISC_SOURCE})
+set(CLDR_MISC_PATH "${LOCALE_DATA_CACHE_LOCATION}/${CLDR_MISC_SOURCE}")
set(CLDR_NUMBERS_SOURCE cldr-numbers-modern)
-set(CLDR_NUMBERS_PATH ${LOCALE_DATA_CACHE_LOCATION}/${CLDR_NUMBERS_SOURCE})
+set(CLDR_NUMBERS_PATH "${LOCALE_DATA_CACHE_LOCATION}/${CLDR_NUMBERS_SOURCE}")
if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
if (NOT EXISTS ${UNICODE_DATA_PATH})