aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build25
1 files changed, 16 insertions, 9 deletions
diff --git a/meson.build b/meson.build
index 0966749..48291f6 100644
--- a/meson.build
+++ b/meson.build
@@ -17,9 +17,10 @@ ui_deps = [m_dep, lv2_dep]
pugl_inc = include_directories('pugl')
nanovg_inc = include_directories('nanovg/src')
+glew_inc = include_directories('glew-2.1.0')
canvas_inc = include_directories('canvas.lv2')
ardour_inc = include_directories('ardour.lv2')
-inc_dir = [pugl_inc, nanovg_inc, canvas_inc, ardour_inc]
+inc_dir = [pugl_inc, nanovg_inc, glew_inc, canvas_inc, ardour_inc]
inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name())
@@ -39,7 +40,13 @@ clone = [cp, '@INPUT@', '@OUTPUT@']
dsp_srcs = ['canvas.c']
-ui_srcs = ['canvas_ui.c', 'nanovg/src/nanovg.c']
+ui_srcs = [
+ 'canvas_ui.c',
+ join_paths('nanovg', 'src', 'nanovg.c'),
+ join_paths('glew-2.1.0', 'glew.c')
+]
+
+ui_links = []
c_args = ['-fvisibility=hidden',
'-ffast-math']
@@ -49,18 +56,17 @@ if host_machine.system() == 'windows'
conf_data.set('UI_TYPE', 'WindowsUI')
ui_deps += cc.find_library('opengl32')
ui_deps += cc.find_library('gdi32')
- ui_deps += cc.find_library('user32')
+ ui_deps += cc.find_library('ws2_32')
ui_srcs += 'pugl/pugl/pugl_win.cpp'
elif host_machine.system() == 'darwin'
- #add_languages('objc')
+ add_languages('objc')
conf_data.set('UI_TYPE', 'CocoaUI')
- #ui_deps += cc.find_library('Cocoa')
- #ui_deps += cc.find_library('gl')
- #ui_deps += dependency('appleframeworks', modules : 'cocoa')
- #ui_srcs += 'pugl/pugl/pugl_osx.m'
+ ui_links += ['-framework', 'OpenGL']
+ ui_links += ['-framework', 'Cocoa']
+ ui_srcs += 'pugl/pugl/pugl_osx.m'
else
conf_data.set('UI_TYPE', 'X11UI')
- ui_deps += dependency('glew')
+ ui_deps += dependency('gl')
ui_deps += dependency('x11', version : '>=1.6.0')
ui_deps += dependency('xext', version : '>=1.3.0')
ui_srcs += 'pugl/pugl/pugl_x11.c'
@@ -79,6 +85,7 @@ ui = shared_module('canvas_display_ui', ui_srcs,
include_directories : inc_dir,
name_prefix : '',
dependencies : ui_deps,
+ link_args : ui_links,
install : true,
install_dir : inst_dir)