Merge remote-tracking branch 'akihikodaki/macos' into 1.5.9-macos

macos/v1.5.9
Nikita Tokarchuk 3 years ago
commit 001a36c01a
Signed by: mainnika
GPG Key ID: A595FB7E3E56911C
  1. 36
      meson.build
  2. 4
      src/dispatch_common.c
  3. 8
      src/meson.build

@ -1,4 +1,4 @@
project('libepoxy', 'c', version: '1.5.9',
project('libepoxy', 'c', version: '1.5.10',
default_options: [
'buildtype=debugoptimized',
'c_std=gnu99',
@ -95,6 +95,7 @@ if cc.get_id() == 'msvc'
'-we4053', # an expression of type void was used as an operand
'-we4071', # no function prototype given
'-we4819', # the file contains a character that cannot be represented in the current code page
'/utf-8', # Set the input and exec encoding to utf-8, like is the default with GCC
]
elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
test_cflags = [
@ -164,26 +165,47 @@ endif
# Dependencies
dl_dep = cc.find_library('dl', required: false)
gl_dep = dependency('gl', required: false)
# Optional dependencies for tests
x11_dep = dependency('x11', required: false)
x11_headers_dep = x11_dep.partial_dependency(compile_args: true, includes: true)
# We have multiple checks for EGL and GLES v2/v1 to support different providers:
# 1. pkg-config for Mesa
# 2. find_library() for ANGLE, which do not support pkg-config nor CMake.
# Note that Microsoft's "link" requires "lib" prefix.
# 3. CMake for Qt 5, which bundles ANGLE.
egl_dep = dependency('egl', required: false)
if not egl_dep.found()
egl_dep = cc.find_library('EGL', required: false)
endif
if not egl_dep.found()
egl_dep = cc.find_library('libEGL.dll', required: false)
endif
if not egl_dep.found()
egl_dep = dependency('Qt5Gui', modules: 'Qt5::Gui_EGL', required: false)
endif
# Optional dependencies for tests
x11_dep = dependency('x11', required: false)
# GLES v2 and v1 may have pkg-config files, courtesy of downstream
# packagers; let's check those first, and fall back to find_library()
# if we fail
gles2_dep = dependency('glesv2', required: false)
if not gles2_dep.found()
gles2_dep = cc.find_library('GLESv2', required: false)
endif
if not gles2_dep.found()
gles2_dep = cc.find_library('libGLESv2.dll', required: false)
endif
if not gles2_dep.found()
egl_dep = dependency('Qt5Gui', modules: 'Qt5::Gui_GLESv2', required: false)
endif
gles1_dep = dependency('glesv1_cm', required: false)
if not gles1_dep.found()
gles1_dep = cc.find_library('GLESv1_CM', required: false)
endif
if not gles1_dep.found()
gles1_dep = cc.find_library('libGLESv1_CM.dll', required: false)
endif
elg_headers_dep = egl_dep.partial_dependency(compile_args: true, includes: true)
# On windows, the DLL has to have all of its functions
# resolved at link time, so we have to link directly against

@ -684,7 +684,11 @@ epoxy_load_gl(void)
#endif
if (!api.gl_handle) {
#if defined(OPENGL_LIB)
fprintf(stderr, "Couldn't open %s or %s\n", GLX_LIB, OPENGL_LIB);
#else
fprintf(stderr, "Couldn't open %s\n", GLX_LIB);
#endif
abort();
}

@ -55,10 +55,16 @@ endif
# Maintain compatibility with autotools; see: https://github.com/anholt/libepoxy/issues/108
darwin_versions = [1, '1.0']
epoxy_deps = [ dl_dep, ]
epoxy_deps = [ dl_dep, egl_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',

Loading…
Cancel
Save