mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-10 14:13:34 +00:00
feat(meson): adding meson.build
This commit is contained in:
73
meson.build
git.filemode.normal_file
73
meson.build
git.filemode.normal_file
@@ -0,0 +1,73 @@
|
||||
project('MacroLibX',
|
||||
['c', 'cpp'],
|
||||
version : '2.2.2',
|
||||
license : 'MIT',
|
||||
meson_version : '>= 1.9.0',
|
||||
default_options : ['warning_level=2', 'optimization=3', 'cpp_std=c++20'])
|
||||
|
||||
add_project_arguments('-Wno-error=', language : 'c')
|
||||
add_project_arguments('-fPIC', language : 'c')
|
||||
add_project_arguments('-DSDL_MAIN_HANDLED', language : 'c')
|
||||
|
||||
if get_option('force_integrated_gpu')
|
||||
add_project_arguments('-DFORCE_INTEGRATED_GPU', language : 'c')
|
||||
endif
|
||||
|
||||
if get_option('graphics_memory_dump')
|
||||
add_project_arguments('-DGRAPHICS_MEMORY_DUMP', language : 'c')
|
||||
endif
|
||||
|
||||
if get_option('profiler')
|
||||
add_project_arguments('-DPROFILER_ENABLED', language : 'c')
|
||||
endif
|
||||
|
||||
if get_option('force_wayland')
|
||||
add_project_arguments('-DFORCE_WAYLAND', language : 'c')
|
||||
endif
|
||||
|
||||
if get_option('disable_all_safeties')
|
||||
add_project_arguments('-DDISABLE_ALL_SAFETIES', language : 'c')
|
||||
endif
|
||||
|
||||
includes_directories = [
|
||||
include_directories('includes'),
|
||||
include_directories('runtime/Includes'),
|
||||
include_directories('runtime/Sources'),
|
||||
include_directories('third_party'),
|
||||
]
|
||||
|
||||
subdir('runtime/Sources')
|
||||
|
||||
mlx_headers = [
|
||||
'includes/mlx.h',
|
||||
'includes/mlx_extended.h',
|
||||
'includes/mlx_profile.h'
|
||||
]
|
||||
|
||||
install_headers(mlx_headers)
|
||||
|
||||
deps = [
|
||||
dependency('sdl2'),
|
||||
]
|
||||
|
||||
libmlx = library('mlx',
|
||||
sources,
|
||||
include_directories : includes_directories,
|
||||
dependencies : deps,
|
||||
install : true)
|
||||
|
||||
libmlx_dep = declare_dependency(
|
||||
include_directories: includes_directories,
|
||||
dependencies : deps,
|
||||
link_with : libmlx)
|
||||
|
||||
# PKG CONFIG GENERATION
|
||||
pkg_mod = import('pkgconfig')
|
||||
|
||||
pkg_mod.generate(
|
||||
libmlx,
|
||||
name : 'mlx',
|
||||
description : 'MacroLibX Library',
|
||||
version : meson.project_version(),
|
||||
subdirs : ['.'],
|
||||
)
|
||||
29
meson_options.txt
git.filemode.normal_file
29
meson_options.txt
git.filemode.normal_file
@@ -0,0 +1,29 @@
|
||||
option('force_integrated_gpu',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Force the application to use the integrated GPU if available.'
|
||||
)
|
||||
|
||||
option('graphics_memory_dump',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Enable graphics memory dump for debugging purposes.'
|
||||
)
|
||||
|
||||
option('profiler',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Enable profiler for performance analysis.'
|
||||
)
|
||||
|
||||
option('force_wayland',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Force the application to use Wayland display server.'
|
||||
)
|
||||
|
||||
option('disable_all_safeties',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Disable all safety checks in the application.'
|
||||
)
|
||||
14
runtime/Sources/Core/meson.build
git.filemode.normal_file
14
runtime/Sources/Core/meson.build
git.filemode.normal_file
@@ -0,0 +1,14 @@
|
||||
sources += [
|
||||
files(
|
||||
'Application.cpp',
|
||||
'Bridge.cpp',
|
||||
'EventBus.cpp',
|
||||
'EventListener.cpp',
|
||||
'Fps.cpp',
|
||||
'Graphics.cpp',
|
||||
'Logs.cpp',
|
||||
'Memory.cpp',
|
||||
'Profiler.cpp',
|
||||
'SDLManager.cpp',
|
||||
'UUID.cpp')
|
||||
]
|
||||
10
runtime/Sources/Graphics/meson.build
git.filemode.normal_file
10
runtime/Sources/Graphics/meson.build
git.filemode.normal_file
@@ -0,0 +1,10 @@
|
||||
sources += [
|
||||
files(
|
||||
'Font.cpp',
|
||||
'Mesh.cpp',
|
||||
'PutPixelManager.cpp',
|
||||
'Scene.cpp',
|
||||
'Sprite.cpp',
|
||||
'Text.cpp'
|
||||
)
|
||||
]
|
||||
6
runtime/Sources/Platform/meson.build
git.filemode.normal_file
6
runtime/Sources/Platform/meson.build
git.filemode.normal_file
@@ -0,0 +1,6 @@
|
||||
sources += [
|
||||
files(
|
||||
'Inputs.cpp',
|
||||
'Window.cpp'
|
||||
)
|
||||
]
|
||||
6
runtime/Sources/Renderer/Pipelines/meson.build
git.filemode.normal_file
6
runtime/Sources/Renderer/Pipelines/meson.build
git.filemode.normal_file
@@ -0,0 +1,6 @@
|
||||
sources += [
|
||||
files(
|
||||
'Graphics.cpp',
|
||||
'Shader.cpp'
|
||||
)
|
||||
]
|
||||
7
runtime/Sources/Renderer/RenderPasses/meson.build
git.filemode.normal_file
7
runtime/Sources/Renderer/RenderPasses/meson.build
git.filemode.normal_file
@@ -0,0 +1,7 @@
|
||||
sources += [
|
||||
files(
|
||||
'2DPass.cpp',
|
||||
'FinalPass.cpp',
|
||||
'Passes.cpp'
|
||||
)
|
||||
]
|
||||
5
runtime/Sources/Renderer/Vulkan/meson.build
git.filemode.normal_file
5
runtime/Sources/Renderer/Vulkan/meson.build
git.filemode.normal_file
@@ -0,0 +1,5 @@
|
||||
sources += [
|
||||
files(
|
||||
'VulkanLoader.cpp'
|
||||
)
|
||||
]
|
||||
16
runtime/Sources/Renderer/meson.build
git.filemode.normal_file
16
runtime/Sources/Renderer/meson.build
git.filemode.normal_file
@@ -0,0 +1,16 @@
|
||||
sources += [
|
||||
files(
|
||||
'Buffer.cpp',
|
||||
'Descriptor.cpp',
|
||||
'Image.cpp',
|
||||
'Memory.cpp',
|
||||
'RenderCore.cpp',
|
||||
'Renderer.cpp',
|
||||
'SceneRenderer.cpp',
|
||||
'Swapchain.cpp'
|
||||
)
|
||||
]
|
||||
|
||||
subdir('Pipelines')
|
||||
subdir('RenderPasses')
|
||||
subdir('Vulkan')
|
||||
5
runtime/Sources/meson.build
git.filemode.normal_file
5
runtime/Sources/meson.build
git.filemode.normal_file
@@ -0,0 +1,5 @@
|
||||
sources = []
|
||||
subdir('Core')
|
||||
subdir('Graphics')
|
||||
subdir('Platform')
|
||||
subdir('Renderer')
|
||||
Reference in New Issue
Block a user