aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--third_party/CMakeLists.txt10
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()