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_LIB_POWER')
10    build = false
11    subdir_done()
12endif
13
14deps += ['power']
15
16if dpdk_conf.has('RTE_NET_BNXT')
17    deps += ['net_bnxt']
18endif
19
20if dpdk_conf.has('RTE_NET_I40E')
21    deps += ['net_i40e']
22endif
23
24if dpdk_conf.has('RTE_NET_IXGBE')
25    deps += ['net_ixgbe']
26endif
27
28allow_experimental_apis = true
29sources = files(
30        'channel_manager.c',
31        'channel_monitor.c',
32        'main.c',
33        'parse.c',
34        'power_manager.c',
35        'vm_power_cli.c',
36)
37
38# If we're on X86, pull in the x86 code for the branch monitor algo.
39if dpdk_conf.has('RTE_ARCH_X86_64')
40    sources += files('oob_monitor_x86.c')
41else
42    sources += files('oob_monitor_nop.c')
43endif
44
45opt_dep = cc.find_library('virt', required : false)
46build = opt_dep.found()
47ext_deps += opt_dep
48
49opt_dep = dependency('jansson', required : false, method: 'pkg-config')
50if opt_dep.found()
51    ext_deps += opt_dep
52    cflags += '-DUSE_JANSSON'
53endif
54