Skip to content

Commit f17981a

Browse files
awoll-bdaiexploy-bot
authored andcommitted
Make onnxruntime linking consistent (#63)
# Pull Request ### What change is being made Make onnxruntime linking consistent with other libraries. ### Why this change is being made Consistency. ### Tested Good to go if CI passes. GitOrigin-RevId: 993e1551ac266ba468de9688ae72f032cc3f8a5f
1 parent 3bbf82a commit f17981a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

cmake/Findonnxruntime.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ find_library(onnxruntime_LIBRARY
2121
)
2222

2323
if(onnxruntime_LIBRARY)
24-
add_library(onnxruntime SHARED IMPORTED)
25-
set_property(TARGET onnxruntime PROPERTY IMPORTED_LOCATION "${onnxruntime_LIBRARY}")
26-
set_property(TARGET onnxruntime PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${onnxruntime_INCLUDE_DIRS}")
27-
set_property(TARGET onnxruntime PROPERTY INTERFACE_COMPILE_OPTIONS "${onnxruntime_CXX_FLAGS}")
24+
add_library(onnxruntime::onnxruntime SHARED IMPORTED)
25+
set_property(TARGET onnxruntime::onnxruntime PROPERTY IMPORTED_LOCATION "${onnxruntime_LIBRARY}")
26+
set_property(TARGET onnxruntime::onnxruntime PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${onnxruntime_INCLUDE_DIRS}")
27+
set_property(TARGET onnxruntime::onnxruntime PROPERTY INTERFACE_COMPILE_OPTIONS "${onnxruntime_CXX_FLAGS}")
2828
endif()
2929

3030
find_package_handle_standard_args(onnxruntime DEFAULT_MSG onnxruntime_LIBRARY onnxruntime_INCLUDE_DIRS)

control/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ target_link_libraries(exploy PUBLIC
3434
Eigen3::Eigen
3535
nlohmann_json::nlohmann_json
3636
fmt::fmt
37-
onnxruntime
37+
onnxruntime::onnxruntime
3838
)
3939

4040
# Tests

0 commit comments

Comments
 (0)