From 23ed27a79b3c9afa3dcb2138abf89f466a308702 Mon Sep 17 00:00:00 2001
From: Neena Busireddy <neenareddy.busireddy@nxp.com>
Date: Wed, 5 Dec 2018 13:33:10 -0600
Subject: [PATCH] CMakeLists.txt: Change the installation path of JSON files

Also modify the library path in JSON files to /usr/lib/libVK*.so

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com>
---
 layers/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
index 5fd5b44..c4a7810 100644
--- a/layers/CMakeLists.txt
+++ b/layers/CMakeLists.txt
@@ -105,7 +105,7 @@ if(WIN32)
 elseif(UNIX) # UNIX includes APPLE
     foreach(TARGET_NAME ${TARGET_NAMES})
         install(FILES ${CMAKE_CURRENT_BINARY_DIR}/staging-json/${TARGET_NAME}.json
-                DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/vulkan/explicit_layer.d)
+                DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/vulkan/explicit_layer.d)
     endforeach()
 endif()
 
@@ -236,7 +236,7 @@ if(UNIX)
             -DVK_VERSION=1.1.${vk_header_version})
         # If this json file is not a metalayer, get the needed properties from that target
         if(TARGET ${TARGET_NAME})
-            set(INSTALL_DEFINES ${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY="$<TARGET_FILE_NAME:${TARGET_NAME}>")
+            set(INSTALL_DEFINES ${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/$<TARGET_FILE_NAME:${TARGET_NAME}>")
         endif()
         add_custom_target(${TARGET_NAME}-staging-json ALL
                           COMMAND ${CMAKE_COMMAND} ${INSTALL_DEFINES} -P "${CMAKE_CURRENT_BINARY_DIR}/generator.cmake")
-- 
2.7.4

