summary refs log tree commit diff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build17
1 files changed, 15 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 8d3ed27..f69126f 100644
--- a/meson.build
+++ b/meson.build
@@ -8,11 +8,24 @@ project('meowcraft', 'cpp',
 subdir('assets')
 subdir('src')
 
+dependencies = []
+
 glfw = dependency('glfw3', version : '>=3.3')
 glew = dependency('glew', version : '>=2.1.0')
-opengl = dependency('appleframeworks', modules : ['OpenGL'])
+
+dependencies += [glfw, glew]
+
+if target_machine.system() == 'darwin'
+  darwin_opengl = dependency('appleframeworks', modules : ['OpenGL'])
+  dependencies += [darwin_opengl]
+endif
+
+if target_machine.system() == 'linux'
+  linux_opengl = dependency('gl')
+  dependencies += [linux_opengl]
+endif
 
 executable('meowcraft',
   source_files + [asset_file],
-  dependencies : [glfw, glew, opengl],
+  dependencies : dependencies,
   install : true)