From 5ddf5e9f399ba1bb8e3fcac1fc3adce63d89102d Mon Sep 17 00:00:00 2001
From: Florian Franzmann <bwlf@bandrate.org>
Date: Fri, 9 Jun 2023 09:54:37 +0200
Subject: [PATCH] Install to the right paths

---
 include/meson.build | 8 ++++----
 src/egl/meson.build | 1 +
 src/glx/meson.build | 1 +
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/meson.build b/include/meson.build
index c55325d..44a0118 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -65,7 +65,7 @@ if not with_glvnd
       'GL/gl.h',
       'GL/glcorearb.h',
       'GL/glext.h',
-      subdir : 'GL',
+      subdir : 'GL/.mesa',
     )
   endif
 
@@ -73,7 +73,7 @@ if not with_glvnd
     install_headers(
       'GL/glx.h',
       'GL/glxext.h',
-      subdir : 'GL')
+      subdir : 'GL/.mesa')
   endif
 
   if with_egl
@@ -96,11 +96,11 @@ if with_egl
 endif
 
 if with_osmesa
-  install_headers('GL/osmesa.h', subdir : 'GL')
+  install_headers('GL/osmesa.h', subdir : 'GL/.mesa')
 endif
 
 if with_dri
-  install_headers('GL/internal/dri_interface.h', subdir : 'GL/internal')
+  install_headers('GL/internal/dri_interface.h', subdir : 'GL/.mesa/internal')
 endif
 
 if with_gallium_st_nine
diff --git a/src/egl/meson.build b/src/egl/meson.build
index ac9a48e..92e83de 100644
--- a/src/egl/meson.build
+++ b/src/egl/meson.build
@@ -211,6 +211,7 @@ libegl = shared_library(
   link_args : [ld_args_bsymbolic, ld_args_gc_sections],
   dependencies : [deps_for_egl, dep_dl, dep_libdrm, dep_clock, dep_thread, idep_mesautil],
   install : true,
+  install_dir : 'lib/.mesa',
   version : egl_lib_version,
   soversion : egl_lib_soversion,
   name_prefix : host_machine.system() == 'windows' ? 'lib' : [],  # always use lib, but avoid warnings on !windows
diff --git a/src/glx/meson.build b/src/glx/meson.build
index 20f0474..b8143c2 100644
--- a/src/glx/meson.build
+++ b/src/glx/meson.build
@@ -154,6 +154,7 @@ libgl = shared_library(
   version : gl_lib_version,
   darwin_versions : '4.0.0',
   install : true,
+  install_dir : 'lib/.mesa',
 )
 
 if with_tests
-- 
2.40.1

