From 3fe6c7126a5ac1a84551ff380934c8f4f9d58758 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 3 Aug 2023 00:50:48 +0900 Subject: [PATCH] infra build: revise the binding builds. The thorvg lib should not have a dependency on the bindings. In fact, it's inverted. --- meson_options.txt | 2 +- src/bindings/capi/meson.build | 2 +- src/bindings/meson.build | 7 ------- src/meson.build | 5 +++-- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index c6acdc7b..1a56c650 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -25,7 +25,7 @@ option('bindings', type: 'array', choices: ['', 'capi'], value: [''], - description: 'Enable C API binding') + description: 'Enable API bindings') option('tools', type: 'array', diff --git a/src/bindings/capi/meson.build b/src/bindings/capi/meson.build index 8b5354f7..6b95e16f 100644 --- a/src/bindings/capi/meson.build +++ b/src/bindings/capi/meson.build @@ -2,7 +2,7 @@ source_file = [ 'tvgCapi.cpp', ] -subbinding_dep += [declare_dependency( +thorvg_lib_dep += [declare_dependency( include_directories : include_directories('.'), sources : source_file )] diff --git a/src/bindings/meson.build b/src/bindings/meson.build index e1ae8090..00dcadad 100644 --- a/src/bindings/meson.build +++ b/src/bindings/meson.build @@ -1,10 +1,3 @@ -subbinding_dep = [] - if get_option('bindings').contains('capi') == true subdir('capi') endif - -binding_dep = declare_dependency( - dependencies: subbinding_dep, - include_directories : include_directories('.'), -) diff --git a/src/meson.build b/src/meson.build index d1e84c0a..8981077e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -40,14 +40,15 @@ endif subdir('lib') subdir('loaders') subdir('savers') -subdir('bindings') -thorvg_lib_dep = [common_dep, loader_dep, saver_dep, binding_dep] +thorvg_lib_dep = [common_dep, loader_dep, saver_dep] if host_machine.system() != 'windows' thread_dep = meson.get_compiler('cpp').find_library('pthread') thorvg_lib_dep += [thread_dep] endif +subdir('bindings') + thorvg_lib = library( 'thorvg', include_directories : headers,