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', 'core/resources/font.cpp') libhibis_src = [libhibis_src_core, libhibis_src_resources] libhibis_rglcore_src = files('renderer/rglcore/rglcore.cpp') libhibis_test_src = files('test/app.cpp') # Dependencies libgl = dependency('gl') libglfw = dependency('glfw3') libglew = dependency('GLEW') libfmt = dependency('fmt') libfreetype2 = dependency('freetype2') liblodepng = static_library('lodepng', 'external/lodepng/lodepng.cpp') # Compile libhibis = library('hibis', libhibis_src, include_directories: include_dirs, link_with: liblodepng, 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])