meson: generate builddir/src/amd/vulkan/dev_icd.json
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 5 Oct 2017 19:31:29 +0000 (21:31 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 5 Oct 2017 21:46:21 +0000 (23:46 +0200)
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
src/amd/vulkan/Makefile.am
src/amd/vulkan/dev_icd.json.in
src/amd/vulkan/meson.build

index 438872bbb48c8fa8a59a84b62f35880ebf10be77..19ec3f47f745d4d13aa88c7942f692cf3ee1fa3d 100644 (file)
@@ -149,7 +149,7 @@ noinst_DATA = dev_icd.json
 
 dev_icd.json : dev_icd.json.in
        $(AM_V_GEN) $(SED) \
-               -e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
+               -e "s#@libvulkan_radeon_path@#${abs_top_builddir}/${LIB_DIR}/libvulkan_radeon.so#" \
                < $(srcdir)/dev_icd.json.in > $@
 
 radeon_icd.@host_cpu@.json : radeon_icd.json.in
index f726df02ad1360f1dab4eedbc3cc33d098af2861..cc80641f5849490fd586b86031414e08e5a4db7d 100644 (file)
@@ -1,7 +1,7 @@
 {
     "file_format_version": "1.0.0",
     "ICD": {
-        "library_path": "@build_libdir@/libvulkan_radeon.so",
+        "library_path": "@libvulkan_radeon_path@",
         "api_version": "1.0.3"
     }
 }
index 02a2703a5c1474563c0874b855c3b600186c80b8..a5a4f81352807beac92d91d8e92572fc62e5ecc5 100644 (file)
@@ -116,9 +116,16 @@ libvulkan_radeon = shared_library(
 
 radv_data = configuration_data()
 radv_data.set('install_libdir', join_paths(get_option('prefix'), get_option('libdir')))
+radv_data.set('libvulkan_radeon_path', libvulkan_radeon.full_path())
+
 configure_file(
   configuration : radv_data,
   input : 'radeon_icd.json.in',
   output : 'radeon_icd.@0@.json'.format(target_machine.cpu()),
   install_dir : with_vulkan_icd_dir,
 )
+configure_file(
+  configuration : radv_data,
+  input : 'dev_icd.json.in',
+  output : 'dev_icd.json'
+)