This file is used by cmake as it generates the Makefile for Qt WebAssembly.I don't know if it get used by make, by the compiler or not, or at which state. I usually use cmake but I simply try to understand the basics of it until it works.
I think you can define a cmake variable QT_WASM_EXTRA_EXPORTED_METHODS and set it to "specialHTMLTargets" (or append this to what is there if it is already defined, separated by a comma). The script above looks for this variable and appends the contents to the wasm_extra_exported_methods variable, which in turn adds it to the "SHELL: -s" link options.
You might find the QT_WASM... variable defined (but possibly empty) in one of the top-level CMakeLists.txt files for Qt WebAssembly.
Edit: Now that I changed your QUOTE tags to CODE tags, I can see that what you pasted was a function definition. I was misreading it a bit prior to that. Instead of a variable, you may have to look for a call to set_target_properties() or set_property( TARGET ... ) that contains the QT_WASM... name and modify that. See this stackoverflow post about how to use set_property.
My Qt 5.14.2 distribution doesn't seem to have any of the Qt WebAssembly source files, so I can't really check this out.
Bookmarks