summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorClément Sibille <clements@lisible.xyz>2025-03-16 19:13:09 +0100
committerClément Sibille <clements@lisible.xyz>2025-03-18 21:25:10 +0100
commitcb74ffacedb3c1bc4a5398d665d1f4dc12f69a4a (patch)
tree23c91e34fd0a5dafb47beac7e7e0c6f6bd26457f /meson.build
parent038c0c44d26a45554e3cc6257bc67d3fecb291cd (diff)
Add the renderer's foundations
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build23
1 files changed, 21 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index e3997cf..6aa0ceb 100644
--- a/meson.build
+++ b/meson.build
@@ -1,13 +1,32 @@
project('visible-gltf', 'c', default_options: ['warning_level=3', 'c_std=c23'])
+build_type = get_option('buildtype')
+
sdl3_dep = dependency('sdl3')
+if host_machine.system() == 'darwin'
+moltenvk_library_path = '/Users/clements/dev/VulkanSDK/1.4.309.0/macOS/lib'
+moltenvk_include_path = '/Users/clements/dev/VulkanSDK/1.4.309.0/macOS/include'
+vulkan_dep = declare_dependency(
+ link_args: ['-L' + moltenvk_library_path, '-lvulkan'],
+ include_directories: include_directories(moltenvk_include_path)
+)
+else
+vulkan_dep = dependency('vulkan')
+endif
+
+vgltf_c_args = []
+if build_type == 'debug'
+ vgltf_c_args += '-DVGLTF_DEBUG'
+endif
executable(
'vgltf',
[
'src/main.c',
'src/log.c',
- 'src/platform_sdl.c'
+ 'src/platform_sdl.c',
+ 'src/renderer.c',
],
- dependencies: [sdl3_dep]
+ c_args: vgltf_c_args,
+ dependencies: [sdl3_dep, vulkan_dep],
)
Go back to lisible.xyz