31 lines
1.5 KiB
Meson
31 lines
1.5 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('./external')
|
|
|
|
# Files
|
|
libhibis_src_core = files('core/engine/engine.cpp')
|
|
libhibis_src_resources = files('core/resources/texture.cpp')
|
|
libhibis_src = [libhibis_src_core, libhibis_src_resources]
|
|
|
|
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')
|
|
liblodepng = static_library('lodepng', 'external/lodepng/lodepng.cpp')
|
|
|
|
# Compile
|
|
libhibis = library('hibis', libhibis_src, include_directories: include_dirs, link_with: liblodepng)
|
|
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])
|