summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hunt <david.hunt@intel.com>2019-07-12 10:06:51 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-07-12 10:26:55 +0100
commit16015fd65a5532604139d4c597e1c16027209c4e (patch)
treebc7a159569766a0cd692fc44db3d0eadf2720e6a
parent22a55d2eb6ab7a096500f757edf8bbb0715deb28 (diff)
downloaddpdk-16015fd65a5532604139d4c597e1c16027209c4e.zip
dpdk-16015fd65a5532604139d4c597e1c16027209c4e.tar.gz
dpdk-16015fd65a5532604139d4c597e1c16027209c4e.tar.xz
examples/power: fix FreeBSD meson lib dependency
Samples apps that depend on the power library should not build if the power library is not present. So now the following apps will check to see if it's built, else skip building. * l3fwd-pwer * vm_power_manager * guest_cli Fixes: e0130788576f ("examples/power: support meson/ninja build") Fixes: 89f0711f9ddf ("examples: build some samples with meson") Cc: stable@dpdk.org Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
-rw-r--r--examples/l3fwd-power/meson.build6
-rw-r--r--examples/vm_power_manager/guest_cli/meson.build5
-rw-r--r--examples/vm_power_manager/meson.build10
3 files changed, 16 insertions, 5 deletions
diff --git a/examples/l3fwd-power/meson.build b/examples/l3fwd-power/meson.build
index b38a7a0..d5a3d4b 100644
--- a/examples/l3fwd-power/meson.build
+++ b/examples/l3fwd-power/meson.build
@@ -6,9 +6,11 @@
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if not is_linux
- build = false
+if not dpdk_conf.has('RTE_LIBRTE_POWER')
+ build = false
+ subdir_done()
endif
+
allow_experimental_apis = true
deps += ['power', 'timer', 'lpm', 'hash', 'metrics']
sources = files(
diff --git a/examples/vm_power_manager/guest_cli/meson.build b/examples/vm_power_manager/guest_cli/meson.build
index 9e821ce..38bd8d8 100644
--- a/examples/vm_power_manager/guest_cli/meson.build
+++ b/examples/vm_power_manager/guest_cli/meson.build
@@ -10,6 +10,11 @@
# vm_power_manager app because of the way the directories are parsed.
name = 'guest_cli'
+if not dpdk_conf.has('RTE_LIBRTE_POWER')
+ build = false
+ subdir_done()
+endif
+
deps += ['power']
sources = files(
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index f98445b..20a4a05 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -6,6 +6,13 @@
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
+if not dpdk_conf.has('RTE_LIBRTE_POWER')
+ build = false
+ subdir_done()
+endif
+
+deps += ['power']
+
if dpdk_conf.has('RTE_LIBRTE_BNXT_PMD')
deps += ['pmd_bnxt']
endif
@@ -18,9 +25,6 @@ if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
deps += ['pmd_ixgbe']
endif
-deps += ['power']
-
-
sources = files(
'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
)