From ebafe31cb2c5b00d333c3543a17119b708445e55 Mon Sep 17 00:00:00 2001 From: Dongju Chae Date: Mon, 22 Feb 2021 12:35:07 +0900 Subject: [PATCH] [meson] supports alternative target name to find pkg dependency This patch supports alternative target name to find pkg dependency. For example, in case of armnn, the dependency name should be 'Armnn' not 'armnn' to find its cmake config files. Signed-off-by: Dongju Chae --- meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 30bc941..3afdd73 100644 --- a/meson.build +++ b/meson.build @@ -277,6 +277,7 @@ features = { }, 'armnn-support': { 'target': 'armnn', + 'target_alt': 'Armnn', 'project_args': { 'ENABLE_ARMNN': 1 } }, 'orcc-support': { @@ -319,7 +320,14 @@ foreach feature_name, data : features _deps = [] if target != '' - _deps += dependency(target, required: get_option(feature_name)) + target_dep = dependency(target, required: get_option(feature_name)) + if not target_dep.found() + target_alt = data.get('target_alt', '') + if target_alt != '' + target_dep = dependency(target_alt, required: get_option(feature_name)) + endif + endif + _deps += target_dep endif _deps += data.get('extra_deps', []) -- 2.7.4