summaryrefslogtreecommitdiff
path: root/Meta/CMake/libweb_generators.cmake
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-09-21 18:22:16 +0100
committerLinus Groh <mail@linusgroh.de>2022-09-21 23:06:08 +0100
commitedfef8e2f5e27be597642c0d6310521b96ee237d (patch)
treec73bf7b8cac07bf564c70b7b9eaad7108ff18fb1 /Meta/CMake/libweb_generators.cmake
parent4270ede7c45ca276eae106f0c581c8908ef51fa7 (diff)
downloadserenity-edfef8e2f5e27be597642c0d6310521b96ee237d.zip
Everywhere: Rename WrapperGenerator to BindingsGenerator
This code generator no longer creates JS wrappers for platform objects in the old sense, instead they're JS objects internally themselves. Most of what we generate now are prototypes - which can be seen as bindings for the internal C++ methods implementing getters, setters, and methods - as well as object constructors, i.e. bindings for the internal create_with_global_object() method. Also tweak the naming of various CMake glue code existing around this.
Diffstat (limited to 'Meta/CMake/libweb_generators.cmake')
-rw-r--r--Meta/CMake/libweb_generators.cmake14
1 files changed, 7 insertions, 7 deletions
diff --git a/Meta/CMake/libweb_generators.cmake b/Meta/CMake/libweb_generators.cmake
index 967d0c9bba..d4c0fec9cf 100644
--- a/Meta/CMake/libweb_generators.cmake
+++ b/Meta/CMake/libweb_generators.cmake
@@ -90,7 +90,7 @@ function (generate_css_implementation)
endfunction()
-function (generate_js_wrappers target)
+function (generate_js_bindings target)
if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibWeb")
# Serenity build
@@ -104,8 +104,8 @@ function (generate_js_wrappers target)
SET(LIBWEB_META_PREFIX "Lagom")
endif()
- function(libweb_js_wrapper class)
- cmake_parse_arguments(PARSE_ARGV 1 LIBWEB_WRAPPER "ITERABLE" "" "")
+ function(libweb_js_bindings class)
+ cmake_parse_arguments(PARSE_ARGV 1 LIBWEB_BINDINGS "ITERABLE" "" "")
get_filename_component(basename "${class}" NAME)
set(BINDINGS_SOURCES
"${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}Constructor.h"
@@ -120,8 +120,8 @@ function (generate_js_wrappers target)
prototype-implementation
)
- # FIXME: Instead of requiring a manual declaration of iterable wrappers, we should ask WrapperGenerator if it's iterable
- if(LIBWEB_WRAPPER_ITERABLE)
+ # FIXME: Instead of requiring a manual declaration of iterable bindings, we should ask BindingsGenerator if it's iterable
+ if(LIBWEB_BINDINGS_ITERABLE)
list(APPEND BINDINGS_SOURCES
"${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorPrototype.h"
"${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorPrototype.cpp"
@@ -142,11 +142,11 @@ function (generate_js_wrappers target)
list(TRANSFORM include_paths PREPEND -i)
add_custom_command(
OUTPUT "${bindings_src}"
- COMMAND "$<TARGET_FILE:Lagom::WrapperGenerator>" "--${bindings_type}" ${include_paths} "${LIBWEB_INPUT_FOLDER}/${class}.idl" "${LIBWEB_INPUT_FOLDER}" > "${bindings_src}.tmp"
+ COMMAND "$<TARGET_FILE:Lagom::BindingsGenerator>" "--${bindings_type}" ${include_paths} "${LIBWEB_INPUT_FOLDER}/${class}.idl" "${LIBWEB_INPUT_FOLDER}" > "${bindings_src}.tmp"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${bindings_src}.tmp" "${bindings_src}"
COMMAND "${CMAKE_COMMAND}" -E remove "${bindings_src}.tmp"
VERBATIM
- DEPENDS Lagom::WrapperGenerator
+ DEPENDS Lagom::BindingsGenerator
MAIN_DEPENDENCY ${LIBWEB_INPUT_FOLDER}/${class}.idl
)
endforeach()