infra: disable capi in default.

capi is not mandatory option in v0.1.

we can manually toggle it on when it's necessary.
This commit is contained in:
Hermet Park 2021-04-30 19:02:06 +09:00 committed by Hermet Park
parent 28008e2f91
commit 3a538340aa
2 changed files with 19 additions and 5 deletions

View file

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

View file

@ -5,7 +5,6 @@ source_file = [
'Async.cpp',
'Blending.cpp',
'Boundary.cpp',
'Capi.cpp',
'CustomTransform.cpp',
'DirectUpdate.cpp',
'Duplicate.cpp',
@ -42,7 +41,22 @@ source_file = [
foreach current_file : source_file
name = current_file.split('.')[0]
executable(name, current_file,
include_directories : headers,
link_with : thorvg_lib,
dependencies : examples_dep)
include_directories : headers,
link_with : thorvg_lib,
dependencies : examples_dep)
endforeach
if get_option('bindings').contains('capi') == true
capi_source_file = [
'Capi.cpp'
]
foreach current_file : capi_source_file
name = current_file.split('.')[0]
executable(name, current_file,
include_directories : headers,
link_with : thorvg_lib,
dependencies : examples_dep)
endforeach
endif