demos: Enable building combinations of xcb and xlib
Change-Id: I055c12e8c93d05db747239df46611386eb8b8278
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 17d0631..b1b83a5 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -84,7 +84,7 @@
PROPERTIES
COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
if(NOT WIN32)
- if (BUILD_WSI_XCB_SUPPORT AND BUILD_WSI_XLIB_SUPPORT)
+ if (BUILD_WSI_XCB_SUPPORT OR BUILD_WSI_XLIB_SUPPORT)
target_link_libraries(vk_layer_validation_tests ${LIBVK} ${XCB_LIBRARIES} ${X11_LIBRARIES} gtest gtest_main VkLayer_utils ${GLSLANG_LIBRARIES})
else()
target_link_libraries(vk_layer_validation_tests ${LIBVK} gtest gtest_main VkLayer_utils ${GLSLANG_LIBRARIES})
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 4af4517..3a3f8c3 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -1575,11 +1575,12 @@
// Set this (for now, until all platforms are supported and tested):
#define NEED_TO_TEST_THIS_ON_PLATFORM
#endif // VK_USE_PLATFORM_WIN32_KHR
-
-#if defined(VK_USE_PLATFORM_XCB_KHR)
+#if defined(VK_USE_PLATFORM_XCB_KHR) || defined (VK_USE_PLATFORM_XLIB_KHR)
// FIXME: REMOVE THIS HERE, AND UNCOMMENT ABOVE, WHEN THIS TEST HAS BEEN PORTED
// TO NON-LINUX PLATFORMS:
VkSurfaceKHR surface = VK_NULL_HANDLE;
+#endif
+#if defined(VK_USE_PLATFORM_XCB_KHR)
// Use the functions from the VK_KHR_xcb_surface extension without enabling
// that extension: