[Build] Revise meson.build for each module
authorDongju Chae <dongju.chae@samsung.com>
Tue, 16 Jul 2019 09:37:46 +0000 (18:37 +0900)
committer함명주/On-Device Lab(SR)/Principal Engineer/삼성전자 <myungjoo.ham@samsung.com>
Wed, 17 Jul 2019 07:08:50 +0000 (16:08 +0900)
This commit changes each meson.build file to use the same prefix and remove unncessary dependencies.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
core/libgem-core/meson.build
core/libnpu-core/meson.build
core/npu-engine/src/meson.build
core/test/meson.build

index a0c4c1d..a38353c 100644 (file)
@@ -1,22 +1,15 @@
-inc = include_directories(
-  'include',
+libgem_inc = include_directories('include')
+libgem_sources = ['src/GEMdrvAPI.c']
+libgem_dependencies = [libdrm_dep]
+
+# Build library (static)
+libgem_build = static_library('gem-core',
+  libgem_sources,
+  dependencies: libgem_dependencies,
+  include_directories: libgem_inc,
+  install: false
 )
 
-lib_sources = [
-  'src/GEMdrvAPI.c',
-]
-
-lib_deps = [
-  libdrm_dep
-]
-
-libgem_build = static_library('gem-core', 
-    lib_sources,
-    dependencies : lib_deps,
-    include_directories : inc,
-    install : false)
-
+# Declare dependency for other modules
 libgem_dep = declare_dependency(link_with : libgem_build,
-    include_directories : inc)
-
-libgem_deps = [ libgem_dep ] + lib_deps
+  include_directories : libgem_inc)
index e09221f..347d633 100644 (file)
@@ -1,15 +1,12 @@
-inc = include_directories(
-  'include',
-)
-
-lib_sources = [
-  'src/NPUdrvAPI.c',
-]
+libnpu_inc = include_directories('include')
+libnpu_sources = ['src/NPUdrvAPI.c']
 
+# Build library (static)
 libnpu_build = static_library('npu-core',
-    lib_sources,
-    include_directories : inc,
-    install : false)
+  libnpu_sources,
+  include_directories : libnpu_inc,
+  install : false)
 
+# Declare dependency for other modules
 libnpu_dep = declare_dependency(link_with : libnpu_build,
-    include_directories : inc)
+  include_directories : libnpu_inc)
index af86e00..e7884af 100644 (file)
@@ -53,6 +53,5 @@ npu_engine_static = static_library('npu-engine',
 )
 
 # Declare dependency for gtest
-npu_engine_dep_static = declare_dependency(link_with : npu_engine_static,
+npu_engine_dep = declare_dependency(link_with : npu_engine_static,
   include_directories : npu_engine_inc)
-npu_engine_deps_static = [ npu_engine_dep_static ] + npu_engine_dependencies
index 712add3..2f91d5a 100644 (file)
@@ -6,7 +6,7 @@ add_languages('cpp')
 gtest_dep = dependency('gtest', required: false)
 if gtest_dep.found()
   libgem_unittest_deps = [
-    libgem_deps,
+    libgem_dep,
     gtest_dep
   ]
 
@@ -19,8 +19,7 @@ if gtest_dep.found()
   test('unittest_libgem', unittest_libgem)
 
   npu_engine_unittest_deps = [
-    npu_engine_deps_static,
-    libgem_deps,
+    npu_engine_dep,
     gtest_dep
   ]