project('term', 'c', version: '0.1.0', meson_version: '>=1.1.0', default_options: [ 'c_std=c11', 'warning_level=3', 'b_ndebug=if-release', ], ) cc = meson.get_compiler('c') m_dep = cc.find_library('m', required: false) if get_option('arch_flag') != '' add_project_arguments(get_option('arch_flag'), language: 'c') endif # A host sees include/ only. The sources also find the public headers # without the term/ prefix. term_inc = include_directories('include') term_private_inc = include_directories('src', 'include/term') subdir('src') term_dep = declare_dependency( include_directories: term_inc, link_with: term_headless_lib.get_static_lib(), dependencies: m_dep, ) meson.override_dependency('term', term_dep) # The private headers too. Only the term tests and benchmarks use it. term_internal_dep = declare_dependency( include_directories: [term_inc, term_private_inc], link_with: term_headless_lib.get_static_lib(), dependencies: m_dep, ) # The short forms of term.h that the term tests use. A host project can use # them in its own tests. term_test_dep = declare_dependency( include_directories: include_directories('tests/helpers'), dependencies: term_dep, ) if get_option('tests') subdir('tests') subdir('benchmarks') endif