Skip to content

Commit

Permalink
onnx: install libs
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Dec 20, 2024
1 parent 12d86ac commit e71fc79
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions cmake/onnxruntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,28 +116,29 @@ target_include_directories(onnxruntime INTERFACE "${onnxruntime_INCLUDE_DIRS}")
add_library(onnxruntime::onnxruntime ALIAS onnxruntime)


if(SCORE_DEPLOYMENT_BUILD)
if(SCORE_DEPLOYMENT_BUILD AND NOT OSSIA_USE_SYSTEM_LIBRARIES)
if(APPLE)
file(GLOB ONNXRUNTIME_FILES "${onnxruntime_SOURCE_DIR}/lib/*.dylib")
elseif(WIN32)
file(GLOB ONNXRUNTIME_FILES "${onnxruntime_SOURCE_DIR}/lib/*.dll")
else()
file(GLOB ONNXRUNTIME_FILES "${onnxruntime_SOURCE_DIR}/lib/*.so*")
endif()
# if(APPLE)
# install(
# FILES ${onnxruntime_SOURCE_DIR}
# DESTINATION "ossia score.app/Contents/MacOS"
# COMPONENT OssiaScore)
# elseif(WIN32)
# install(
# TARGETS ossia-score-vst3puppet
# RUNTIME DESTINATION "${SCORE_BIN_INSTALL_DIR}"
# COMPONENT OssiaScore)
# else()
# install(
# TARGETS ossia-score-vst3puppet
# RUNTIME DESTINATION bin
# COMPONENT OssiaScore)
# endif()

if(APPLE)
install(
FILES ${ONNXRUNTIME_FILES}
DESTINATION "ossia score.app/Frameworks"
COMPONENT OssiaScore)
elseif(WIN32)
install(
FILES ${ONNXRUNTIME_FILES}
DESTINATION "${SCORE_BIN_INSTALL_DIR}"
COMPONENT OssiaScore)
else()
install(
FILES ${ONNXRUNTIME_FILES}
DESTINATION lib
COMPONENT OssiaScore)
endif()
endif()

0 comments on commit e71fc79

Please sign in to comment.