# Function2 might not have a pkg-config. It is header only so just make
# sure we can access the needed symbols from the header.
function2_dep = dependency('function2', required: false)
has_function2 = meson.get_compiler('cpp').has_header_symbol(
  'function2/function2.hpp',
  'fu2::unique_function',
  dependencies: function2_dep,
  required: false)
if not has_function2
  function2_opts = import('cmake').subproject_options()
  function2_opts.add_cmake_defines({'BUILD_TESTING': 'OFF'})
  function2_proj = import('cmake').subproject(
    'function2',
    options: function2_opts,
    required: false)
  assert(function2_proj.found(), 'function2 is required')
  if function2_proj.found()
    function2_dep = function2_proj.dependency('function2')
  endif
endif

sdeventplus_deps = [
  dependency('libsystemd', version: '>=240'),
  dependency('stdplus', fallback: ['stdplus', 'stdplus_dep']),
  function2_dep,
]

sdeventplus_headers = include_directories('.')

sdeventplus_lib = library(
  'sdeventplus',
  [
    'sdeventplus/clock.cpp',
    'sdeventplus/event.cpp',
    'sdeventplus/exception.cpp',
    'sdeventplus/internal/sdevent.cpp',
    'sdeventplus/source/base.cpp',
    'sdeventplus/source/child.cpp',
    'sdeventplus/source/event.cpp',
    'sdeventplus/source/io.cpp',
    'sdeventplus/source/signal.cpp',
    'sdeventplus/source/time.cpp',
    'sdeventplus/utility/timer.cpp',
  ],
  include_directories: sdeventplus_headers,
  implicit_include_directories: false,
  version: meson.project_version(),
  dependencies: sdeventplus_deps,
  install: true)

sdeventplus_dep = declare_dependency(
  dependencies: sdeventplus_deps,
  include_directories: sdeventplus_headers,
  link_with: sdeventplus_lib)

sdeventplus_reqs = []
foreach dep : sdeventplus_deps
  if dep.type_name() == 'pkgconfig'
    sdeventplus_reqs += dep
  endif
endforeach

import('pkgconfig').generate(
  sdeventplus_lib,
  description: 'C++ systemd event wrapper',
  version: meson.project_version(),
  requires: sdeventplus_reqs)

install_headers(
  'sdeventplus/clock.hpp',
  'sdeventplus/event.hpp',
  'sdeventplus/exception.hpp',
  'sdeventplus/types.hpp',
  subdir: 'sdeventplus')

install_headers(
  'sdeventplus/internal/sdevent.hpp',
  subdir: 'sdeventplus/internal')

install_headers(
  'sdeventplus/source/base.hpp',
  'sdeventplus/source/child.hpp',
  'sdeventplus/source/event.hpp',
  'sdeventplus/source/io.hpp',
  'sdeventplus/source/signal.hpp',
  'sdeventplus/source/time.hpp',
  subdir: 'sdeventplus/source')

install_headers(
  'sdeventplus/test/sdevent.hpp',
  subdir: 'sdeventplus/test')

install_headers(
  'sdeventplus/utility/timer.hpp',
  subdir: 'sdeventplus/utility')
