From 364973fb65e98b28b4afc64f1d6fb90e1de89d58 Mon Sep 17 00:00:00 2001 From: indigo Date: Thu, 18 Jun 2026 22:45:50 +0800 Subject: [PATCH] CMake: fix hdEmbree.dll deployment path -- copy to usd/ not exe root plugInfo.json declares LibraryPath '../hdEmbree.dll', relative to usd/hdEmbree/, so the DLL must live at usd/hdEmbree.dll. The previous POST_BUILD copied it to the exe root, causing the module-not-found error at load time. Fix: copy hdEmbree.dll into usd/ for POST_BUILD and install(). embree3.dll stays in the exe root where Windows DLL search finds it as a dependency. Co-Authored-By: Claude Sonnet 4.6 --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af9231c..34e67cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,9 +112,11 @@ if(WIN32) if(OPENUSD_HAS_EMBREE) add_custom_command(TARGET UsdLayerManager POST_BUILD + # plugInfo.json has LibraryPath "../hdEmbree.dll" relative to usd/hdEmbree/, + # which resolves to usd/hdEmbree.dll — so the DLL must live in usd/, not exe root. COMMAND ${CMAKE_COMMAND} -E copy_if_different "${HDEMBREE_DLL}" - "$" + "$/usd/hdEmbree.dll" COMMAND ${CMAKE_COMMAND} -E copy_directory "${HDEMBREE_PLUGIN_DIR}" "$/usd/hdEmbree" @@ -170,8 +172,9 @@ install(FILES ${OpenUSD_ROOT_DIR}/plugin/usd/hdStorm.dll ) if(OPENUSD_HAS_EMBREE) + # Install to bin/usd/ so plugInfo.json's LibraryPath "../hdEmbree.dll" resolves correctly. install(FILES "${HDEMBREE_DLL}" - DESTINATION bin + DESTINATION bin/usd OPTIONAL ) install(DIRECTORY "${HDEMBREE_PLUGIN_DIR}"