New upstream version 18.11-rc1
[deb_dpdk.git] / examples / vm_power_manager / meson.build
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
9 if dpdk_conf.has('RTE_LIBRTE_BNXT_PMD')
10         deps += ['pmd_bnxt']
11 endif
12
13 if dpdk_conf.has('RTE_LIBRTE_I40E_PMD')
14         deps += ['pmd_i40e']
15 endif
16
17 if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
18         deps += ['pmd_ixgbe']
19 endif
20
21 deps += ['power']
22
23
24 sources = files(
25         'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
26 )
27
28 # If we're on X86, pull in the x86 code for the branch monitor algo.
29 if dpdk_conf.has('RTE_ARCH_X86_64')
30         sources += files('oob_monitor_x86.c')
31 else
32         sources += files('oob_monitor_nop.c')
33 endif
34
35 opt_dep = cc.find_library('virt', required : false)
36 build = opt_dep.found()
37 ext_deps += opt_dep
38
39 opt_dep = dependency('jansson', required : false)
40 if opt_dep.found()
41         ext_deps += opt_dep
42         cflags += '-DUSE_JANSSON'
43 endif