install_dir: api_install_libdir,
)
-nns_capi_single_lib = nns_capi_single_shared_lib
+nns_capi_single_dep = declare_dependency(link_with: nns_capi_single_shared_lib)
if get_option('default_library') == 'static'
- nns_capi_single_lib = nns_capi_single_static_lib
+ nns_capi_single_dep = declare_dependency(link_with: nns_capi_single_static_lib)
endif
-nns_capi_single_dep = declare_dependency(link_with: nns_capi_single_lib)
+
# Pipeline API.
nns_capi_pipeline_shared_lib = shared_library ('capi-nnstreamer-pipeline',
install_dir: api_install_libdir,
)
-nns_capi_pipeline_lib = nns_capi_pipeline_shared_lib
+nns_capi_pipeline_dep = declare_dependency(link_with: nns_capi_pipeline_shared_lib)
if get_option('default_library') == 'static'
- nns_capi_pipeline_lib = nns_capi_pipeline_static_lib
+ nns_capi_pipeline_dep = declare_dependency(link_with: nns_capi_pipeline_static_lib)
endif
-nns_capi_pipeline_dep = declare_dependency(link_with: nns_capi_pipeline_lib)
+
# Single-shot and pipeline API.
nns_capi_shared_lib = shared_library ('capi-nnstreamer',
- link_with: [nns_capi_single_lib, nns_capi_pipeline_lib],
+ link_with: [nns_capi_single_shared_lib, nns_capi_pipeline_shared_lib],
include_directories: nns_capi_include,
install: true,
install_dir: api_install_libdir,
)
nns_capi_static_lib = static_library ('capi-nnstreamer',
- link_with: [nns_capi_single_lib, nns_capi_pipeline_lib],
+ link_whole: [nns_capi_single_static_lib, nns_capi_pipeline_static_lib],
include_directories: nns_capi_include,
install: true,
install_dir: api_install_libdir,
license: ['Apache-2.0'],
meson_version: '>=0.50.0',
default_options: [
+ 'b_asneeded=false',
'werror=true',
'warning_level=1',
'c_std=gnu89',
]
)
+add_global_link_arguments('-Wl,--no-as-needed', language: 'c')
+add_global_link_arguments('-Wl,--no-as-needed', language: 'cpp')
+
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')