aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/usd/007-fix_cmake_hgi_interop.patch
blob: 058241d0eadb0c1f8a670ee925f15fd767b0e987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/pxr/imaging/hgiInterop/CMakeLists.txt b/pxr/imaging/hgiInterop/CMakeLists.txt
index 64ebfcb9e..0087d89aa 100644
--- a/pxr/imaging/hgiInterop/CMakeLists.txt
+++ b/pxr/imaging/hgiInterop/CMakeLists.txt
@@ -15,6 +15,7 @@ set(optionalPrivateHeaders "")
 list(APPEND optionalLibraries garch)
 
 if (PXR_ENABLE_GL_SUPPORT)
+    list(APPEND optionalLibraries hgiGL)
     list(APPEND optionalCppFiles opengl.cpp)
     list(APPEND optionalPrivateHeaders opengl.h)
 endif()
@@ -32,6 +33,10 @@ if (PXR_ENABLE_METAL_SUPPORT)
     list(APPEND optionalPrivateHeaders metal.h)
 endif()
 
+if (NOT (PXR_ENABLE_GL_SUPPORT OR PXR_ENABLE_VULKAN_SUPPORT OR PXR_ENABLE_METAL_SUPPORT))
+    message(FATAL_ERROR "No valid GPU backend set for hgiInterop")
+endif()
+
 pxr_library(hgiInterop
     LIBRARIES
         gf