File tree Expand file tree Collapse file tree 4 files changed +23
-6
lines changed Expand file tree Collapse file tree 4 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,14 @@ function(get_c_cxx_api_headers HEADERS_VAR)
38
38
39
39
# need to add header files for enabled EPs
40
40
foreach (f ${ONNXRUNTIME_PROVIDER_NAMES} )
41
- file (GLOB _provider_headers CONFIGURE_DEPENDS
42
- "${REPO_ROOT} /include/onnxruntime/core/providers/${f} /*.h"
43
- )
44
- list (APPEND _headers ${_provider_headers} )
41
+ # The header files in include/onnxruntime/core/providers/cuda directory cannot be flattened to the same directory
42
+ # with onnxruntime_c_api.h . Most other EPs probably also do not work in this way.
43
+ if ((NOT f STREQUAL cuda ) AND (NOT f STREQUAL rocm ))
44
+ file (GLOB _provider_headers CONFIGURE_DEPENDS
45
+ "${REPO_ROOT} /include/onnxruntime/core/providers/${f} /*.h"
46
+ )
47
+ list (APPEND _headers ${_provider_headers} )
48
+ endif ()
45
49
endforeach ()
46
50
47
51
set (${HEADERS_VAR} ${_headers} PARENT_SCOPE )
Original file line number Diff line number Diff line change @@ -219,6 +219,7 @@ if (onnxruntime_ENABLE_TRAINING)
219
219
endif ()
220
220
221
221
install (FILES ${PROJECT_SOURCE_DIR} /../include/onnxruntime/core/providers/cpu/cpu_provider_factory.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /onnxruntime/ )
222
+ install (FILES ${PROJECT_SOURCE_DIR} /../include/onnxruntime/core/providers/resource.h ${PROJECT_SOURCE_DIR} /../include/onnxruntime/core/providers/custom_op_context.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /onnxruntime/core/providers )
222
223
set_target_properties (onnxruntime_providers PROPERTIES LINKER_LANGUAGE CXX )
223
224
set_target_properties (onnxruntime_providers PROPERTIES FOLDER "ONNXRuntime" )
224
225
Original file line number Diff line number Diff line change 289
289
config_cuda_provider_shared_module (onnxruntime_providers_cuda_obj )
290
290
endif ()
291
291
config_cuda_provider_shared_module (onnxruntime_providers_cuda )
292
-
292
+ # Cannot use glob because the file cuda_provider_options.h should not be exposed out.
293
+ set (ONNXRUNTIME_CUDA_PROVIDER_PUBLIC_HEADERS
294
+ "${REPO_ROOT} /include/onnxruntime/core/providers/cuda/cuda_context.h"
295
+ "${REPO_ROOT} /include/onnxruntime/core/providers/cuda/cuda_resource.h"
296
+ )
297
+ set_target_properties (onnxruntime_providers_cuda PROPERTIES
298
+ PUBLIC_HEADER "${ONNXRUNTIME_CUDA_PROVIDER_PUBLIC_HEADERS} " )
293
299
install (TARGETS onnxruntime_providers_cuda
300
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /onnxruntime/core/providers/cuda
294
301
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
295
302
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
296
303
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
Original file line number Diff line number Diff line change 223
223
if (onnxruntime_ENABLE_ATEN )
224
224
target_compile_definitions (onnxruntime_providers_rocm PRIVATE ENABLE_ATEN )
225
225
endif ()
226
-
226
+ file (GLOB ONNXRUNTIME_ROCM_PROVIDER_PUBLIC_HEADERS CONFIGURE_DEPENDS
227
+ "${REPO_ROOT} /include/onnxruntime/core/providers/rocm/*.h"
228
+ )
229
+ set_target_properties (onnxruntime_providers_rocm PROPERTIES
230
+ PUBLIC_HEADER "${ONNXRUNTIME_ROCM_PROVIDER_PUBLIC_HEADERS} " )
227
231
install (TARGETS onnxruntime_providers_rocm
232
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /onnxruntime/core/providers/rocm
228
233
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
229
234
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
230
235
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
You can’t perform that action at this time.
0 commit comments