[Mesa-dev] [PATCH 5/7] meson: build src/glx/windows
Jon Turney
jon.turney at dronecode.org.uk
Mon Nov 27 13:58:32 UTC 2017
---
src/glx/meson.build | 25 +++++++++++++----------
src/glx/windows/meson.build | 48 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 10 deletions(-)
create mode 100644 src/glx/windows/meson.build
diff --git a/src/glx/meson.build b/src/glx/meson.build
index deef3ed2235..a7eb48a0069 100644
--- a/src/glx/meson.build
+++ b/src/glx/meson.build
@@ -18,8 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-# TODO:
-#subdir('windows')
+subdir('windows')
files_libglx = files(
'clientattrib.c',
@@ -63,6 +62,8 @@ files_libglx = files(
)
extra_libs_libglx = []
+extra_deps_libgl = []
+extra_ld_args_libgl = []
if with_dri
files_libglx += files(
@@ -99,11 +100,15 @@ if with_dri_platform == 'apple'
files_libglx += files('applegl_glx.c')
elif with_dri_platform == 'windows'
files_libglx += files('driwindows_glx.c')
- # TODO
- #extra_libs_libglx += [
- #libwindowsdri,
- #libwindowsglx,
- #]
+ extra_libs_libglx += [
+ libwindowsdri,
+ libwindowsglx,
+ ]
+ extra_deps_libgl = [
+ meson.get_compiler('c').find_library('gdi32'),
+ meson.get_compiler('c').find_library('opengl32')
+ ]
+ extra_ld_args_libgl = '-Wl,--disable-stdcall-fixup'
endif
dri_driver_dir = join_paths(get_option('prefix'), dri_drivers_path)
@@ -139,7 +144,7 @@ libglx = static_library(
],
c_args : [c_vis_args, gl_lib_cargs,
'-DGL_LIB_NAME="lib at 0@.so. at 1@"'.format(gl_lib_name, gl_lib_version.split('.')[0])],
- link_with : [libloader, libloader_dri3_helper, libmesa_util, libxmlconfig],
+ link_with : [libloader, libloader_dri3_helper, libmesa_util, libxmlconfig, extra_libs_libglx],
dependencies : [dep_libdrm, dep_dri2proto, dep_glproto, dep_x11, dep_glvnd],
build_by_default : false,
)
@@ -161,9 +166,9 @@ if with_glx == 'dri'
],
link_with : [libglapi_static, libglapi],
link_whole : libglx,
- link_args : [ld_args_bsymbolic, ld_args_gc_sections],
+ link_args : [ld_args_bsymbolic, ld_args_gc_sections, extra_ld_args_libgl],
dependencies : [dep_libdrm, dep_dl, dep_m, dep_thread, dep_x11,
- dep_xcb_dri2, dep_xcb_dri3],
+ dep_xcb_dri2, dep_xcb_dri3, extra_deps_libgl],
version : gl_lib_version,
install : true,
)
diff --git a/src/glx/windows/meson.build b/src/glx/windows/meson.build
new file mode 100644
index 00000000000..1e66094b4ba
--- /dev/null
+++ b/src/glx/windows/meson.build
@@ -0,0 +1,48 @@
+# protocol defines for the Windows-DRI server extension
+
+files_windowsdriproto = files(
+ 'windowsdriconst.h',
+ 'windowsdristr.h',
+ )
+
+install_headers(
+ files_windowsdriproto,
+ subdir: 'X11/extensions',
+)
+
+pkg.generate(
+ name : 'windowsdriproto',
+ description : 'Windows-DRI extension headers',
+ version : '1.0.0',
+)
+
+# library for using the Windows-DRI server extension
+files_libwindowsdri = files(
+ 'xwindowsdri.c',
+ 'xwindowsdri.h',
+)
+
+libwindowsdri = static_library(
+ 'driwindows',
+ [ files_libwindowsdri, files_windowsdriproto],
+ dependencies: dep_xext,
+ build_by_default: false,
+)
+
+# library for native GL on windows
+files_libwindowsglx = files(
+ 'windowsgl.c',
+ 'windowsgl.h',
+ 'windowsgl_internal.h',
+ 'windows_drawable.c',
+ 'wgl.c',
+ 'wgl.h',
+)
+
+libwindowsglx = static_library(
+ 'glxwindows',
+ [ files_libwindowsglx, files_windowsdriproto],
+ include_directories: [inc_include, inc_src, inc_glapi],
+ c_args : [c_vis_args],
+ build_by_default: false,
+)
--
2.15.0
More information about the mesa-dev
mailing list