Browse Source

LibWeb: Don't build iterator wrapper for NO_INSTANCE classes

Andreas Kling 2 years ago
parent
commit
a8a42b4432
1 changed files with 10 additions and 4 deletions
  1. 10 4
      Meta/CMake/libweb_generators.cmake

+ 10 - 4
Meta/CMake/libweb_generators.cmake

@@ -136,15 +136,21 @@ function (generate_js_wrappers target)
 
 
         # FIXME: Instead of requiring a manual declaration of iterable wrappers, we should ask WrapperGenerator if it's iterable
         # FIXME: Instead of requiring a manual declaration of iterable wrappers, we should ask WrapperGenerator if it's iterable
         if(LIBWEB_WRAPPER_ITERABLE)
         if(LIBWEB_WRAPPER_ITERABLE)
+            if(NOT LIBWEB_WRAPPER_NO_INSTANCE)
+                list(APPEND BINDINGS_SOURCES
+                    "${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorWrapper.h"
+                    "${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorWrapper.cpp"
+                )
+                list(APPEND BINDINGS_TYPES
+                    iterator-header
+                    iterator-implementation
+                )
+            endif()
             list(APPEND BINDINGS_SOURCES
             list(APPEND BINDINGS_SOURCES
-                "${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorWrapper.h"
-                "${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorWrapper.cpp"
                 "${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorPrototype.h"
                 "${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorPrototype.h"
                 "${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorPrototype.cpp"
                 "${LIBWEB_OUTPUT_FOLDER}Bindings/${basename}IteratorPrototype.cpp"
             )
             )
             list(APPEND BINDINGS_TYPES
             list(APPEND BINDINGS_TYPES
-                iterator-header
-                iterator-implementation
                 iterator-prototype-header
                 iterator-prototype-header
                 iterator-prototype-implementation
                 iterator-prototype-implementation
             )
             )