examples: stop processing meson file if build impossible
[dpdk.git] / examples / performance-thread / pthread_shim / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2019 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 build = dpdk_conf.has('RTE_ARCH_X86_64') or dpdk_conf.has('RTE_ARCH_ARM64')
10 if not build
11         subdir_done()
12 endif
13
14 deps += ['timer']
15 allow_experimental_apis = true
16
17 # get the performance thread (pt) architecture subdir
18 if dpdk_conf.has('RTE_ARCH_ARM64')
19         pt_arch_dir = '../common/arch/arm64'
20 else
21         pt_arch_dir = '../common/arch/x86'
22 endif
23 sources += files('main.c',
24         'pthread_shim.c',
25         '../common/lthread.c',
26         '../common/lthread_cond.c',
27         '../common/lthread_diag.c',
28         '../common/lthread_mutex.c',
29         '../common/lthread_sched.c',
30         '../common/lthread_tls.c',
31         pt_arch_dir + '/ctx.c')
32
33 includes += include_directories('../common', pt_arch_dir)