1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:57:34 +00:00

LibWeb: Generate the CSS::ValueID enum and its helper functions

This commit is contained in:
Andreas Kling 2020-12-15 20:39:09 +01:00
parent 92d8e559ba
commit 17c529e6c5
11 changed files with 421 additions and 550 deletions

View file

@ -30,6 +30,8 @@ set(SOURCES
CSS/StyleSheet.cpp
CSS/StyleSheetList.cpp
CSS/StyleValue.cpp
CSS/ValueID.cpp
CSS/ValueID.h
DOM/CharacterData.cpp
DOM/CharacterData.idl
DOM/Comment.cpp
@ -356,6 +358,24 @@ add_custom_command(
MAIN_DEPENDENCY CSS/Properties.json
)
add_custom_command(
OUTPUT CSS/ValueID.h
COMMAND ${write_if_different} CSS/ValueID.h CodeGenerators/Generate_CSS_ValueID_h ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Identifiers.json
VERBATIM
DEPENDS Generate_CSS_ValueID_h
MAIN_DEPENDENCY CSS/Identifiers.json
)
add_custom_target(generate_ValueID.h DEPENDS CSS/ValueID.h)
add_custom_command(
OUTPUT CSS/ValueID.cpp
COMMAND /bin/mkdir -p CSS
COMMAND ${write_if_different} CSS/ValueID.cpp CodeGenerators/Generate_CSS_ValueID_cpp ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Identifiers.json
VERBATIM
DEPENDS Generate_CSS_ValueID_cpp
MAIN_DEPENDENCY CSS/Identifiers.json
)
add_custom_command(
OUTPUT CSS/DefaultStyleSheetSource.cpp
COMMAND ${write_if_different} CSS/DefaultStyleSheetSource.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Scripts/GenerateStyleSheetSource.sh default_stylesheet_source ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Default.css