[meson] Update meson for ubuntu 20.04
authorParichay Kapoor <pk.kapoor@samsung.com>
Tue, 19 Jan 2021 12:58:47 +0000 (21:58 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Fri, 22 Jan 2021 04:11:58 +0000 (13:11 +0900)
Update meson to work with ubuntu 20.04
Also add some missing checks

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Applications/MNIST/jni/meson.build
meson.build

index a7293ebce2f6687e0ae9e833b86e2d2fd0725e83..b00c3c251d10cf84d519b0928ee696b57f62bec9 100644 (file)
@@ -2,10 +2,8 @@ mnist_sources = [
   'main.cpp'
 ]
 
-if build_platform == 'tizen'
-  if not gtest_dep.found()
-    error('Gtest dependency not found for MNIST application')
-  endif
+if not gtest_dep.found()
+  error('Gtest dependency not found for MNIST application')
 endif
 
 executable('nntrainer_mnist',
index 866f65a9ea03f0852c7e49cecaabeee438336502..db6549d0fef89544c5637a68e04238edddd7d310 100644 (file)
@@ -96,7 +96,11 @@ if get_option('enable-blas')
   if build_platform == 'tizen'
     blas_dep = dependency('openblas')
   else
-    blas_dep = dependency('blas-openblas')
+    blas_dep = dependency('blas-openblas', required:false)
+    # for Ubuntu 20.04
+    if not blas_dep.found()
+      blas_dep = dependency('openblas')
+    endif
   endif
 endif
 
@@ -144,8 +148,6 @@ if get_option('enable-tflite-backbone')
   add_project_arguments('-DENABLE_TFLITE_BACKBONE=1', language:['c','cpp'])
 endif
 
-jsoncpp_dep = dependency('jsoncpp') # jsoncpp
-libcurl_dep = dependency('libcurl')
 gtest_dep = dependency('gtest', required: false)
 
 # Install .pc
@@ -161,6 +163,8 @@ subdir('nntrainer')
 subdir('api')
 
 if get_option('enable-app')
+  jsoncpp_dep = dependency('jsoncpp') # jsoncpp
+  libcurl_dep = dependency('libcurl')
   if not tflite_dep.found()
     error('Tensorflow-Lite dependency not found')
   endif