Skip to content

Commit 700fa47

Browse files
committed
Fix library linkage
1 parent e0954da commit 700fa47

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎Tutorials/ML/CMakeLists.txt‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,11 @@ o2physics_add_dpl_workflow(apply-ml-selection
2222

2323
o2physics_add_dpl_workflow(benchmark-onnx-model
2424
SOURCES benchmarkOnnxModel.cxx
25-
PUBLIC_LINK_LIBRARIES O2::Framework O2::ML O2::GPUCommon ONNXRuntime::ONNXRuntime ${CMAKE_DL_LIBS}
25+
PUBLIC_LINK_LIBRARIES O2::Framework O2::ML O2::GPUCommon ONNXRuntime::ONNXRuntime
26+
TARGETVARNAME benchmarkOnnxModelTarget
2627
COMPONENT_NAME AnalysisTutorial)
28+
29+
# System libraries are linked directly: the workflow helper requires namespaced targets.
30+
if(CMAKE_DL_LIBS)
31+
target_link_libraries(${benchmarkOnnxModelTarget} PRIVATE ${CMAKE_DL_LIBS})
32+
endif()

0 commit comments

Comments
 (0)