vulkan/overlay: install layer binary in libdir
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 26 Feb 2019 23:23:03 +0000 (23:23 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 27 Feb 2019 11:45:42 +0000 (11:45 +0000)
This will allow multilib.

v2: Drop path from json file, dlopen should be able to locate the lib in libdir

v3: Switch from configure_file to install_data (Dylan)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109788
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/vulkan/overlay-layer/VkLayer_MESA_overlay.json [new file with mode: 0644]
src/vulkan/overlay-layer/VkLayer_MESA_overlay.json.in [deleted file]
src/vulkan/overlay-layer/meson.build

diff --git a/src/vulkan/overlay-layer/VkLayer_MESA_overlay.json b/src/vulkan/overlay-layer/VkLayer_MESA_overlay.json
new file mode 100644 (file)
index 0000000..6877c3a
--- /dev/null
@@ -0,0 +1,11 @@
+{
+    "file_format_version" : "1.0.0",
+    "layer" : {
+        "name": "VK_LAYER_MESA_overlay",
+        "type": "GLOBAL",
+        "library_path": "libVkLayer_MESA_overlay.so",
+        "api_version": "1.1.73",
+        "implementation_version": "1",
+        "description": "Mesa Overlay layer"
+    }
+}
diff --git a/src/vulkan/overlay-layer/VkLayer_MESA_overlay.json.in b/src/vulkan/overlay-layer/VkLayer_MESA_overlay.json.in
deleted file mode 100644 (file)
index 5a9a88a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-    "file_format_version" : "1.0.0",
-    "layer" : {
-        "name": "VK_LAYER_MESA_overlay",
-        "type": "GLOBAL",
-        "library_path": "@install_dir@/libVkLayer_MESA_overlay.so",
-        "api_version": "1.1.73",
-        "implementation_version": "1",
-        "description": "Mesa Overlay layer"
-    }
-}
index 9d1bc97c13153de54d075b8af33f981e2b9815a3..d2cdee2d6bb3f631445364d1caf4d6e16dd7f803 100644 (file)
@@ -18,8 +18,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-vklayer_install_dir = join_paths(get_option('prefix'), 'share', 'vulkan', 'explicit_layer.d')
-
 glslang = find_program('glslangValidator')
 
 overlay_shaders = [
@@ -47,17 +45,10 @@ vklayer_mesa_overlay = shared_library(
   include_directories : [inc_common, inc_vulkan_util],
   link_args : cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro']),
   link_with : [libmesa_util, libvulkan_util],
-  install_dir : vklayer_install_dir,
   install : true
 )
 
-sdata = configuration_data()
-sdata.set('install_dir', vklayer_install_dir)
-
-configure_file(
-  input : 'VkLayer_MESA_overlay.json.in',
-  output : '@BASENAME@',
-  configuration : sdata,
-  install_dir : vklayer_install_dir,
-  install : true
+install_data(
+  files('VkLayer_MESA_overlay.json'),
+  install_dir : join_paths(get_option('datadir'), 'vulkan', 'explicit_layer.d'),
 )