[Meson] remove unnecessary option
authorJaeyun <jy1210.jung@samsung.com>
Mon, 13 May 2019 02:51:48 +0000 (11:51 +0900)
committerwooksong <wook16.song@samsung.com>
Fri, 17 May 2019 09:36:43 +0000 (18:36 +0900)
For opencv test, 'enable-opencv-test' is unnecessary option.
Check dependency of opencv pkg and build libraries when found the dependency.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
meson_options.txt
nnstreamer_example/custom_example_opencv/meson.build
nnstreamer_example/meson.build

index ba25735..2430dab 100644 (file)
@@ -1,10 +1,9 @@
 option('enable-test', type: 'boolean', value: true)
 option('install-test', type: 'boolean', value: false)
-option('enable-opencv-test', type: 'boolean', value: true)
 option('enable-tensorflow-lite', type: 'boolean', value: true)
 option('enable-tensorflow', type: 'boolean', value: true)
-option('enable-movidius-ncsdk2', type: 'boolean', value: false)
 option('enable-tensorflow-mem-optmz', type: 'boolean', value: true)
+option('enable-movidius-ncsdk2', type: 'boolean', value: false)
 option('install-example', type: 'boolean', value: false)
 option('disable-video-support', type: 'boolean', value: false)
 option('disable-audio-support', type: 'boolean', value: false)
index 0f2a177..9da8eab 100644 (file)
@@ -1,15 +1,17 @@
-opencv_dep = dependency('opencv')
+opencv_dep = dependency('opencv', required: false)
 
-library('nnstreamer_customfilter_opencv_scaler',
-  'nnstreamer_customfilter_opencv_scaler.cc',
-  dependencies: [glib_dep, gst_dep, nnstreamer_dep, opencv_dep],
-  install: get_option('install-example'),
-  install_dir: customfilter_install_dir
-)
+if opencv_dep.found()
+  library('nnstreamer_customfilter_opencv_scaler',
+    'nnstreamer_customfilter_opencv_scaler.cc',
+    dependencies: [glib_dep, gst_dep, nnstreamer_dep, opencv_dep],
+    install: get_option('install-example'),
+    install_dir: customfilter_install_dir
+  )
 
-library('nnstreamer_customfilter_opencv_average',
-  'nnstreamer_customfilter_opencv_average.cc',
-  dependencies: [glib_dep, gst_dep, nnstreamer_dep, opencv_dep],
-  install: get_option('install-example'),
-  install_dir: customfilter_install_dir
-)
+  library('nnstreamer_customfilter_opencv_average',
+    'nnstreamer_customfilter_opencv_average.cc',
+    dependencies: [glib_dep, gst_dep, nnstreamer_dep, opencv_dep],
+    install: get_option('install-example'),
+    install_dir: customfilter_install_dir
+  )
+endif
index aa64117..ca92703 100644 (file)
@@ -1,8 +1,6 @@
 subdir('custom_example_passthrough')
 subdir('custom_example_scaler')
 subdir('custom_example_average')
-if get_option('enable-opencv-test')
-   subdir('custom_example_opencv')
-endif
+subdir('custom_example_opencv')
 subdir('custom_example_RNN')
 subdir('custom_example_LSTM')