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>
-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)
-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)
)
# 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
gtest_dep = dependency('gtest', required: false)
if gtest_dep.found()
libgem_unittest_deps = [
- libgem_deps,
+ libgem_dep,
gtest_dep
]
test('unittest_libgem', unittest_libgem)
npu_engine_unittest_deps = [
- npu_engine_deps_static,
- libgem_deps,
+ npu_engine_dep,
gtest_dep
]