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 <noreply@anthropic.com>
This commit is contained in:
+5
-2
@@ -112,9 +112,11 @@ if(WIN32)
|
|||||||
|
|
||||||
if(OPENUSD_HAS_EMBREE)
|
if(OPENUSD_HAS_EMBREE)
|
||||||
add_custom_command(TARGET UsdLayerManager POST_BUILD
|
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
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
"${HDEMBREE_DLL}"
|
"${HDEMBREE_DLL}"
|
||||||
"$<TARGET_FILE_DIR:UsdLayerManager>"
|
"$<TARGET_FILE_DIR:UsdLayerManager>/usd/hdEmbree.dll"
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||||
"${HDEMBREE_PLUGIN_DIR}"
|
"${HDEMBREE_PLUGIN_DIR}"
|
||||||
"$<TARGET_FILE_DIR:UsdLayerManager>/usd/hdEmbree"
|
"$<TARGET_FILE_DIR:UsdLayerManager>/usd/hdEmbree"
|
||||||
@@ -170,8 +172,9 @@ install(FILES ${OpenUSD_ROOT_DIR}/plugin/usd/hdStorm.dll
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(OPENUSD_HAS_EMBREE)
|
if(OPENUSD_HAS_EMBREE)
|
||||||
|
# Install to bin/usd/ so plugInfo.json's LibraryPath "../hdEmbree.dll" resolves correctly.
|
||||||
install(FILES "${HDEMBREE_DLL}"
|
install(FILES "${HDEMBREE_DLL}"
|
||||||
DESTINATION bin
|
DESTINATION bin/usd
|
||||||
OPTIONAL
|
OPTIONAL
|
||||||
)
|
)
|
||||||
install(DIRECTORY "${HDEMBREE_PLUGIN_DIR}"
|
install(DIRECTORY "${HDEMBREE_PLUGIN_DIR}"
|
||||||
|
|||||||
Reference in New Issue
Block a user