intel/compiler: fix -Wsign-compare warning
[mesa.git] / src / glx / meson.build
index 7757eee352fba6fe171180ab7fae3fba4eabf560..dd8ba60ad80ccf83ed0825895afcfa635ac984c4 100644 (file)
 # 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',
@@ -98,6 +103,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 +117,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,20 +133,18 @@ else
 endif
 
 gl_lib_cargs = [
-  '-D_REENTRANT', '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_driver_dir),
+  '-D_REENTRANT',
+  '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path),
 ]
 
-if dep_xxf86vm != [] and dep_xxf86vm.found()
+if 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_common, inc_glapi, inc_loader, inc_gl_internal],
   c_args : [
     c_vis_args, gl_lib_cargs,
     '-DGL_LIB_NAME="lib@0@.so.@1@"'.format(gl_lib_name, gl_lib_version.split('.')[0]),
@@ -154,21 +157,11 @@ libglx = static_library(
   build_by_default : false,
 )
 
-# workaround for bug #2180
-dummy_c = custom_target(
-  'dummy_c',
-  output : 'dummy.c',
-  command : [prog_touch, '@OUTPUT@'],
-)
-
 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'),
-    ],
+    [],
+    include_directories : [inc_common, inc_glapi, inc_loader, inc_gl_internal],
     link_with : [libglapi_static, libglapi],
     link_whole : libglx,
     link_args : [ld_args_bsymbolic, ld_args_gc_sections, extra_ld_args_libgl],