Skip to content

Commit

Permalink
meson: nnstreamer-dep fixed
Browse files Browse the repository at this point in the history
nnstreamer-dep is required only when
nntrainer is going to build nnstreamer subplugins.

Don't try it if subplugins are not enabled.

Signed-off-by: MyungJoo Ham <[email protected]>
  • Loading branch information
myungjoo committed Jul 11, 2024
1 parent aa84b86 commit da9173b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
13 changes: 7 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
18 changes: 11 additions & 7 deletions test/unittest/compiler/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit da9173b

Please sign in to comment.