From 9cb68e2eb1a9f56e60edeb84d2f73024618218d1 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sat, 22 Oct 2016 20:42:44 +0300 Subject: loader: use CMAKE_INSTALL_FULL_ to improve Linux filesystem compatibility In order to improve the loader's compatibility with different filesystem hierarchies under Linux, use CMake's CMAKE_INSTALL_FULL_ instead of CMAKE_INSTALL_ to correctly resolve the absolute paths of SYSCONFDIR and DATADIR in compliance with the GNU Coding Standard [1] and Linux Foundation's Filesystem Hierarchy Standard [2], as explained in CMake's documentation [3]. Note to packagers: When using CMAKE_INSTALL_PREFIX, this commit obviates the definition of other CMAKE_INSTALL_ defines to properly detect ICD and layer manifests in GNU/Linux-compliant filesystems. This commit fixes GH-1083. (see the issue for more details) [1] https://www.gnu.org/prep/standards/html_node/Directory-Variables.html [2] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html [3] https://cmake.org/cmake/help/v3.4/module/GNUInstallDirs.html Change-Id: If743a3c8f5f7381e00c0d23b95b9e13c0dead144 Signed-off-by: Dor Askayo --- loader/vk_loader_platform.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'loader') diff --git a/loader/vk_loader_platform.h b/loader/vk_loader_platform.h index 3a026404..264a6a82 100644 --- a/loader/vk_loader_platform.h +++ b/loader/vk_loader_platform.h @@ -59,14 +59,14 @@ #if defined(LOCALPREFIX) #define LOCAL_DRIVERS_INFO \ - LOCALPREFIX "/" SYSCONFDIR VULKAN_DIR VULKAN_ICDCONF_DIR ":" \ - LOCALPREFIX "/" DATADIR VULKAN_DIR VULKAN_ICDCONF_DIR ":" + SYSCONFDIR VULKAN_DIR VULKAN_ICDCONF_DIR ":" \ + DATADIR VULKAN_DIR VULKAN_ICDCONF_DIR ":" #define LOCAL_ELAYERS_INFO \ - LOCALPREFIX "/" SYSCONFDIR VULKAN_DIR VULKAN_ELAYERCONF_DIR ":" \ - LOCALPREFIX "/" DATADIR VULKAN_DIR VULKAN_ELAYERCONF_DIR ":" + SYSCONFDIR VULKAN_DIR VULKAN_ELAYERCONF_DIR ":" \ + DATADIR VULKAN_DIR VULKAN_ELAYERCONF_DIR ":" #define LOCAL_ILAYERS_INFO \ - LOCALPREFIX "/" SYSCONFDIR VULKAN_DIR VULKAN_ILAYERCONF_DIR ":" \ - LOCALPREFIX "/" DATADIR VULKAN_DIR VULKAN_ILAYERCONF_DIR ":" + SYSCONFDIR VULKAN_DIR VULKAN_ILAYERCONF_DIR ":" \ + DATADIR VULKAN_DIR VULKAN_ILAYERCONF_DIR ":" #else #define LOCAL_DRIVERS_INFO #define LOCAL_ELAYERS_INFO @@ -75,17 +75,17 @@ #define DEFAULT_VK_DRIVERS_INFO \ LOCAL_DRIVERS_INFO \ - "/" SYSCONFDIR VULKAN_DIR VULKAN_ICDCONF_DIR ":" \ - "/usr/" DATADIR VULKAN_DIR VULKAN_ICDCONF_DIR + SYSCONFDIR VULKAN_DIR VULKAN_ICDCONF_DIR ":" \ + DATADIR VULKAN_DIR VULKAN_ICDCONF_DIR #define DEFAULT_VK_DRIVERS_PATH "" #define DEFAULT_VK_ELAYERS_INFO \ LOCAL_ELAYERS_INFO \ - "/" SYSCONFDIR VULKAN_DIR VULKAN_ELAYERCONF_DIR ":" \ - "/usr/" DATADIR VULKAN_DIR VULKAN_ELAYERCONF_DIR + SYSCONFDIR VULKAN_DIR VULKAN_ELAYERCONF_DIR ":" \ + DATADIR VULKAN_DIR VULKAN_ELAYERCONF_DIR #define DEFAULT_VK_ILAYERS_INFO \ LOCAL_ILAYERS_INFO \ - "/" SYSCONFDIR VULKAN_DIR VULKAN_ILAYERCONF_DIR ":" \ - "/usr/" DATADIR VULKAN_DIR VULKAN_ILAYERCONF_DIR + SYSCONFDIR VULKAN_DIR VULKAN_ILAYERCONF_DIR ":" \ + DATADIR VULKAN_DIR VULKAN_ILAYERCONF_DIR #define DEFAULT_VK_LAYERS_PATH "" #if !defined(LAYERS_SOURCE_PATH) #define LAYERS_SOURCE_PATH NULL -- cgit v1.2.3