loader: Parameterize locations of drivers/layers
authorLenny Komow <lenny@lunarg.com>
Mon, 7 Nov 2016 18:40:00 +0000 (11:40 -0700)
committerLenny Komow <lenny@lunarg.com>
Tue, 8 Nov 2016 16:07:28 +0000 (09:07 -0700)
Change-Id: I79c16e01f336b3cf90ec7e6e66901ad363502e7b

loader/CMakeLists.txt
loader/vk_loader_platform.h

index 81aef4c..f448e9f 100644 (file)
@@ -38,6 +38,7 @@ set (OPT_LOADER_SRCS
 )
 
 set (LOADER_SRCS ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS})
+add_definitions(-DAPI_NAME="${API_NAME}")
 
 if (WIN32)
     # Use static MSVCRT libraries
index d13b645..0ffc923 100644 (file)
@@ -239,11 +239,10 @@ using namespace std;
 #define PATH_SEPERATOR ';'
 #define DIRECTORY_SYMBOL '\\'
 #define DEFAULT_VK_REGISTRY_HIVE HKEY_LOCAL_MACHINE
-#define DEFAULT_VK_DRIVERS_INFO "SOFTWARE\\Khronos\\Vulkan\\Drivers"
-// TODO: Are these the correct paths
+#define DEFAULT_VK_DRIVERS_INFO "SOFTWARE\\Khronos\\" API_NAME "\\Drivers"
 #define DEFAULT_VK_DRIVERS_PATH ""
-#define DEFAULT_VK_ELAYERS_INFO "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers"
-#define DEFAULT_VK_ILAYERS_INFO "SOFTWARE\\Khronos\\Vulkan\\ImplicitLayers"
+#define DEFAULT_VK_ELAYERS_INFO "SOFTWARE\\Khronos\\" API_NAME "\\ExplicitLayers"
+#define DEFAULT_VK_ILAYERS_INFO "SOFTWARE\\Khronos\\" API_NAME "\\ImplicitLayers"
 #if !defined(DEFAULT_VK_LAYERS_PATH)
 #define DEFAULT_VK_LAYERS_PATH ""
 #endif