Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn committed Jan 23, 2025
1 parent b5d4139 commit 9faa9f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ function(onnxruntime_set_compile_flags target_name)
endforeach()
if(VCPKG_INSTALLED_DIR)
cmake_path(NATIVE_PATH VCPKG_INSTALLED_DIR NORMALIZE VCPKG_INSTALLED_DIR_native)
target_compile_options(${target_name} PRIVATE "$<$<COMPILE_LANGUAGE:CXX,C>:SHELL:/external:I ${VCPKG_INSTALLED_DIR}>")
target_compile_options(${target_name} PRIVATE "$<$<COMPILE_LANGUAGE:CXX,C>:SHELL:/external:I ${VCPKG_INSTALLED_DIR_native}>")
endif()
foreach(onnxruntime_external_lib IN LISTS onnxruntime_EXTERNAL_LIBRARIES)
#TODO: the list contains cmake keywords like "debug". We should exclude them.
Expand Down
7 changes: 4 additions & 3 deletions cmake/onnxruntime_providers_coreml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@ onnxruntime_add_static_library(onnxruntime_providers_coreml

onnxruntime_add_include_to_target(onnxruntime_providers_coreml
onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers Boost::mp11
safeint_interface
safeint_interface nlohmann_json::nlohmann_json
)

if(VCPKG_INSTALLED_DIR)
target_include_directories(onnxruntime_providers_coreml PRIVATE ${VCPKG_INSTALLED_DIR}/include/nlohmann)
endif()
onnxruntime_add_include_to_target(onnxruntime_providers_coreml coreml_proto)
target_link_libraries(onnxruntime_providers_coreml PRIVATE coreml_proto)
add_dependencies(onnxruntime_providers_coreml coreml_proto)
Expand All @@ -154,7 +156,6 @@ if (APPLE)
endif()


onnxruntime_add_include_to_target(onnxruntime_providers_coreml nlohmann_json::nlohmann_json)
# need to tweak the include paths to match what the coreml source code expects
target_include_directories(onnxruntime_providers_coreml PRIVATE
${fp16_SOURCE_DIR}/include
Expand Down

0 comments on commit 9faa9f9

Please sign in to comment.