diff --git a/meson.build b/meson.build index 2c2e6add3d..98e6430718 100644 --- a/meson.build +++ b/meson.build @@ -457,12 +457,13 @@ if get_option('enable-app') endif endif -if get_option('platform') != 'android' - nnstreamer_dep = dependency('nnstreamer') - message('building nnstreamer') - subdir('nnstreamer') -else - warning('android nnstreamer-filter and nnstreamer-trainer are not yet supported, building them is skipped') +if get_option('enable-nnstreamer-tensor-filter').enabled() or get_option('enable-nnstreamer-tensor-trainer').enabled() + if get_option('platform') != 'android' + nnstreamer_dep = dependency('nnstreamer') + subdir('nnstreamer') + else + warning('android nnstreamer-filter and nnstreamer-trainer are not yet supported, building them is skipped') + endif endif if get_option('platform') == 'android' diff --git a/test/unittest/compiler/meson.build b/test/unittest/compiler/meson.build index cf9a864577..72cf17ce5c 100644 --- a/test/unittest/compiler/meson.build +++ b/test/unittest/compiler/meson.build @@ -4,19 +4,23 @@ test_target = [ 'compiler_test_util.cpp', 'unittest_compiler.cpp', 'unittest_interpreter.cpp', - 'unittest_tflite_export.cpp', 'unittest_realizer.cpp', ] +test_deps = [ + nntrainer_test_main_deps, + nntrainer_dep, + nntrainer_ccapi_dep, +] + +if get_option('enable-tflite-interpreter') or get_option('enable-nnstreamer-tensor-filter').enabled() + test_target += 'unittest_tflite_export.cpp' + test_deps += tflite_dep +endif exe = executable( test_name, test_target, - dependencies: [ - nntrainer_test_main_deps, - nntrainer_dep, - nntrainer_ccapi_dep, - tflite_dep - ], + dependencies: test_deps, install: get_option('enable-test'), install_dir: application_install_dir )