mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-02 16:25:34 +03:00
LibUnicode: Use consistent variable naming in unicode_data.cmake
I kept mixing these up in my head.
This commit is contained in:
parent
583d703f61
commit
0ec6b4f132
Notes:
sideshowbarker
2024-07-18 03:17:04 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/0ec6b4f1326 Pull-request: https://github.com/SerenityOS/serenity/pull/10039 Reviewed-by: https://github.com/ADKaster
@ -93,8 +93,8 @@ ExternalProject_Add(
|
||||
EXCLUDE_FROM_ALL YES
|
||||
CMAKE_CACHE_ARGS
|
||||
"-DCMAKE_INSTALL_PREFIX:STRING=<INSTALL_DIR>"
|
||||
"-DUNICODE_CACHE_LOCATION:STRING=${SERENITY_BUILD_DIR}/UCD"
|
||||
"-DLOCALE_DATA_CACHE_LOCATION:STRING=${SERENITY_BUILD_DIR}/CLDR"
|
||||
"-DUCD_PATH:STRING=${SERENITY_BUILD_DIR}/UCD"
|
||||
"-DCLDR_PATH:STRING=${SERENITY_BUILD_DIR}/CLDR"
|
||||
${lagom_options}
|
||||
# Always call the build step of tools, so keeping things up-to-date is easy
|
||||
BUILD_ALWAYS YES
|
||||
@ -121,8 +121,8 @@ ExternalProject_Add(
|
||||
# Tell the find_package(Lagom REQUIRED) command call where to find
|
||||
# the CMake package
|
||||
"-DCMAKE_PREFIX_PATH:STRING=${PROJECT_BINARY_DIR}/../lagom-install"
|
||||
"-DUNICODE_CACHE_LOCATION:STRING=${SERENITY_BUILD_DIR}/UCD"
|
||||
"-DLOCALE_DATA_CACHE_LOCATION:STRING=${SERENITY_BUILD_DIR}/CLDR"
|
||||
"-DUCD_PATH:STRING=${SERENITY_BUILD_DIR}/UCD"
|
||||
"-DCLDR_PATH:STRING=${SERENITY_BUILD_DIR}/CLDR"
|
||||
"-DSERENITY_ARCH:STRING=${SERENITY_ARCH}"
|
||||
"${SERENITY_TOOLCHAIN_FILE_ARG}"
|
||||
${serenity_options}
|
||||
|
@ -1,59 +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(UCD_PATH "${CMAKE_BINARY_DIR}/UCD" CACHE PATH "Download location for UCD files")
|
||||
set(CLDR_PATH "${CMAKE_BINARY_DIR}/CLDR" CACHE PATH "Download location for CLDR files")
|
||||
|
||||
set(UNICODE_DATA_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/UnicodeData.txt")
|
||||
set(UNICODE_DATA_PATH "${UNICODE_CACHE_LOCATION}/UnicodeData.txt")
|
||||
set(UNICODE_DATA_PATH "${UCD_PATH}/UnicodeData.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(SPECIAL_CASING_PATH "${UCD_PATH}/SpecialCasing.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(DERIVED_GENERAL_CATEGORY_PATH "${UCD_PATH}/DerivedGeneralCategory.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(PROP_LIST_PATH "${UCD_PATH}/PropList.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_CORE_PROP_PATH "${UCD_PATH}/DerivedCoreProperties.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(DERIVED_BINARY_PROP_PATH "${UCD_PATH}/DerivedBinaryProperties.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_ALIAS_PATH "${UCD_PATH}/PropertyAliases.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(PROP_VALUE_ALIAS_PATH "${UCD_PATH}/PropertyValueAliases.txt")
|
||||
|
||||
set(SCRIPTS_URL "https://www.unicode.org/Public/${UCD_VERSION}/ucd/Scripts.txt")
|
||||
set(SCRIPTS_PATH "${UNICODE_CACHE_LOCATION}/Scripts.txt")
|
||||
set(SCRIPTS_PATH "${UCD_PATH}/Scripts.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(SCRIPT_EXTENSIONS_PATH "${UCD_PATH}/ScriptExtensions.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(EMOJI_DATA_PATH "${UCD_PATH}/emoji-data.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(NORM_PROPS_PATH "${UCD_PATH}/DerivedNormalizationProps.txt")
|
||||
|
||||
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_ZIP_PATH "${CLDR_PATH}/cldr.zip")
|
||||
|
||||
set(CLDR_CORE_SOURCE cldr-core)
|
||||
set(CLDR_CORE_PATH "${LOCALE_DATA_CACHE_LOCATION}/${CLDR_CORE_SOURCE}")
|
||||
set(CLDR_CORE_PATH "${CLDR_PATH}/${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 "${CLDR_PATH}/${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 "${CLDR_PATH}/${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 "${CLDR_PATH}/${CLDR_NUMBERS_SOURCE}")
|
||||
|
||||
function(download_ucd_file url path)
|
||||
if (NOT EXISTS "${path}")
|
||||
@ -66,7 +66,7 @@ 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}...")
|
||||
execute_process(COMMAND unzip -q "${CLDR_ZIP_PATH}" "${source}/**" -d "${LOCALE_DATA_CACHE_LOCATION}" RESULT_VARIABLE unzip_result)
|
||||
execute_process(COMMAND unzip -q "${CLDR_ZIP_PATH}" "${source}/**" -d "${CLDR_PATH}" RESULT_VARIABLE unzip_result)
|
||||
if (NOT unzip_result EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to unzip ${source} from ${CLDR_ZIP_PATH} with status ${unzip_result}")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user