X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2Fmeson.build;h=bceed2f5fc7e05ccd98c257c55733b42e3098f39;hb=04e8eaf4e82270d4eea578cd6d43eb1deea05a4d;hp=cdb388e98372feadfe620ab9eea0ead867a13e79;hpb=d2e9ba278259469038c0945f341b8bacafe9e2ac;p=mesa.git diff --git a/src/glx/meson.build b/src/glx/meson.build index cdb388e9837..bceed2f5fc7 100644 --- a/src/glx/meson.build +++ b/src/glx/meson.build @@ -1,4 +1,4 @@ -# Copyright © 2017 Intel Corporation +# Copyright © 2017-2019 Intel Corporation # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -18,13 +18,24 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -subdir('windows') +inc_glx = include_directories('.') + +subdir('apple') +if with_dri_platform == 'windows' + subdir('windows') +endif files_libglx = files( 'clientattrib.c', 'clientinfo.c', 'compsize.c', 'create_context.c', + 'dri_common.c', + 'dri_common.h', + 'dri_common_query_renderer.c', + 'dri_common_interop.c', + 'drisw_glx.c', + 'drisw_priv.h', 'eval.c', 'glxclient.h', 'glxcmds.c', @@ -59,26 +70,15 @@ files_libglx = files( 'single2.c', 'singlepix.c', 'vertarr.c', + 'xfont.c', ) extra_libs_libglx = [] extra_deps_libgl = [] extra_ld_args_libgl = [] -if with_dri - files_libglx += files( - 'dri_common.c', - 'dri_common.h', - 'dri_common_query_renderer.c', - 'dri_common_interop.c', - 'xfont.c', - 'drisw_glx.c', - 'drisw_priv.h', - ) -endif - # dri2 -if with_dri and with_dri_platform == 'drm' and dep_libdrm.found() +if with_dri_platform == 'drm' and dep_libdrm.found() files_libglx += files( 'dri2.c', 'dri2_glx.c', @@ -98,6 +98,7 @@ endif if with_dri_platform == 'apple' files_libglx += files('applegl_glx.c') + extra_libs_libglx += libappleglx elif with_dri_platform == 'windows' files_libglx += files('driwindows_glx.c') extra_libs_libglx += [ @@ -111,7 +112,6 @@ elif with_dri_platform == 'windows' extra_ld_args_libgl = '-Wl,--disable-stdcall-fixup' endif -dri_driver_dir = join_paths(get_option('prefix'), dri_drivers_path) if not with_glvnd gl_lib_name = 'GL' gl_lib_version = '1.2.0' @@ -128,57 +128,43 @@ else endif gl_lib_cargs = [ - '-D_REENTRANT', '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_driver_dir), + '-D_REENTRANT', ] -if dep_xxf86vm != [] and dep_xxf86vm.found() - gl_lib_cargs += '-DHAVE_XF86VIDMODE' -endif - libglx = static_library( 'glx', [files_libglx, glx_generated], - include_directories : [ - inc_common, inc_glapi, inc_loader, - include_directories('../../include/GL/internal'), - ], + include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glapi, inc_loader], c_args : [ - c_vis_args, gl_lib_cargs, + gl_lib_cargs, '-DGL_LIB_NAME="lib@0@.so.@1@"'.format(gl_lib_name, gl_lib_version.split('.')[0]), ], - 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, + gnu_symbol_visibility : 'hidden', + link_with : [ + libloader, libloader_dri3_helper, + extra_libs_libglx, + ], + dependencies : [ + idep_mesautil, idep_xmlconfig, + dep_libdrm, dep_dri2proto, dep_glproto, dep_x11, dep_glvnd, + ], ) -# workaround for bug #2180 -dummy_c = custom_target( - 'dummy_c', - output : 'dummy.c', - command : [prog_touch, '@OUTPUT@'], +libgl = shared_library( + gl_lib_name, + [], + link_with : [libglapi_static, libglapi], + link_whole : libglx, + 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_glx, dep_xcb, + dep_x11_xcb, dep_xcb_dri2, dep_xext, dep_xfixes, dep_xdamage, dep_xxf86vm, + extra_deps_libgl, + ], + version : gl_lib_version, + install : true, ) -if with_glx == 'dri' - libgl = shared_library( - gl_lib_name, - dummy_c, # workaround for bug #2180 - include_directories : [ - inc_common, inc_glapi, inc_loader, - include_directories('../../include/GL/internal'), - ], - link_with : [libglapi_static, libglapi], - link_whole : libglx, - 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_glx, dep_xcb, - dep_x11_xcb, dep_xcb_dri2, dep_xext, dep_xfixes, dep_xdamage, - extra_deps_libgl, - ], - version : gl_lib_version, - install : true, - ) -endif - if with_tests subdir('tests') endif