diff --git a/CMakeLists.txt b/CMakeLists.txt index 2db8ffdb0..50a1b809d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,9 @@ endif() if(NOT ANDROID) find_package(PkgConfig MODULE) endif() +if(WIN32) + find_package(wil CONFIG) +endif() #https://github.com/arsenm/sanitizers-cmake find_package(Sanitizers MODULE) @@ -202,6 +205,8 @@ option_with_deps(XRT_HAVE_OPENGLES "Enable OpenGL-ES Graphics API support" DEPEN option_with_deps(XRT_HAVE_EGL "Enable OpenGL(-ES) on EGL Graphics API support" DEPENDS EGL_FOUND "XRT_HAVE_OPENGL OR XRT_HAVE_OPENGLES") option_with_deps(XRT_HAVE_SDL2 "Enable use of SDL2" DEPENDS SDL2_FOUND XRT_HAVE_OPENGL) +option_with_deps(XRT_HAVE_WIL "Use WIL for Windows-specific functionality" DEPENDS wil_FOUND) + option_with_deps(XRT_HAVE_VULKAN "Enable Vulkan Graphics API support (also needed for compositor)" DEPENDS VULKAN_FOUND) 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") 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 7d945b34a..6407b3760 100644 --- a/src/xrt/include/xrt/xrt_config_have.h.cmake_in +++ b/src/xrt/include/xrt/xrt_config_have.h.cmake_in @@ -33,3 +33,4 @@ #cmakedefine XRT_HAVE_VULKAN #cmakedefine XRT_HAVE_WAYLAND #cmakedefine XRT_HAVE_WAYLAND_DIRECT +#cmakedefine XRT_HAVE_WIL