1 # Do NOT enable C in core
2 # C++ is only allowed inside test directory for gtest.
4 project('npu-engine', 'c',
6 license: ['Proprietary'],
7 meson_version: '>=0.42.0',
15 add_project_arguments('-DVERSION="' + meson.project_version() + '"', language: ['c'])
17 cc = meson.get_compiler('c')
20 '-Wmissing-declarations',
21 '-Wmissing-prototypes',
24 '-Wold-style-definition',
25 '-Wdeclaration-after-statement'
28 foreach extra_arg : warning_c_flags
29 if cc.has_argument (extra_arg)
30 add_project_arguments([extra_arg], language: 'c')
35 ne_prefix = get_option('prefix')
36 ne_libdir = join_paths(ne_prefix, get_option('libdir'))
37 ne_bindir = join_paths(ne_prefix, get_option('bindir'))
38 ne_inidir = get_option('sysconfdir')
39 ne_common_inc = include_directories('../common/include')
40 ne_common_dep = declare_dependency(
41 include_directories: ne_common_inc
44 libdl_dep = cc.find_library('dl') # DL library
45 libm_dep = cc.find_library('m') # math library
46 libdrm_dep = dependency('libdrm') # libdrm library
47 thread_dep = dependency('threads') # pthread library
48 iniparser_dep = dependency('iniparser') # iniparser library
53 comm_opt = get_option('comm_opt')
61 # Build final exported so
62 plugin_ip_executable = shared_library('npu-engine',
63 dependencies: ne_dependencies,