project('xce', ['c'], version: '0.0.1', meson_version: '>=1.5', default_options: [ 'c_std=gnu17']) with_debug=false if get_option('buildtype') == 'debug' # add -DWITH_DEBUG=1 add_project_arguments(['-DWITH_DEBUG=1', '-DDEBUG', '-Wno-cpp', '-fno-inline', '-fno-omit-frame-pointer', '-ggdb', '-g3', '-fvar-tracking', '-fvar-tracking-assignments', ], language: ['c', 'cpp']) with_debug=true endif add_project_arguments('-DVERSION_COMMIT_ID='+get_option('commit_id'), language: 'c') c_compiler_id = meson.get_compiler('c').get_id() if c_compiler_id == 'gcc' or c_compiler_id == 'clang' wrap_link_args = ['-Wl,--wrap=printf', '-Wl,--wrap=perror'] else wrap_link_args = [] endif go_compiler = find_program('go') pkgconfig = find_program('pkg-config') go_build = files('tools/go_build') go_build_program = find_program('go_build', go_build) env_program = find_program('env') include_dir = include_directories('include', 'include/xce') cc = meson.get_compiler('c') math_dep = cc.find_library('m', required: false) rt_dep = cc.find_library('rt', required: false) struct2json_dep = dependency('struct2json') libcyaml_dep = dependency('libcyaml') libyaml_dep = dependency('yaml-0.1') libtirpc_dep = dependency('libtirpc') yaml_deps = [ libcyaml_dep, libyaml_dep ] subdir('lib') subdir('controller') subdir('worker') subdir('autoscaler') subdir('scheduler') subdir('apiserver')