project('hibis', 'cpp', 'c', 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']) # Imports cmake = import('cmake') # 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_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] libhibis_rwgpu_src = files('renderer/rwgpu/rwgpu.cpp') 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') libwgpu = meson.get_compiler('cpp').find_library('wgpu_native') libwgpu_glfw = static_library('glfw3webgpu', 'external/glfw3webgpu/glfw3webgpu.c', dependencies: [libglfw]) libfreetype2 = dependency('freetype2') # Compile 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]) libhibis_rwgpu = library('hibis_rwgpu', libhibis_rwgpu_src, include_directories: [include_dirs, './core'], link_with: [libhibis, libwgpu_glfw], dependencies: [libfreetype2, libglfw, libfmt, libwgpu]) hibistest = executable('hibistest.exec', libhibis_test_src, include_directories: [include_dirs, './core', './renderer/rwgpu'], link_with: [libhibis, libhibis_rwgpu], dependencies: [libfreetype2, libglfw, libfmt, libwgpu])