ladybird/Meta/CMake/libtextcodec_generators.cmake
Simon Wanner 2ce61fe6ea LibTextCodec: Add GBK/GB18030 decoder
Includes changes from GB-18030-2022, which are not yet included in the
Encoding Specification, but WebKit, Blink and WPT are already updated.
2024-05-31 07:56:26 +02:00

15 lines
582 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_generator(
"LookupTables.cpp"
Lagom::GenerateEncodingIndexes
"${LIBTEXTCODEC_INPUT_FOLDER}/indexes.json"
"LookupTables.h"
"LookupTables.cpp"
arguments -j "${LIBTEXTCODEC_INPUT_FOLDER}/indexes.json"
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/LookupTables.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/LibTextCodec/")
endfunction()