Skip to content

Commit

Permalink
Remove macOS-specific custom commands and source group settings in Fe…
Browse files Browse the repository at this point in the history
…tchOnnxruntime.cmake
  • Loading branch information
royshil committed Nov 5, 2024
1 parent 46b9e90 commit ad23c6e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmake/FetchOnnxruntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ if(APPLE)
target_link_libraries(Ort INTERFACE "${Onnxruntime_LIB}")
target_include_directories(Ort INTERFACE "${onnxruntime_SOURCE_DIR}/include")
target_sources(Ort INTERFACE "${Onnxruntime_LIB}")
set_property(SOURCE "${Onnxruntime_LIB}" PROPERTY MACOSX_PACKAGE_LOCATION Frameworks)
source_group("Frameworks" FILES "${Onnxruntime_LIB}")
add_custom_command(
TARGET Ort
POST_BUILD
COMMAND
${CMAKE_INSTALL_NAME_TOOL} -change "@rpath/libonnxruntime.${Onnxruntime_VERSION}.dylib"
"@loader_path/../Frameworks/libonnxruntime.${Onnxruntime_VERSION}.dylib" $<TARGET_FILE:${CMAKE_PROJECT_NAME}>)
# set_property(SOURCE "${Onnxruntime_LIB}" PROPERTY MACOSX_PACKAGE_LOCATION Frameworks)
# source_group("Frameworks" FILES "${Onnxruntime_LIB}")
# add_custom_command(
# TARGET Ort
# POST_BUILD
# COMMAND
# ${CMAKE_INSTALL_NAME_TOOL} -change "@rpath/libonnxruntime.${Onnxruntime_VERSION}.dylib"
# "@loader_path/../Frameworks/libonnxruntime.${Onnxruntime_VERSION}.dylib" $<TARGET_FILE:${CMAKE_PROJECT_NAME}>)
elseif(MSVC)
set(Onnxruntime_LIB_NAMES onnxruntime;onnxruntime_providers_shared)

Expand Down

0 comments on commit ad23c6e

Please sign in to comment.