Skip to content

Commit

Permalink
Refactor include directory settings in FetchOnnxruntime.cmake for bet…
Browse files Browse the repository at this point in the history
…ter compatibility
  • Loading branch information
royshil committed Nov 5, 2024
1 parent ad23c6e commit 0a5ed1e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/FetchOnnxruntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ if(APPLE)
set(Onnxruntime_LIB "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.${Onnxruntime_VERSION}.dylib")

target_link_libraries(Ort INTERFACE "${Onnxruntime_LIB}")
target_include_directories(Ort INTERFACE "${onnxruntime_SOURCE_DIR}/include")
target_include_directories(Ort INTERFACE
$<BUILD_INTERFACE:${ONNXRUNTIME_INCLUDE_DIRS}>
$<INSTALL_INTERFACE:include>
)
target_sources(Ort INTERFACE "${Onnxruntime_LIB}")
# set_property(SOURCE "${Onnxruntime_LIB}" PROPERTY MACOSX_PACKAGE_LOCATION Frameworks)
# source_group("Frameworks" FILES "${Onnxruntime_LIB}")
Expand Down

0 comments on commit 0a5ed1e

Please sign in to comment.