Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openvino: added OpenVINO 1.0 API headers for older releases #22289

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions recipes/openvino/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from conan import ConanFile
from conan.errors import ConanException, ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd, cross_building
from conan.tools.build import check_min_cppstd
from conan.tools.scm import Version
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
from conan.tools.env import VirtualBuildEnv, VirtualRunEnv
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
import functools
import os
Expand Down Expand Up @@ -117,6 +118,10 @@ def _compilers_minimum_version(self):
"msvc": "192",
}

@property
def _is_legacy_one_profile(self):
return not hasattr(self, "settings_build")

def source(self):
get(self, **self.conan_data["sources"][self.version]["openvino"], strip_root=True)
get(self, **self.conan_data["sources"][self.version]["onednn_cpu"], strip_root=True,
Expand Down Expand Up @@ -152,7 +157,7 @@ def configure(self):
def build_requirements(self):
if self._target_arm:
self.tool_requires("scons/4.3.0")
if cross_building(self):
if not self._is_legacy_one_profile:
if self._protobuf_required:
self.tool_requires("protobuf/<host_version>")
if self.options.enable_tf_lite_frontend:
Expand Down Expand Up @@ -183,6 +188,12 @@ def layout(self):
cmake_layout(self, src_folder="src")

def generate(self):
env = VirtualBuildEnv(self)
env.generate()
if self._is_legacy_one_profile:
env = VirtualRunEnv(self)
env.generate(scope="build")

deps = CMakeDeps(self)
deps.generate()

Expand Down Expand Up @@ -299,6 +310,8 @@ def package_info(self):
openvino_runtime.system_libs.append("shlwapi")
if self._preprocessing_available:
openvino_runtime.system_libs.extend(["wsock32", "ws2_32"])
if Version(self.version) < "2024.0.0":
openvino_runtime.includedirs.append(os.path.join("include", "ie"))

# Have to expose all internal libraries for static libraries case
if not self.options.shared:
Expand Down
Loading