Skip to content

Commit

Permalink
Merge pull request #29 from kounoike/fix-add-onnxruntime-dll
Browse files Browse the repository at this point in the history
add onnxruntime to zip
  • Loading branch information
kounoike authored Oct 3, 2021
2 parents 50b7e44 + 910204a commit 32ca28c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ if(WIN32)
# --- Release package helper ---
# The "release" folder has a structure similar OBS' one on Windows
set(RELEASE_DIR "${PROJECT_SOURCE_DIR}/release")
MESSAGE("*******************ONNXRUNTIME: ${OnnxRuntimePath}/runtimes/win-x64/native/onnxruntime.dll **********")


add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD
# If config is Release or RelWithDebInfo, package release files
Expand All @@ -88,6 +90,13 @@ if(WIN32)
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}"
)

# package the onnxruntime DLL with the plugin DLL
COMMAND if $<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>==1 (
"${CMAKE_COMMAND}" -E copy
"${OnnxRuntimePath}/runtimes/win-x64/native/onnxruntime.dll"
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}"
)

# If config is RelWithDebInfo, copy the pdb file
COMMAND if $<CONFIG:RelWithDebInfo>==1 (
"${CMAKE_COMMAND}" -E copy
Expand Down

0 comments on commit 32ca28c

Please sign in to comment.