build: Look for WIL (Windows Implementation Library)

Also define XRT_HAVE_WIL if we have it.
This commit is contained in:
Ryan Pavlik 2021-10-19 16:03:29 -05:00
parent 38c6076713
commit 46a3c7b039
2 changed files with 6 additions and 0 deletions

View file

@ -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")

View file

@ -33,3 +33,4 @@
#cmakedefine XRT_HAVE_VULKAN
#cmakedefine XRT_HAVE_WAYLAND
#cmakedefine XRT_HAVE_WAYLAND_DIRECT
#cmakedefine XRT_HAVE_WIL