github.com/cptmikhailov/conmon@v2.0.20+incompatible/meson.build (about)

     1  project('conmon', 'c',
     2          version : run_command('cat', files('VERSION'),).stdout().strip(),
     3          license : 'Apache-2.0',
     4          default_options : [
     5                  'c_std=c99',
     6          ],
     7          meson_version : '>= 0.46',
     8  )
     9  
    10  git_commit = ''
    11  
    12  git = find_program('git', required : false)
    13  if git.found()
    14          git_commit = run_command(
    15                  git,
    16                  ['--git-dir=@0@/.git'.format(meson.source_root()),
    17                   'rev-parse', 'HEAD']).stdout().strip()
    18          git_dirty = run_command(
    19                  git,
    20                  ['--git-dir=@0@/.git'.format(meson.source_root()),
    21                   'status', '--porcelain', '--untracked-files=no']).stdout().strip()
    22          if git_dirty != ''
    23                  git_commit = git_commit + '-dirty'
    24          endif
    25  endif
    26  
    27  conf = configuration_data()
    28  conf.set_quoted('VERSION', meson.project_version())
    29  conf.set_quoted('GIT_COMMIT', git_commit)
    30  
    31  add_project_arguments('-Os', '-Wall', '-Werror',
    32                        '-DVERSION=' + conf.get('VERSION'),
    33                        '-DGIT_COMMIT=' + conf.get('GIT_COMMIT'),
    34                        language : 'c')
    35  
    36  glib = dependency('glib-2.0')
    37  
    38  executable('conmon',
    39             ['src/conmon.c',
    40              'src/config.h',
    41              'src/cmsg.c',
    42              'src/cmsg.h',
    43              'src/ctr_logging.c',
    44              'src/ctr_logging.h',
    45              'src/cgroup.c',
    46              'src/cgroup.h',
    47              'src/cli.c',
    48              'src/cli.h',
    49              'src/conn_sock.c',
    50              'src/conn_sock.h',
    51              'src/ctr_exit.c',
    52              'src/ctr_exit.h',
    53              'src/ctrl.c',
    54              'src/ctrl.h',
    55              'src/ctr_logging.c',
    56              'src/ctr_logging.h',
    57              'src/ctr_stdio.c',
    58              'src/ctr_stdio.h',
    59              'src/globals.c',
    60              'src/globals.h',
    61              'src/oom.c',
    62              'src/oom.h',
    63              'src/parent_pipe_fd.c',
    64              'src/parent_pipe_fd.h',
    65              'src/runtime_args.c',
    66              'src/runtime_args.h',
    67              'src/utils.c',
    68              'src/utils.h'],
    69             dependencies : [glib],
    70             install : true,
    71             install_dir : join_paths(get_option('libexecdir'), 'podman'),
    72  )
    73