From 14f4e0b813066889dd0f1f9edce30c3e02986592 Mon Sep 17 00:00:00 2001 From: Grant Date: Wed, 25 Sep 2024 11:58:52 +0100 Subject: [PATCH] wrap libtcc around cmodule feature check --- bindings/gumjs/meson.build | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/bindings/gumjs/meson.build b/bindings/gumjs/meson.build index 9cbbcc540..d55cfb447 100644 --- a/bindings/gumjs/meson.build +++ b/bindings/gumjs/meson.build @@ -220,15 +220,19 @@ gumjs_generated_bindings = custom_target('gumjs-generated-bindings', ) gumjs_sources += [gumjs_generated_bindings] -# if libtcc_dep.found() - if libtcc_dep.type_name() == 'internal' - libtcc_incdir = meson.project_source_root() / 'subprojects' / 'tinycc' / 'include' +if get_option('cmodule').allowed() + if libtcc_dep.found() + if libtcc_dep.type_name() == 'internal' + libtcc_incdir = meson.project_source_root() / 'subprojects' / 'tinycc' / 'include' + else + libtcc_incdir = libtcc_dep.get_variable('libdir') / 'tcc' / 'include' + endif else - libtcc_incdir = libtcc_dep.get_variable('libdir') / 'tcc' / 'include' + libtcc_incdir = '' endif -# else -# libtcc_incdir = '' -# endif +else + libtcc_incdir = '' +endif backends = [] if quickjs_dep.found()