Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/parameterisations/Par04/cmake/FindOnnxRuntime.cmake is written in an unsupported language. File is not indexed.

0001 # Find the ONNX Runtime include directory and library.
0002 #
0003 # This module defines the `onnxruntime` imported target that encodes all
0004 # necessary information in its target properties.
0005 
0006 find_library(
0007   OnnxRuntime_LIBRARY
0008   NAMES onnxruntime
0009   PATH_SUFFIXES lib lib32 lib64
0010   DOC "The ONNXRuntime library")
0011 
0012 find_path(
0013   OnnxRuntime_INCLUDE_DIR
0014   NAMES core/session/onnxruntime_cxx_api.h
0015   PATH_SUFFIXES include include/onnxruntime
0016   DOC "The ONNXRuntime include directory")
0017 
0018 include(FindPackageHandleStandardArgs)
0019 find_package_handle_standard_args(
0020   OnnxRuntime
0021   REQUIRED_VARS OnnxRuntime_LIBRARY OnnxRuntime_INCLUDE_DIR)
0022 
0023 add_library(OnnxRuntime SHARED IMPORTED)
0024 set_property(TARGET OnnxRuntime PROPERTY IMPORTED_LOCATION ${OnnxRuntime_LIBRARY})
0025 set_property(TARGET OnnxRuntime PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${OnnxRuntime_INCLUDE_DIR})
0026 
0027 mark_as_advanced(OnnxRuntime_FOUND OnnxRuntime_INCLUDE_DIR OnnxRuntime_LIBRARY)