Skip to content

Commit

Permalink
build: Use CONFIG mode for onnxruntime (#4086)
Browse files Browse the repository at this point in the history
Switch to using CMake's CONFIG mode for finding ONNX. This also deletes the find module we ship as of now.
  • Loading branch information
paulgessinger authored Feb 14, 2025
1 parent 4e0bf58 commit e4606c6
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 85 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ if(ACTS_BUILD_PLUGIN_EXATRKX)
endif()
endif()
if(ACTS_BUILD_PLUGIN_ONNX OR ACTS_EXATRKX_ENABLE_ONNX)
find_package(OnnxRuntime ${_acts_onnxruntime_version} REQUIRED)
find_package(onnxruntime ${_acts_onnxruntime_version} CONFIG REQUIRED)
endif()
if(ACTS_BUILD_PLUGIN_EDM4HEP OR ACTS_BUILD_PLUGIN_PODIO)
find_package(podio ${_acts_podio_version} CONFIG)
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Onnx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ target_include_directories(
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_link_libraries(ActsPluginOnnx PUBLIC ActsCore OnnxRuntime)
target_link_libraries(ActsPluginOnnx PUBLIC ActsCore onnxruntime::onnxruntime)

install(
TARGETS ActsPluginOnnx
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Onnx/include/Acts/Plugins/Onnx/OnnxRuntimeBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <vector>

#include <Eigen/Dense>
#include <onnxruntime_cxx_api.h>
#include <onnxruntime/onnxruntime_cxx_api.h>

namespace Acts {

Expand Down
2 changes: 1 addition & 1 deletion Plugins/Onnx/include/Acts/Plugins/Onnx/SeedClassifier.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <vector>

#include <onnxruntime_cxx_api.h>
#include <onnxruntime/onnxruntime_cxx_api.h>

namespace Acts {

Expand Down
6 changes: 0 additions & 6 deletions cmake/ActsCreatePackageConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ install(
DESTINATION ${install_package_config_dir}
)

# install third party FindXXX.cmake files
install(
FILES ${CMAKE_CURRENT_LIST_DIR}/FindOnnxRuntime.cmake
DESTINATION ${install_package_config_dir}/Modules
)

# install target configs for all available components
foreach(_component ${_components})
install(
Expand Down
75 changes: 0 additions & 75 deletions cmake/FindOnnxRuntime.cmake

This file was deleted.

0 comments on commit e4606c6

Please sign in to comment.