project(
    'openpower-debug-collector',
    'cpp',
    meson_version: '>= 0.57.0',
    default_options: [
        'warning_level=3',
        'werror=true',
        'cpp_std=c++20'
    ],
    license: 'Apache-2.0',
    version: '1.0.0',
)

systemd = dependency('systemd', required : true)

sdbusplus = dependency(
    'sdbusplus',
    fallback: [
        'sdbusplus',
        'sdbusplus_dep'
    ]
)
sdbusplusplus_prog = find_program('sdbus++', required : true)
sdbuspp_gen_meson_prog = find_program('sdbus++-gen-meson', required : true)

phosphorlogging = dependency(
    'phosphor-logging',
    fallback: [
        'phosphor-logging',
        'phosphor_logging_dep'
    ]
)

fmt_dep = dependency('fmt', required: false)
if not fmt_dep.found()
  fmt_proj = import('cmake').subproject(
    'fmt',
    cmake_options: [
      '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
      '-DMASTER_PROJECT=OFF'
    ],
    required: false)
  assert(fmt_proj.found(), 'fmtlib is required')
  fmt_dep = fmt_proj.dependency('fmt')
endif

deps = [
    systemd, sdbusplus, phosphorlogging, fmt_dep
]

realpath_prog = find_program('realpath')

selected_subdirs = []
selected_subdirs += 'org/open_power'

generated_root = meson.current_build_dir() / 'gen'
generated_others = []
generated_sources = []

# Source the generated meson files
subdir('gen')
foreach d : selected_subdirs
    subdir('gen' / d)
endforeach

# Parse through the list from sdbus++-gendir and put into sets.
generated_headers = []
generated_cpp = []
generated_others_files = []

foreach g : generated_sources generated_others
    foreach f : g.to_list()
        rel_path = run_command(
            realpath_prog,
            '--relative-to', generated_root,
            f.full_path(),
        ).stdout().strip().split('\n')[-1]

        if rel_path.endswith('.hpp')
            generated_headers += rel_path
        elif rel_path.endswith('.cpp')
            generated_cpp += rel_path
        else
            generated_others_files += rel_path
        endif
    endforeach
endforeach

conf_data = configuration_data()
if get_option('hostboot-dump-collection').enabled()
    conf_data.set('HOSTBOOT_DUMP_COLLECTION', true)
    subdir('watchdog')
else
    conf_data.set('HOSTBOOT_DUMP_COLLECTION', false)
    watchdog_lib = []
endif

executable('watchdog_timeout',
    'watchdog_timeout.cpp',
    configure_file(output: 'config.h', configuration: conf_data),
    generated_sources,
    dependencies: deps,
    link_with: watchdog_lib,
    include_directories: include_directories('gen'),
    implicit_include_directories: true,
    install: true
)

executable('checkstop_app',
    'checkstop_app.cpp',
    generated_sources,
    dependencies: deps,
    include_directories: include_directories('gen'),
    implicit_include_directories: true,
    install: true
)
