xref: /dpdk/examples/vm_power_manager/meson.build (revision 089e5ed727a15da2729cfee9b63533dd120bd04c)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2018 Intel Corporation
3
4# meson file, for building this example as part of a main DPDK build.
5#
6# To build this example as a standalone application with an already-installed
7# DPDK instance, use 'make'
8
9if not dpdk_conf.has('RTE_LIBRTE_POWER')
10	build = false
11	subdir_done()
12endif
13
14deps += ['power']
15
16if dpdk_conf.has('RTE_LIBRTE_BNXT_PMD')
17	deps += ['pmd_bnxt']
18endif
19
20if dpdk_conf.has('RTE_LIBRTE_I40E_PMD')
21	deps += ['pmd_i40e']
22endif
23
24if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
25	deps += ['pmd_ixgbe']
26endif
27
28sources = files(
29	'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
30)
31
32# If we're on X86, pull in the x86 code for the branch monitor algo.
33if dpdk_conf.has('RTE_ARCH_X86_64')
34	sources += files('oob_monitor_x86.c')
35else
36	sources += files('oob_monitor_nop.c')
37endif
38
39opt_dep = cc.find_library('virt', required : false)
40build = opt_dep.found()
41ext_deps += opt_dep
42
43opt_dep = dependency('jansson', required : false)
44if opt_dep.found()
45	ext_deps += opt_dep
46	cflags += '-DUSE_JANSSON'
47endif
48