linux: Use standard GNU install paths

These should get inherited from the build environment, which should
handle the variation between /usr/lib/$triple on debian vs /usr/lib{,64}
on redhat.

Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2015-07-23 16:29:26 -04:00 committed by Jon Ashburn
parent ddd42f5f5d
commit 9d04621ce2
2 changed files with 17 additions and 5 deletions

View File

@ -36,6 +36,11 @@ if(NOT EXISTS ${GLSLANG_PREFIX})
endif()
if(NOT WIN32)
include(GNUInstallDirs)
add_definitions(-DLIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}")
add_definitions(-DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
if(NOT EXISTS ${LUNARGLASS_PREFIX})
message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${LUNARGLASS_PREFIX})
endif()

View File

@ -51,11 +51,18 @@
#define PATH_SEPERATOR ':'
#define DIRECTORY_SYMBOL '/'
// TODO: Need to handle different Linux distros
#define DEFAULT_VK_DRIVERS_INFO "/etc/vulkan/icd.d:/usr/share/vulkan/icd.d"
#define DEFAULT_VK_DRIVERS_PATH "/usr/lib/i386-linux-gnu/vulkan/icd:/usr/lib/x86_64-linux-gnu/vulkan/icd"
#define DEFAULT_VK_LAYERS_INFO "/etc/vulkan/explicit_layer.d:/etc/vulkan/implicit_layer.d:/usr/share/vulkan/explicit_layer.d:/usr/share/vulkan/implicit_layer.d"
#define DEFAULT_VK_LAYERS_PATH "/usr/lib/i386-linux-gnu/vulkan/layer:/usr/lib/x86_64-linux-gnu/vulkan/layer"
#define DEFAULT_VK_DRIVERS_INFO \
SYSCONFDIR "/vulkan/icd.d:" \
DATADIR "/vulkan/icd.d"
#define DEFAULT_VK_DRIVERS_PATH \
LIBDIR "/vulkan/icd"
#define DEFAULT_VK_LAYERS_INFO \
SYSCONFDIR "/vulkan/explicit_layer.d:" \
SYSCONFDIR "/vulkan/implicit_layer.d:" \
DATADIR "/vulkan/explicit_layer.d:" \
DATADIR "/vulkan/implicit_layer.d"
#define DEFAULT_VK_LAYERS_PATH \
LIBDIR "/vulkan/layer"
#define LAYERS_PATH_ENV "VK_LAYER_DIRS"
// C99: