key4hep / key4hep-spack

A Spack recipe repository of Key4hep software.
10 stars 24 forks source link

onnxruntime starts to provide CMake config for downstream consumption #578

Closed tmadlener closed 3 months ago

tmadlener commented 7 months ago

Somewhere between version 1.15.0 and 1.17.1 onnxruntime started to install CMake configuration files that make it more easily consumable for downstream packages. It should then be possible to simply do find_package(onnxruntime) and then use targets from there.

Several packages link against onnxruntime already now, e.g. FCCAnalyses and ddfastshowerml, but they come with hand rolled CMake find modules to detect onnxruntime. Unfortunately they do this with different spellings, e.g. OnnxRuntime.

Ideally we switch to a newer version of onnxruntime and simply switch all of our packages to use the available targets from the exported configuration. Unfortunately, it is probably not easily possible to transparently support all versions of onnxruntime easily.

jmcarcell commented 3 months ago

See some pull requests to support this: https://github.com/HEP-FCC/FCCAnalyses/pull/381, https://github.com/HEP-FCC/k4RecCalorimeter/pull/104. Closing as it seems to be completed now.