Skip to content

Commit

Permalink
conan-io#4806 improve logic for library installation
Browse files Browse the repository at this point in the history
  • Loading branch information
CAMOBAP committed Oct 3, 2021
1 parent 5cd2538 commit 2f2a357
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions recipes/onnxruntime/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ def _configure_cmake(self):
self._cmake.definitions["ONNX_CUSTOM_PROTOC_EXECUTABLE"] = \
tools.which('protoc')

self._cmake.configure(build_folder=self._build_subfolder,
source_folder=self._source_subfolder)
self._cmake.configure(build_folder=self._build_subfolder)
return self._cmake

def build(self):
Expand All @@ -286,11 +285,14 @@ def package(self):

self.copy("LICENSE", dst="licenses", src=self._source_subfolder)

src = self._build_subfolder
if self.options.shared:
self.copy(pattern="*.so", dst="lib", src=self._build_subfolder)
self.copy(pattern="*.dll", dst="lib", src=self._build_subfolder)
self.copy(pattern="*.so*", dst="lib", src=src, keep_path=False)
self.copy(pattern="*.dll", dst="bin", src=src, keep_path=False)
self.copy(pattern="*.lib", dst="lib", src=src, keep_path=False)
else:
self.copy(pattern="*.a", dst="lib", src=self._build_subfolder)
self.copy(pattern="*.a", dst="lib", src=src, keep_path=False)
self.copy(pattern="*.lib", dst="lib", src=src, keep_path=False)

if self.options.with_tests:
self.copy(
Expand Down Expand Up @@ -318,8 +320,6 @@ def package_info(self):
if self.options.shared:
self.cpp_info.libs = ["onnxruntime"]
else:
debug_suffix = "d" if self.settings.build_type == "Debug" else ""

onnxruntime_libs = []

if self.options.with_nnapi:
Expand Down

0 comments on commit 2f2a357

Please sign in to comment.