diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ac0a55d2..95b4ae68a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,7 @@ if(NOT ANDROID) endif() if(WIN32) find_package(wil CONFIG) + find_library(D3D11_LIBRARY d3d11) find_library(DXGI_LIBRARY dxgi) find_library(WINDOWSAPP_LIBRARY WindowsApp) endif() @@ -213,6 +214,7 @@ option_with_deps(XRT_HAVE_WIL "Use WIL for Windows-specific functionality" DEPEN option_with_deps(XRT_HAVE_WINRT "Use WinRT APIs for some Windows-specific functionality" DEPENDS WINDOWSAPP_LIBRARY) option_with_deps(XRT_HAVE_VULKAN "Enable Vulkan Graphics API support (also needed for compositor)" DEPENDS VULKAN_FOUND) +option_with_deps(XRT_HAVE_D3D11 "Enable Direct3D 11 Graphics API support" DEPENDS D3D11_LIBRARY XRT_HAVE_VULKAN XRT_HAVE_DXGI XRT_HAVE_WIL XRT_HAVE_WINRT) option_with_deps(XRT_HAVE_WAYLAND "Enable Wayland support" DEPENDS WAYLAND_FOUND WAYLAND_SCANNER_FOUND WAYLAND_PROTOCOLS_FOUND LIBDRM_FOUND) option_with_deps(XRT_HAVE_WAYLAND_DIRECT "Enable Wayland direct support" DEPENDS XRT_HAVE_WAYLAND LIBDRM_FOUND "WAYLAND_PROTOCOLS_VERSION VERSION_GREATER_EQUAL 1.22") option_with_deps(XRT_HAVE_XCB "Enable xcb support" DEPENDS XCB_FOUND) @@ -431,6 +433,7 @@ message(STATUS "#####----- Config -----#####") message(STATUS "# GIT_DESC: ${GIT_DESC}") message(STATUS "#") message(STATUS "# BASALT: ${XRT_HAVE_BASALT_SLAM}") +message(STATUS "# D3D11: ${XRT_HAVE_D3D11}") message(STATUS "# DBUS: ${XRT_HAVE_DBUS}") message(STATUS "# EGL: ${XRT_HAVE_EGL}") message(STATUS "# FFMPEG: ${XRT_HAVE_FFMPEG}") diff --git a/src/xrt/include/xrt/xrt_config_have.h.cmake_in b/src/xrt/include/xrt/xrt_config_have.h.cmake_in index 78e91b9be..17a31a728 100644 --- a/src/xrt/include/xrt/xrt_config_have.h.cmake_in +++ b/src/xrt/include/xrt/xrt_config_have.h.cmake_in @@ -12,6 +12,7 @@ /* keep sorted */ #cmakedefine XRT_HAVE_BASALT_SLAM +#cmakedefine XRT_HAVE_D3D11 #cmakedefine XRT_HAVE_DBUS #cmakedefine XRT_HAVE_DXGI #cmakedefine XRT_HAVE_EGL