From 3a538340aa8add9d9e9fd5c07af8a1b03798ebdf Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Fri, 30 Apr 2021 19:02:06 +0900 Subject: [PATCH] infra: disable capi in default. capi is not mandatory option in v0.1. we can manually toggle it on when it's necessary. --- meson_options.txt | 2 +- src/examples/meson.build | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index f7fcc72e..d5171109 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -19,7 +19,7 @@ option('vectors', option('bindings', type: 'array', choices: ['', 'capi'], - value: ['capi'], + value: [''], description: 'Enable C API binding') option('tools', diff --git a/src/examples/meson.build b/src/examples/meson.build index a1dc12b6..6ce0cb10 100644 --- a/src/examples/meson.build +++ b/src/examples/meson.build @@ -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