Skip to content

Commit 33f9308

Browse files
committed
ONNXRuntime CMake: Use standard ONNXRuntime lowercase library syntax, remove obsolete wrapper, move detection from toplevel CMake to dependencies
1 parent 4204d44 commit 33f9308

File tree

7 files changed

+7
-29
lines changed

7 files changed

+7
-29
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ o2_build_sanity_checks()
4141
set(CMAKE_CXX_STANDARD 20)
4242
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
4343

44-
include(dependencies/FindONNXRuntime.cmake)
45-
4644
include(O2CheckCXXFeatures)
4745
o2_check_cxx_features()
4846

Common/ML/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
o2_add_library(ML
1313
SOURCES src/OrtInterface.cxx
1414
TARGETVARNAME targetName
15-
PRIVATE_LINK_LIBRARIES O2::Framework ONNXRuntime::ONNXRuntime)
15+
PRIVATE_LINK_LIBRARIES O2::Framework onnxruntime::onnxruntime)
1616

1717
# Pass ORT variables as a preprocessor definition
1818
target_compile_definitions(${targetName} PRIVATE

GPU/GPUTracking/Base/cuda/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2")
114114
${MODULE}
115115
SOURCES ${SRCS}
116116
PUBLIC_LINK_LIBRARIES O2::GPUTracking O2::ITStrackingCUDA
117-
PRIVATE_LINK_LIBRARIES ONNXRuntime::ONNXRuntime
117+
PRIVATE_LINK_LIBRARIES onnxruntime::onnxruntime
118118
PRIVATE_INCLUDE_DIRECTORIES
119119
${CMAKE_SOURCE_DIR}/Detectors/Base/src
120120
${CMAKE_SOURCE_DIR}/Detectors/TRD/base/src

GPU/GPUTracking/Base/hip/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2")
162162
${MODULE}
163163
SOURCES ${SRCS}
164164
PUBLIC_LINK_LIBRARIES O2::GPUTracking O2::ITStrackingHIP
165-
PRIVATE_LINK_LIBRARIES ONNXRuntime::ONNXRuntime
165+
PRIVATE_LINK_LIBRARIES onnxruntime::onnxruntime
166166
PRIVATE_INCLUDE_DIRECTORIES
167167
${CMAKE_SOURCE_DIR}/Detectors/Base/src
168168
${CMAKE_SOURCE_DIR}/Detectors/TRD/base/src

GPU/GPUTracking/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2")
343343
O2::DetectorsRaw
344344
O2::Steer
345345
O2::ML
346-
PRIVATE_LINK_LIBRARIES ONNXRuntime::ONNXRuntime
346+
PRIVATE_LINK_LIBRARIES onnxruntime::onnxruntime
347347
PUBLIC_INCLUDE_DIRECTORIES ${INCDIRS}
348348
SOURCES ${SRCS} ${SRCS_NO_CINT} ${SRCS_NO_H})
349349

dependencies/FindONNXRuntime.cmake

Lines changed: 0 additions & 23 deletions
This file was deleted.

dependencies/O2Dependencies.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ if (NOT TARGET Gandiva::gandiva_shared)
6969
add_library(Gandiva::gandiva_shared ALIAS gandiva_shared)
7070
endif()
7171

72+
find_package(onnxruntime CONFIG)
73+
set_package_properties(onnxruntime PROPERTIES TYPE REQUIRED)
74+
7275
find_package(Vc)
7376
set_package_properties(Vc PROPERTIES TYPE REQUIRED)
7477

0 commit comments

Comments
 (0)