meson.build 737 Bytes
Newer Older
Tomas Krizek's avatar
Tomas Krizek committed
1 2
# client

Tomas Krizek's avatar
Tomas Krizek committed
3
kresc_src = files([
Tomas Krizek's avatar
Tomas Krizek committed
4
  'kresc.c',
Tomas Krizek's avatar
Tomas Krizek committed
5 6
])
c_src_lint += kresc_src
Tomas Krizek's avatar
Tomas Krizek committed
7

Tomas Krizek's avatar
Tomas Krizek committed
8 9 10 11 12 13
build_client = false
if not get_option('client').disabled()
  message('--- client dependencies ---')
  libedit = dependency('libedit', required: false)
  if libedit.found()
    build_client = true
14
  else  # darwin workaround: missing pkgconfig
Tomas Krizek's avatar
Tomas Krizek committed
15 16 17 18 19 20
    libedit = meson.get_compiler('c').find_library('edit', required: get_option('client'))
    if libedit.found()
      build_client = true
    endif
  endif
  message('---------------------------')
Tomas Krizek's avatar
Tomas Krizek committed
21
endif
Tomas Krizek's avatar
Tomas Krizek committed
22 23


Tomas Krizek's avatar
Tomas Krizek committed
24 25 26 27 28 29 30 31 32 33 34 35 36
if build_client
  kresc = executable(
    'kresc',
    kresc_src,
    dependencies: [
      contrib_dep,
      libkres_dep,
      libedit,
    ],
    install: true,
    install_dir: get_option('sbindir'),
  )
endif