From: Wook Song Date: Tue, 21 Apr 2020 06:21:12 +0000 (+0900) Subject: [Core/NPU/Meson] Add fallback dependency on npu-engine-emul X-Git-Tag: accepted/tizen/unified/20220103.130045~422 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea50e6497f601119ef02cff200723b523282cae2;p=platform%2Fadaptation%2Fnpu%2Ftrix-engine.git [Core/NPU/Meson] Add fallback dependency on npu-engine-emul This patch makes meson find the npu-engine-emul without user-defined PKG_CONFIG_PATH. Signed-off-by: Wook Song --- diff --git a/src/core/npu/meson.build b/src/core/npu/meson.build index 6812bb5..f04a199 100644 --- a/src/core/npu/meson.build +++ b/src/core/npu/meson.build @@ -7,7 +7,17 @@ ne_core_npu_src = [ ] if get_option('enable_npu_emul') - ne_emul_dep = dependency('npu-engine-emul') + ne_emul_dep = dependency( + 'npu-engine-emul', + required: false + ) + if not ne_emul_dep.found() + warning('falling back to the hardcoded dependency on "npu-engine-emul"') + ne_emul_dep = declare_dependency ( + compile_args : ['-I/opt/trinity/include/npu-engine'], + link_args: ['-L/opt/trinity/lib', '-lnpu-engine-emul'], + ) + endif ne_core_npu_dep = declare_dependency( sources : [ne_core_npu_src, 'NPUdrvAPI_emul.cc'], dependencies : [ne_core_utils_dep, ne_emul_dep],