hibiscus/meson.build

33 lines
1.6 KiB
Meson
Raw Normal View History

2023-05-26 21:41:51 +00:00
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
2023-05-30 16:00:39 +00:00
include_dirs = include_directories('./external')
2023-05-26 21:41:51 +00:00
# Files
libhibis_src_core = files('core/engine/engine.cpp')
2023-06-01 19:19:18 +00:00
libhibis_src_renderer = files('core/renderer/renderer.cpp')
libhibis_src_resources = files('core/resources/texture.cpp', 'core/resources/font.cpp', 'core/resources/shader.cpp')
libhibis_src = [libhibis_src_core, libhibis_src_renderer, libhibis_src_resources]
2023-05-26 21:41:51 +00:00
libhibis_rglcore_src = files('renderer/rglcore/rglcore.cpp')
2023-05-26 21:41:51 +00:00
libhibis_test_src = files('test/app.cpp')
# Dependencies
libgl = dependency('gl')
libglfw = dependency('glfw3')
libglew = dependency('GLEW')
2023-05-26 21:41:51 +00:00
libfmt = dependency('fmt')
libfreetype2 = dependency('freetype2')
2023-05-26 21:41:51 +00:00
# Compile
2023-06-01 19:19:18 +00:00
libhibis = library('hibis', libhibis_src, include_directories: include_dirs, dependencies: [libfreetype2])
libhibis_rglcore = library('hibis_rglcore', libhibis_rglcore_src, include_directories: [include_dirs, './core'], link_with: libhibis, dependencies: [libfreetype2, libgl, libglfw, libglew, libfmt])
hibistest = executable('hibistest.exec', libhibis_test_src, include_directories: [include_dirs, './core', './renderer/rglcore'], link_with: [libhibis, libhibis_rglcore], dependencies: [libfreetype2, libgl, libglfw, libglew, libfmt])