From b40895b65093b4c41743e4f58e88552d1047f331 Mon Sep 17 00:00:00 2001 From: Andreas Wendleder Date: Sat, 25 Apr 2026 11:37:36 +0200 Subject: [PATCH] Support monolithic USD builds via interface polyfills --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f61a2a..156beb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,16 @@ if(NOT pxr_FOUND) find_package(pxr REQUIRED) endif() +if(TARGET usd_ms) + foreach(pxr_lib gf tf trace vt work cameraUtil hd hdx hf sdf usd usdGeom usdImaging usdSkel usdShade usdLux usdVol ndr sdr ar) + if(NOT TARGET ${pxr_lib}) + add_library(${pxr_lib} INTERFACE IMPORTED) + set_target_properties(${pxr_lib} PROPERTIES INTERFACE_LINK_LIBRARIES "usd_ms;OpenGL::GL") + endif() + endforeach() +endif() + + # This is needed for linking against the USD 0.25.5 libraries # as they depend on OpenGL but don't specify it in # their cmake config.