aboutsummaryrefslogtreecommitdiff
path: root/src/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/meson.build')
-rw-r--r--src/meson.build25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/meson.build b/src/meson.build
index fe092d1..e19a918 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -33,7 +33,6 @@ foreach g: generated_sources
input: registry,
output: [ gen_source ],
command: [
- python,
gen_dispatch_py,
'--source',
'--no-header',
@@ -54,19 +53,24 @@ if host_system == 'linux' and cc.get_id() == 'gcc'
endif
# Maintain compatibility with autotools; see: https://github.com/anholt/libepoxy/issues/108
-if host_system == 'darwin'
- common_ldflags += [ '-compatibility_version 1', '-current_version 1.0', ]
-endif
+darwin_versions = [1, '1.0']
epoxy_deps = [ dl_dep, ]
if host_system == 'windows'
epoxy_deps += [ opengl32_dep, gdi32_dep ]
endif
+if enable_x11
+ epoxy_deps += [ x11_headers_dep, ]
+endif
+if build_egl
+ epoxy_deps += [ elg_headers_dep, ]
+endif
libepoxy = library(
'epoxy',
sources: epoxy_sources + epoxy_headers,
version: '0.0.0',
+ darwin_versions: darwin_versions,
install: true,
dependencies: epoxy_deps,
include_directories: libepoxy_inc,
@@ -74,17 +78,22 @@ libepoxy = library(
link_args: common_ldflags,
)
+epoxy_has_glx = build_glx ? '1' : '0'
+epoxy_has_egl = build_egl ? '1' : '0'
+epoxy_has_wgl = build_wgl ? '1' : '0'
+
libepoxy_dep = declare_dependency(
link_with: libepoxy,
include_directories: libepoxy_inc,
dependencies: epoxy_deps,
sources: epoxy_headers,
+ variables: {
+ 'epoxy_has_glx': epoxy_has_glx,
+ 'epoxy_has_egl': epoxy_has_egl,
+ 'epoxy_has_wgl': epoxy_has_wgl,
+ },
)
-epoxy_has_glx = build_glx ? '1' : '0'
-epoxy_has_egl = build_egl ? '1' : '0'
-epoxy_has_wgl = build_wgl ? '1' : '0'
-
# We don't want to add these dependencies to the library, as they are
# not needed when building Epoxy; we do want to add them to the generated
# pkg-config file, for consumers of Epoxy