Skip to content

Commit

Permalink
onnxruntime: fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 1, 2023
1 parent 2afc29f commit 3f8caae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if(NOT onnxruntime_DISABLE_ABSEIL)
find_package(absl REQUIRED CONFIG)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES absl::absl)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES abseil::abseil)
include_directories(${absl_INCLUDE_DIRS})
endif()

Expand All @@ -27,7 +27,7 @@ list(APPEND onnxruntime_EXTERNAL_LIBRARIES Boost::mp11)
find_package(nlohmann_json REQUIRED CONFIG)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES nlohmann_json::nlohmann_json)

find_package(cpuinfo CONFIG)
find_package(cpuinfo REQUIRED CONFIG)
set(CPUINFO_SUPPORTED ${cpuinfo_FOUND})

if (NOT WIN32)
Expand All @@ -41,7 +41,7 @@ list(APPEND onnxruntime_EXTERNAL_LIBRARIES Microsoft.GSL::GSL)
include_directories(${Microsoft.GSL_INCLUDE_DIRS})

find_package(safeint REQUIRED CONFIG)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES safeint::safeint)
include_directories(${safeint_INCLUDE_DIRS})

find_package(ONNX REQUIRED CONFIG)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES onnx onnx_proto)
Expand Down
6 changes: 3 additions & 3 deletions recipes/onnxruntime/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def requirements(self):
self.requires("nlohmann_json/3.11.2")
self.requires("eigen/3.4.0")
self.requires("ms-gsl/4.0.0")
self.requires("cpuinfo/cci.20230118")
self.requires("cpuinfo/cci.20220618") # Newer versions are not compatible
if self.settings.os != "Windows":
self.requires("nsync/1.26.0")
else:
Expand All @@ -116,7 +116,7 @@ def validate_build(self):
if self.version >= Version("1.15.0") and self.options.shared and sys.version_info[:2] < (3, 8):
# /~https://github.com/microsoft/onnxruntime/blob/638146b79ea52598ece514704d3f592c10fab2f1/cmake/CMakeLists.txt#LL500C12-L500C12
raise ConanInvalidConfiguration(
f"{self.ref} requires python 3.8+ to be built as shared."
f"{self.ref} requires Python 3.8+ to be built as shared."
)

def build_requirements(self):
Expand Down Expand Up @@ -215,7 +215,7 @@ def generate(self):

deps = CMakeDeps(self)
deps.set_property("boost::headers", "cmake_target_name", "Boost::mp11")
deps.set_property("cpuinfo", "cmake_target_name", "cpuinfo")
deps.set_property("cpuinfo::cpuinfo", "cmake_target_name", "cpuinfo")
deps.set_property("date", "cmake_target_name", "date_interface")
deps.set_property("flatbuffers", "cmake_target_name", "flatbuffers::flatbuffers")
deps.set_property("safeint", "cmake_target_name", "safeint_interface")
Expand Down

0 comments on commit 3f8caae

Please sign in to comment.