ladybird/Meta/CMake/libtextcodec_generators.cmake
ayeteadoe 838ca8d172
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Meta: Rewrite GenerateEncodingIndexes in python
2025-06-25 18:50:14 -06:00

17 lines
655 B
CMake

function(generate_encoding_indexes)
set(LIBTEXTCODEC_INPUT_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}")
# indexes.json can be found at https://encoding.spec.whatwg.org/indexes.json
invoke_py_generator(
"LookupTables.cpp"
"generate_encoding_indexes.py"
"${LIBTEXTCODEC_INPUT_FOLDER}/indexes.json"
"LookupTables.h"
"LookupTables.cpp"
arguments -j "${LIBTEXTCODEC_INPUT_FOLDER}/indexes.json"
)
if(ENABLE_INSTALL_HEADERS)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/LookupTables.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/LibTextCodec/")
endif()
endfunction()