infra build: revise the binding builds.

The thorvg lib should not have a dependency on the bindings.
In fact, it's inverted.
This commit is contained in:
Hermet Park 2023-08-03 00:50:48 +09:00 committed by Hermet Park
parent 1ed48ccbdb
commit 3fe6c7126a
4 changed files with 5 additions and 11 deletions

View file

@ -25,7 +25,7 @@ option('bindings',
type: 'array', type: 'array',
choices: ['', 'capi'], choices: ['', 'capi'],
value: [''], value: [''],
description: 'Enable C API binding') description: 'Enable API bindings')
option('tools', option('tools',
type: 'array', type: 'array',

View file

@ -2,7 +2,7 @@ source_file = [
'tvgCapi.cpp', 'tvgCapi.cpp',
] ]
subbinding_dep += [declare_dependency( thorvg_lib_dep += [declare_dependency(
include_directories : include_directories('.'), include_directories : include_directories('.'),
sources : source_file sources : source_file
)] )]

View file

@ -1,10 +1,3 @@
subbinding_dep = []
if get_option('bindings').contains('capi') == true if get_option('bindings').contains('capi') == true
subdir('capi') subdir('capi')
endif endif
binding_dep = declare_dependency(
dependencies: subbinding_dep,
include_directories : include_directories('.'),
)

View file

@ -40,14 +40,15 @@ endif
subdir('lib') subdir('lib')
subdir('loaders') subdir('loaders')
subdir('savers') 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' if host_machine.system() != 'windows'
thread_dep = meson.get_compiler('cpp').find_library('pthread') thread_dep = meson.get_compiler('cpp').find_library('pthread')
thorvg_lib_dep += [thread_dep] thorvg_lib_dep += [thread_dep]
endif endif
subdir('bindings')
thorvg_lib = library( thorvg_lib = library(
'thorvg', 'thorvg',
include_directories : headers, include_directories : headers,