hibiscus/meson.build
2023-05-26 22:41:51 +01:00

29 lines
1.3 KiB
Meson

project('hibis', 'cpp', version: '0.0.0' + (not get_option('buildtype').startswith('release') ? '-' + run_command('git', 'rev-parse', '--short', 'HEAD', check: true).stdout().strip() : ''),
license: 'LGPL-3.0-only', meson_version: '>=0.60.3', default_options: ['cpp_std=c++17'])
# Configure data
confdata = configuration_data()
confdata.set('version', meson.project_version())
configure_file(input: 'core/enginever.in.hpp', output: 'enginever.hpp', configuration: confdata)
# Include Directory
include_dirs = include_directories('./include')
# Files
libhibis_src_core = files('core/engine/engine.cpp')
libhibis_src = [libhibis_src_core]
libhibis_rsdl_src = files('renderer/rsdl/rsdl.cpp', 'renderer/rsdl/resources/font.cpp')
libhibis_test_src = files('test/app.cpp')
# Dependencies
libsdl2 = dependency('SDL2')
libsdl2_ttf = dependency('SDL2_ttf')
libfmt = dependency('fmt')
# Compile
libhibis = library('hibis', libhibis_src, include_directories: include_dirs)
libhibis_rsdl = library('hibis_rsdl', libhibis_rsdl_src, include_directories: [include_dirs, './core'], link_with: libhibis, dependencies: [libsdl2, libsdl2_ttf, libfmt])
hibistest = executable('hibistest.exec', libhibis_test_src, include_directories: [include_dirs, './core', './renderer/rsdl'], link_with: [libhibis, libhibis_rsdl], dependencies: [libsdl2, libsdl2_ttf, libfmt])