Skip to content
Snippets Groups Projects
Select Git revision
  • c28163ad8557e879f56d7826a6614dae08f5c7f8
  • master default protected
  • dither_on_off_disabled
  • yocto
  • pypcc2
  • pypcc3
  • 2020-12-07-the_only_working_copy
  • v2.0
  • v1.0
  • v0.9
  • Working-RCU_ADC,ID
  • 2020-12-11-Holiday_Season_release
12 results

meson.build

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    meson.build 1.05 KiB
    project('i2c', ['c'],
      version: run_command(
        'head', '-n', '1', files('VERSION'),
      ).stdout().strip(),
      meson_version: '>= 0.56.0',
      license: 'MIT',
      default_options: [
        'c_std=c11',
        'warning_level=2',  # -Wall, -Wextra
        'werror=true',  # -Werror
      ],
    )
    
    # the c++ compiler object
    cc = meson.get_compiler('c')
    
    # global cflags (public, included in subprojects and pkg-config)
    cflags = ['-DLIBI2C_VERSION="' + meson.project_version() + '"']
    
    # per compiler cflags, if desired
    if cc.get_id() == 'clang'
      cflags += []
    else
      cflags += []
    endif
    
    # split the project version
    proj_ver = meson.project_version().split('.')
    # version minus patch revision
    proj_ver_short = proj_ver[0] + '.' + proj_ver[1]
    proj_ver_major = proj_ver[0]
    proj_ver_minor = proj_ver[1]
    proj_ver_patch = proj_ver[2]
    
    # all of this is used by configure_file on i2c_config.h.in
    proj_description = 'Linux userspace i2c operation library'
    proj_url = 'https://github.com/amaork/libi2c'
    binary_package = 'libi2c'
    origin = 'github'
    
    subdir('include')
    subdir('src')
    subdir('example')
    subdir('tests')