diff options
author | David Neto <dneto@google.com> | 2019-05-29 08:43:32 -0400 |
---|---|---|
committer | dan sinclair <dsinclair@google.com> | 2019-05-29 08:43:32 -0400 |
commit | 25852407411ad592a32f5732f68dbb70134277f4 (patch) | |
tree | 724ca492f3b8d70ed832771f5650c8dd15e08d9e | |
parent | 8f70a62c44197bf827c908229ddb184f8c356e26 (diff) | |
download | amber-25852407411ad592a32f5732f68dbb70134277f4.tar.gz |
Avoid Vulkan-loader errors for Wayland, Xlib (#529)
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | third_party/CMakeLists.txt | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 10864c1..3e9cb82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,10 +41,10 @@ option(AMBER_SKIP_SHADERC "Skip building Shaderc into the library" ${AMBER_SKIP_SHADERC}) option(AMBER_SKIP_SAMPLES "Skip building sample application" ${AMBER_SKIP_SAMPLES}) +option(AMBER_USE_DXC "Enable DXC integration" ${AMBER_USE_DXC}) option(AMBER_USE_LOCAL_VULKAN "Build with vulkan in third_party" OFF) option(AMBER_ENABLE_SWIFTSHADER "Build using SwiftShader" ${AMBER_ENABLE_SWIFTSHADER}) -option(AMBER_USE_DXC "Enable DXC integration" ${AMBER_USE_DXC}) if(WIN32) # On Windows, CMake by default compiles with the shared CRT. diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 8b7364a..6d8d21b 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -51,6 +51,16 @@ if (${AMBER_USE_LOCAL_VULKAN}) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/vulkan-headers) set(BUILD_TESTS FALSE) + + # The vulkan-loader CMake file assumes that directory exists if + # Wayland support is to be built. + if(NOT EXISTS ${WAYLAND_CLIENT_INCLUDE_DIR}) + message(STATUS "Amber: Disabling Wayland support in Vulkan-Loader") + set(BUILD_WSI_WAYLAND_SUPPORT OFF CACHE BOOL "" FORCE) + endif() + message(STATUS "Amber: Disabling X11 support in Vulkan-Loader") + set(BUILD_WSI_XLIB_SUPPORT OFF CACHE BOOL "" FORCE) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/vulkan-loader) endif() |