Skip to content

Commit

Permalink
examples/power: fix FreeBSD meson lib dependency
Browse files Browse the repository at this point in the history
[ upstream commit 16015fd ]

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: e013078 ("examples/power: support meson/ninja build")
Fixes: 89f0711 ("examples: build some samples with meson")

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  • Loading branch information
climberhunt authored and kevintraynor committed Aug 26, 2019
1 parent 5c0e9b1 commit 7cde4f3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
6 changes: 4 additions & 2 deletions examples/l3fwd-power/meson.build
Expand Up @@ -6,9 +6,11 @@
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'

if host_machine.system() != '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']
sources = files(
Expand Down
5 changes: 5 additions & 0 deletions examples/vm_power_manager/guest_cli/meson.build
Expand Up @@ -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(
Expand Down
10 changes: 7 additions & 3 deletions examples/vm_power_manager/meson.build
Expand Up @@ -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
Expand All @@ -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'
)
Expand Down

0 comments on commit 7cde4f3

Please sign in to comment.