libdl_dep = cc.find_library('dl') # DL library
thread_dep = dependency('threads') # pthread for tensorflow-lite
+# Protobuf
+protobuf_dep = dependency('protobuf', version: '>= 3.6.1', required: false)
+
# Orc
have_orcc = false
# Tensorflow
if get_option('enable-tensorflow')
tf_dep = dependency('tensorflow', required: true)
- protobuf_dep = dependency('protobuf', version: '>= 3.4.0', required: true)
if tf_dep.found() and protobuf_dep.found()
add_project_arguments('-DENABLE_TENSORFLOW=1', language: ['c', 'cpp'])
if torch_dep.found()
add_project_arguments('-DENABLE_PYTORCH=1', language: ['c', 'cpp'])
else
- message('Cannot find pytorch')
+ error('Cannot find pytorch')
endif
endif
if get_option('enable-caffe2')
caffe2_dep = dependency('caffe2', required: true)
- if caffe2_dep.found()
+ if caffe2_dep.found() and protobuf_dep.found()
add_project_arguments('-DENABLE_CAFFE2=1', language: ['c', 'cpp'])
else
- message('Cannot find caffe2')
+ error('Cannot find caffe2')
endif
endif