2018-11-20 00:48:22 +00:00
|
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
# Licensed under the MIT License.
|
|
|
|
|
|
2019-04-29 19:58:20 +00:00
|
|
|
file(GLOB onnxruntime_session_srcs CONFIGURE_DEPENDS
|
2018-11-20 00:48:22 +00:00
|
|
|
"${ONNXRUNTIME_INCLUDE_DIR}/core/session/*.h"
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/core/session/*.h"
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/core/session/*.cc"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
source_group(TREE ${REPO_ROOT} FILES ${onnxruntime_session_srcs})
|
|
|
|
|
|
|
|
|
|
add_library(onnxruntime_session ${onnxruntime_session_srcs})
|
2018-11-23 04:56:43 +00:00
|
|
|
install(DIRECTORY ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/session DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core)
|
2020-09-01 01:51:31 +00:00
|
|
|
onnxruntime_add_include_to_target(onnxruntime_session onnxruntime_common onnxruntime_framework onnx onnx_proto protobuf::libprotobuf flatbuffers)
|
2019-11-12 05:34:10 +00:00
|
|
|
if(onnxruntime_ENABLE_INSTRUMENT)
|
|
|
|
|
target_compile_definitions(onnxruntime_session PUBLIC ONNXRUNTIME_ENABLE_INSTRUMENT)
|
|
|
|
|
endif()
|
2019-12-04 00:56:07 +00:00
|
|
|
target_include_directories(onnxruntime_session PRIVATE ${ONNXRUNTIME_ROOT} ${PROJECT_SOURCE_DIR}/external/json ${eigen_INCLUDE_DIRS})
|
2018-11-20 00:48:22 +00:00
|
|
|
add_dependencies(onnxruntime_session ${onnxruntime_EXTERNAL_DEPENDENCIES})
|
|
|
|
|
set_target_properties(onnxruntime_session PROPERTIES FOLDER "ONNXRuntime")
|
2019-07-11 21:49:20 +00:00
|
|
|
if (onnxruntime_USE_CUDA)
|
|
|
|
|
target_include_directories(onnxruntime_session PRIVATE ${onnxruntime_CUDNN_HOME}/include ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
|
|
|
|
|
endif()
|
2020-03-11 21:25:37 +00:00
|
|
|
if (onnxruntime_ENABLE_TRAINING)
|
|
|
|
|
target_include_directories(onnxruntime_session PRIVATE ${ORTTRAINING_ROOT})
|
|
|
|
|
endif()
|