diff --git a/meson.build b/meson.build index d47073ad..4bb84c03 100644 --- a/meson.build +++ b/meson.build @@ -35,6 +35,9 @@ libm_dep = cc.find_library('m') # cmath library libdl_dep = cc.find_library('dl') # DL library thread_dep = dependency('threads') # pthread for tensorflow-lite +opencv_dep = dependency('opencv4', required: false) +protobuf_dep = dependency('protobuf', version: '>= 3.4.0', required: false) + # Dependency for custom filter examples nns_dep = dependency('nnstreamer', required: false) @@ -44,74 +47,45 @@ nns_capi_common_dep = dependency('capi-ml-common', required: false) # Dependency for tensorflow example tf_dep = dependency('tensorflow', required: false) -protobuf_dep = dependency('protobuf', version: '>= 3.4.0', required: false) - -have_tensorflow = false -if tf_dep.found() and protobuf_dep.found() - have_tensorflow = true -endif +have_tensorflow = tf_dep.found() and protobuf_dep.found() # Dependency for tensorflow-lite example tflite_dep = dependency('tensorflow-lite', required: false) tflite2_dep = dependency('tensorflow2-lite', required: false) - -have_tensorflow_lite = false -if tflite_dep.found() or tflite2_dep.found() - have_tensorflow_lite = true -endif +have_tensorflow_lite = tflite_dep.found() or tflite2_dep.found() # Dependency for caffe2 example caffe2_dep = dependency('caffe2', required: false) - -have_caffe2 = false -if caffe2_dep.found() and protobuf_dep.found() - have_caffe2 = true -endif +have_caffe2 = caffe2_dep.found() and protobuf_dep.found() # Dependency for nnfw example nnfw_dep = dependency('nnfw', required: false) if not nnfw_dep.found() nnfw_dep = cc.find_library('nnfw-dev', required: false) endif - -have_nnfw = false -if nnfw_dep.found() - have_nnfw = true -endif +have_nnfw = nnfw_dep.found() # Dependency for openvino example openvino_dep = dependency('openvino', required: false) - -have_openvino = false -if openvino_dep.found() - have_openvino = true -endif +have_openvino = openvino_dep.found() # Dependency for pytorch example pytorch_dep = dependency('pytorch', required: false) -have_pytorch = false -if pytorch_dep.found() - have_pytorch = true +if not pytorch_dep.found() + pytorch_dep = dependency('torch', required: false) endif +have_pytorch = pytorch_dep.found() # Dependency for nnstreamer-edge examples nns_edge_dep = dependency('nnstreamer-edge', required: false) # Dependency for ncnn examples ncnn_dep = dependency('ncnn', required: false) -have_ncnn = false -if ncnn_dep.found() - have_ncnn = true -endif +have_ncnn = ncnn_dep.found() # Dependency for onnxruntime examples onnx_dep = dependency('libonnxruntime', required: false) -have_onnx = false -if onnx_dep.found() - have_onnx = true -endif - -opencv_dep = dependency('opencv4', required: false) +have_onnx = onnx_dep.found() # Dependency for training offloading example nntrainer_dep = dependency('nntrainer', required: false)