@@ -149,13 +149,15 @@ if qjs_libc
149149 qjs_hdrs += qjs_libc_hdrs
150150endif
151151
152+ qjs_parser = get_option (' parser' )
153+
152154qjs_c_args = [' -D_GNU_SOURCE' ]
153155
154156if host_system == ' windows'
155157 qjs_c_args += [' -DWIN32_LEAN_AND_MEAN' , ' -D_WIN32_WINNT=0x0601' ]
156158endif
157159
158- if not get_option ( ' parser ' )
160+ if not qjs_parser
159161 qjs_c_args += [' -DQJS_DISABLE_PARSER' ]
160162endif
161163
@@ -188,10 +190,15 @@ qjs_lib = library(
188190 version : meson .project_version(),
189191)
190192
193+ qjs_export_variables = [
194+ f' have_parser=@qjs_parser@'
195+ ]
196+
191197qjs_dep = declare_dependency (
192198 link_with : qjs_lib,
193199 dependencies : qjs_sys_deps,
194200 include_directories : qjs_lib.private_dir_include(),
201+ variables : qjs_export_variables,
195202)
196203
197204if host_system == ' emscripten'
@@ -249,6 +256,7 @@ import('pkgconfig').generate(
249256 description : ' QuickJS, the Next Generation: a mighty JavaScript engine' ,
250257 url : ' https://github.com/quickjs-ng/quickjs' ,
251258 version : meson .project_version(),
259+ variables : qjs_export_variables,
252260)
253261
254262# QuickJS bytecode compiler
0 commit comments