Fixes for brew support on OSX (#13476)

* Fixes for brew support on OSX

* Added new policy

* added quotes

* Used OpenVINODeveloperPackage

* Extra fixes

* Use standard verbose variable

* Fixed pkg-config generation
This commit is contained in:
Ilya Lavrenov 2022-10-15 01:15:03 +04:00 committed by GitHub
parent 830cc6ed73
commit 2e336e4bb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 108 additions and 89 deletions

View File

@ -119,7 +119,7 @@ jobs:
inputs:
cmakeArgs: >
-GNinja
-DVERBOSE_BUILD=ON
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DCMAKE_TOOLCHAIN_FILE=$(ANDROID_TOOLS)/ndk-bundle/build/cmake/android.toolchain.cmake
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON

View File

@ -177,7 +177,7 @@ jobs:
# CMake must get Python 3.x version by default
cmakeArgs: >
-GNinja
-DVERBOSE_BUILD=ON
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DENABLE_PYTHON=ON

View File

@ -151,7 +151,7 @@ jobs:
inputs:
cmakeArgs: >
-GNinja
-DVERBOSE_BUILD=ON
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DOpenCV_DIR=$(INSTALL_OPENCV)/cmake
-DPYTHON_INCLUDE_DIRS=$(INSTALL_PYTHON)/include/python3.8
@ -197,7 +197,7 @@ jobs:
inputs:
cmakeArgs: >
-GNinja
-DInferenceEngineDeveloperPackage_DIR=$(BUILD_OPENVINO)
-DOpenVINODeveloperPackage_DIR=$(BUILD_OPENVINO)
-DENABLE_PYTHON=ON
-DTHREADING=TBB
-DPYTHON_EXECUTABLE=$(INSTALL_PYTHON)/bin/python3.8

View File

@ -89,7 +89,7 @@ jobs:
inputs:
cmakeArgs: >
-GNinja
-DVERBOSE_BUILD=ON
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DENABLE_FASTER_BUILD=ON

View File

@ -91,7 +91,7 @@ jobs:
# Coverity has too many PARSE_ERROR errors with ENABLE_FASTER_BUILD=ON. Disabling FASTER_BUILD.
cmakeArgs: >
-GNinja
-DVERBOSE_BUILD=ON
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DENABLE_FASTER_BUILD=OFF
-DENABLE_STRICT_DEPENDENCIES=OFF

View File

@ -121,7 +121,7 @@ jobs:
python3 -m pip install -r /root/repos/openvino/src/bindings/python/requirements.txt &&
cd /root/w/build &&
cmake -GNinja
-DVERBOSE_BUILD=ON
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DIE_EXTRA_MODULES=/root/repos/openvino_contrib/modules
-DENABLE_INTEL_CPU=OFF

View File

@ -155,7 +155,7 @@ jobs:
# CMake must get Python 3.x version by default
cmakeArgs: >
-GNinja
-DVERBOSE_BUILD=ON
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DENABLE_PYTHON=ON

View File

@ -53,7 +53,7 @@ jobs:
# # CMake must get Python 3.x version by default
# cmakeArgs: >
# -GNinja
# -DVERBOSE_BUILD=ON
# -DCMAKE_VERBOSE_MAKEFILE=ON
# -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
# -DENABLE_PYTHON=ON
# -DPYTHON_EXECUTABLE=/usr/bin/python3.8

View File

@ -116,7 +116,8 @@ jobs:
export PATH="/usr/local/opt/cython/bin:$PATH"
export CC=gcc
export CXX=g++
cmake -GNinja -DVERBOSE_BUILD=ON \
cmake -GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DENABLE_REQUIREMENTS_INSTALL=OFF \
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \

View File

@ -81,7 +81,7 @@ function(openvino_developer_export_targets)
get_target_property(original_name ${target_name} ALIASED_TARGET)
if(TARGET "${original_name}")
message(STATUS "The name ${target_name} is an ALIAS for ${original_name}. "
"It will be exported to the InferenceEngineDeveloperPackage with the original name.")
"It will be exported to the OpenVINODeveloperPackage with the original name.")
list(REMOVE_ITEM ${EXPORT_COMPONENT} ${target_name})
list(APPEND ${EXPORT_COMPONENT} ${original_name})
endif()

View File

@ -181,8 +181,23 @@ if(CPACK_GENERATOR MATCHES "^(DEB|RPM)$")
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Cmake install prefix" FORCE)
endif()
include(packaging/packaging)
set(CMAKE_SKIP_INSTALL_RPATH ON)
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
if(DEFINED OV_CPACK_LIBRARYDIR)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OV_CPACK_LIBRARYDIR}")
else()
message(FATAL_ERROR "Internal error: OV_CPACK_LIBRARYDIR is not defined, while it's required to initialize RPATH")
endif()
if(CPACK_GENERATOR STREQUAL "BREW")
set(CMAKE_SKIP_INSTALL_RPATH OFF)
endif()
# WA for Xcode generator + object libraries issue:
# https://gitlab.kitware.com/cmake/cmake/issues/20260
# http://cmake.3232098.n2.nabble.com/XCODE-DEPEND-HELPER-make-Deletes-Targets-Before-and-While-They-re-Built-td7598277.html
@ -192,16 +207,21 @@ endif()
# Use solution folders
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# cmake_dependent_option() supports full Condition Syntax
set(CMAKE_POLICY_DEFAULT_CMP0127 NEW)
# Enable CMAKE_<LANG>_COMPILER_ID AppleClang
# CMake 3.0+: Enable CMAKE_<LANG>_COMPILER_ID AppleClang
set(CMAKE_POLICY_DEFAULT_CMP0025 NEW)
# CMake 3.0+: MACOSX_RPATH is enabled by default.
set(CMAKE_POLICY_DEFAULT_CMP0026 NEW)
# CMake 3.0+ (2.8.12): MacOS "@rpath" in target's install name
set(CMAKE_POLICY_DEFAULT_CMP0042 NEW)
# CMake 3.9+: `RPATH` settings on macOS do not affect `install_name`.
set(CMAKE_POLICY_DEFAULT_CMP0068 NEW)
# CMake 3.13+: option() honors normal variables.
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
# CMake 3.22+ :cmake_dependent_option() supports full Condition Syntax
set(CMAKE_POLICY_DEFAULT_CMP0127 NEW)
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "Don't warn about obsolete cmake versions in 3rdparty")
set(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION ON CACHE BOOL "Warn about absolute paths in destination")
set(CMAKE_SKIP_INSTALL_RPATH ON)
include(packaging/packaging)
# LTO

View File

@ -3,7 +3,7 @@
#
function(debug_message)
if (VERBOSE_BUILD)
if(CMAKE_VERBOSE_MAKEFILE)
message(${ARGV})
endif()
endfunction()

View File

@ -17,7 +17,7 @@ macro(ov_common_libraries_cpack_set_dirs)
set(OV_CPACK_RUNTIMEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_WHEEL_RUNTIMEDIR ${OV_CPACK_RUNTIMEDIR})
set(OV_CPACK_ARCHIVEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_PLUGINSDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_PLUGINSDIR ${CMAKE_INSTALL_LIBDIR}/openvino-${OpenVINO_VERSION})
set(OV_CPACK_IE_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/inferenceengine${OpenVINO_VERSION})
set(OV_CPACK_NGRAPH_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph${OpenVINO_VERSION})
set(OV_CPACK_OPENVINO_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/openvino${OpenVINO_VERSION})

View File

@ -45,9 +45,8 @@ ie_option(ENABLE_ERROR_HIGHLIGHT "Highlight errors and warnings during compile t
ie_option (ENABLE_DOCS "Build docs using Doxygen" OFF)
# TODO: fix apple later
find_package(PkgConfig QUIET)
ie_dependent_option (ENABLE_PKGCONFIG_GEN "Enable openvino.pc pkg-config file generation" ON "LINUX;PkgConfig_FOUND;BUILD_SHARED_LIBS" OFF)
ie_dependent_option (ENABLE_PKGCONFIG_GEN "Enable openvino.pc pkg-config file generation" ON "LINUX OR APPLE;PkgConfig_FOUND;BUILD_SHARED_LIBS" OFF)
#
# Inference Engine specific options

View File

@ -5,7 +5,7 @@
pc_path=${pcfiledir}
prefix=${pc_path}/@PKGCONFIG_OpenVINO_PREFIX@
exec_prefix=${prefix}/@OV_CPACK_RUNTIMEDIR@
exec_prefix=${prefix}/@OV_WHEEL_RUNTIMEDIR@
libdir=${exec_prefix}
include_prefix=${prefix}/@OV_CPACK_INCLUDEDIR@

View File

@ -1,11 +1,11 @@
# Build Plugin Using CMake* {#openvino_docs_ie_plugin_dg_plugin_build}
Inference Engine build infrastructure provides the Inference Engine Developer Package for plugin development.
OpenVINO build infrastructure provides the OpenVINO Developer Package for plugin development.
Inference Engine Developer Package
OpenVINO Developer Package
------------------------
To automatically generate the Inference Engine Developer Package, run the `cmake` tool during a OpenVINO build:
To automatically generate the OpenVINO Developer Package, run the `cmake` tool during a OpenVINO build:
```bash
$ mkdir openvino-release-build
@ -13,40 +13,38 @@ $ cd openvino-release-build
$ cmake -DCMAKE_BUILD_TYPE=Release ../openvino
```
Once the commands above are executed, the Inference Engine Developer Package is generated in the `openvino-release-build` folder. It consists of several files:
- `InferenceEngineDeveloperPackageConfig.cmake` - the main CMake script which imports targets and provides compilation flags and CMake options.
- `InferenceEngineDeveloperPackageConfig-version.cmake` - a file with a package version.
- `targets_developer.cmake` - an automatically generated file which contains all targets exported from the OpenVINO build tree. This file is included by `InferenceEngineDeveloperPackageConfig.cmake` to import the following targets:
Once the commands above are executed, the OpenVINO Developer Package is generated in the `openvino-release-build` folder. It consists of several files:
- `OpenVINODeveloperPackageConfig.cmake` - the main CMake script which imports targets and provides compilation flags and CMake options.
- `OpenVINODeveloperPackageConfig-version.cmake` - a file with a package version.
- `targets_developer.cmake` - an automatically generated file which contains all targets exported from the OpenVINO build tree. This file is included by `OpenVINODeveloperPackageConfig.cmake` to import the following targets:
- Libraries for plugin development:
* `IE::ngraph` - shared nGraph library
* `IE::inference_engine` - shared Inference Engine library
* `IE::inference_engine_transformations` - shared library with Inference Engine ngraph-based Transformations
* `IE::openvino_gapi_preproc` - shared library with Inference Engine preprocessing plugin
* `IE::inference_engine_plugin_api` - interface library with Inference Engine Plugin API headers
* `IE::inference_engine_lp_transformations` - shared library with low-precision transformations
* `IE::pugixml` - static Pugixml library
* `IE::xbyak` - interface library with Xbyak headers
* `IE::itt` - static library with tools for performance measurement using Intel ITT
* `openvino::ngraph` - shared OpenVINO library
* `openvino::openvino_gapi_preproc` - shared library with OpenVINO preprocessing plugin
* `openvino::core::dev` - interface library with OpenVINO Core development headers
* `openvino::runtime::dev` - interface library with OpenVINO Plugin API headers
* `openvino::pugixml` - static Pugixml library
* `openvino::xbyak` - interface library with Xbyak headers
* `openvino::itt` - static library with tools for performance measurement using Intel ITT
- Libraries for tests development:
* `IE::gtest`, `IE::gtest_main`, `IE::gmock` - Google Tests framework libraries
* `IE::commonTestUtils` - static library with common tests utilities
* `IE::funcTestUtils` - static library with functional tests utilities
* `IE::unitTestUtils` - static library with unit tests utilities
* `IE::ngraphFunctions` - static library with the set of `ngraph::Function` builders
* `IE::funcSharedTests` - static library with common functional tests
* `openvino::gtest`, `openvino::gtest_main`, `openvino::gmock` - Google Tests framework libraries
* `openvino::commonTestUtils` - static library with common tests utilities
* `openvino::funcTestUtils` - static library with functional tests utilities
* `openvino::unitTestUtils` - static library with unit tests utilities
* `openvino::ngraphFunctions` - static library with the set of `ov::Model` builders
* `openvino::funcSharedTests` - static library with common functional tests
> **NOTE**: it's enough just to run `cmake --build . --target ie_dev_targets` command to build only targets from the
> Inference Engine Developer package.
> OpenVINO Developer package.
Build Plugin using Inference Engine Developer Package
Build Plugin using OpenVINO Developer Package
------------------------
To build a plugin source tree using the Inference Engine Developer Package, run the commands below:
To build a plugin source tree using the OpenVINO Developer Package, run the commands below:
```cmake
$ mkdir template-plugin-release-build
$ cd template-plugin-release-build
$ cmake -DInferenceEngineDeveloperPackage_DIR=../openvino-release-build ../template-plugin
$ cmake -DOpenVINODeveloperPackage_DIR=../openvino-release-build ../template-plugin
```
A common plugin consists of the following components:
@ -56,7 +54,7 @@ A common plugin consists of the following components:
To build a plugin and its tests, run the following CMake scripts:
- Root `CMakeLists.txt`, which finds the Inference Engine Developer Package using the `find_package` CMake command and adds the `src` and `tests` subdirectories with plugin sources and their tests respectively:
- Root `CMakeLists.txt`, which finds the OpenVINO Developer Package using the `find_package` CMake command and adds the `src` and `tests` subdirectories with plugin sources and their tests respectively:
```cmake
cmake_minimum_required(VERSION 3.13)
@ -83,20 +81,20 @@ if(ENABLE_TESTS)
endif()
```
> **NOTE**: The default values of the `ENABLE_TESTS`, `ENABLE_FUNCTIONAL_TESTS` options are shared via the Inference Engine Developer Package and they are the same as for the main OpenVINO build tree. You can override them during plugin build using the command below:
> **NOTE**: The default values of the `ENABLE_TESTS`, `ENABLE_FUNCTIONAL_TESTS` options are shared via the OpenVINO Developer Package and they are the same as for the main OpenVINO build tree. You can override them during plugin build using the command below:
```bash
$ cmake -DENABLE_FUNCTIONAL_TESTS=OFF -DInferenceEngineDeveloperPackage_DIR=../openvino-release-build ../template-plugin
$ cmake -DENABLE_FUNCTIONAL_TESTS=OFF -DOpenVINODeveloperPackage_DIR=../openvino-release-build ../template-plugin
```
- `src/CMakeLists.txt` to build a plugin shared library from sources:
@snippet template/src/CMakeLists.txt cmake:plugin
> **NOTE**: `IE::inference_engine` target is imported from the Inference Engine Developer Package.
> **NOTE**: `openvino::runtime` target is imported from the OpenVINO Developer Package.
- `tests/functional/CMakeLists.txt` to build a set of functional plugin tests:
@snippet template/tests/functional/CMakeLists.txt cmake:functional_tests
> **NOTE**: The `IE::funcSharedTests` static library with common functional Inference Engine Plugin tests is imported via the Inference Engine Developer Package.
> **NOTE**: The `openvino::funcSharedTests` static library with common functional OpenVINO Plugin tests is imported via the OpenVINO Developer Package.

View File

@ -32,14 +32,14 @@ if [ -e "$INSTALLDIR/runtime" ]; then
system_type=$(ls "$INSTALLDIR/runtime/lib/")
IE_PLUGINS_PATH=$INSTALLDIR/runtime/lib/$system_type
export PKG_CONFIG_PATH=$IE_PLUGINS_PATH/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
export HDDL_INSTALL_DIR=$INSTALLDIR/runtime/3rdparty/hddl
if [[ "$OSTYPE" == "darwin"* ]]; then
export DYLD_LIBRARY_PATH=${IE_PLUGINS_PATH}/Release:${IE_PLUGINS_PATH}/Debug${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
export LD_LIBRARY_PATH=${IE_PLUGINS_PATH}/Release:${IE_PLUGINS_PATH}/Debug${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export PKG_CONFIG_PATH=${IE_PLUGINS_PATH}/Release/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
else
export LD_LIBRARY_PATH=$HDDL_INSTALL_DIR/lib:${IE_PLUGINS_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export PKG_CONFIG_PATH=$IE_PLUGINS_PATH/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
fi
HDDL_UNITE_DIR=$INSTALLDIR/runtime/3rdparty/hddl_unite

View File

@ -11,8 +11,9 @@ project(OpenVINOPython DESCRIPTION "OpenVINO Runtime Python bindings")
#
if(NOT DEFINED OpenVINO_SOURCE_DIR)
find_package(InferenceEngineDeveloperPackage REQUIRED)
set(OpenVINO_BINARY_DIR "${InferenceEngineDeveloperPackage_DIR}")
find_package(OpenVINODeveloperPackage REQUIRED
PATHS "${InferenceEngineDeveloperPackage_DIR}")
set(OpenVINO_BINARY_DIR "${OpenVINODeveloperPackage_DIR}")
endif()
#
@ -111,14 +112,6 @@ ov_check_python_build_conditions()
ie_option(ENABLE_PYTHON "Enables OpenVINO Python API build" ${ENABLE_PYTHON_DEFAULT})
if(NOT ENABLE_PYTHON)
if(CMAKE_SOURCE_DIR STREQUAL OpenVINOPython_SOURCE_DIR)
message(FATAL_ERROR "Python OpenVINO API requirements are not satisfied. Please, install ${ie_python_req} and ${ov_python_req}")
else()
return()
endif()
endif()
#
# Check for wheel package
#
@ -147,10 +140,18 @@ if(LINUX)
endif()
endif()
# this option should not be a part of InferenceEngineDeveloperPackage
# this option should not be a part of OpenVINODeveloperPackage
# since wheels can be built only together with main OV build
ie_dependent_option(ENABLE_WHEEL "Build wheel packages for PyPI" ${ENABLE_WHEEL_DEFAULT} "ENABLE_PYTHON" OFF)
if(NOT ENABLE_PYTHON)
if(CMAKE_SOURCE_DIR STREQUAL OpenVINOPython_SOURCE_DIR)
message(FATAL_ERROR "Python OpenVINO API requirements are not satisfied. Please, install ${ie_python_req} and ${ov_python_req}")
else()
return()
endif()
endif()
#
# Build the code
#
@ -179,6 +180,6 @@ if(ENABLE_TESTS)
add_subdirectory(tests/mock/pyngraph_fe_mock_api)
endif()
if(InferenceEngineDeveloperPackage_FOUND)
if(OpenVINODeveloperPackage_FOUND)
ie_cpack(${IE_CPACK_COMPONENTS_ALL})
endif()

View File

@ -178,7 +178,7 @@ class BuildCMakeExt(build_ext):
ov_build_dir = os.path.join(OPENVINO_ROOT_DIR, "build")
self.spawn(["cmake", "-S" + root_dir, "-B" + self.build_temp,
f"-DCMAKE_BUILD_TYPE={self.config}",
f"-DInferenceEngineDeveloperPackage_DIR={ov_build_dir}",
f"-DOpenVINODeveloperPackage_DIR={ov_build_dir}",
"-DENABLE_PYTHON=ON"] + ext_args)
self.announce("Building binaries", level=3)

View File

@ -9,7 +9,8 @@ cmake_minimum_required (VERSION 3.13)
project (ie_python_api)
if(NOT DEFINED OpenVINO_SOURCE_DIR)
find_package(InferenceEngineDeveloperPackage REQUIRED)
find_package(OpenVINODeveloperPackage REQUIRED
PATHS "${InferenceEngineDeveloperPackage_DIR}")
endif()
option(ENABLE_CONDA_FOLDER "Create output folder with conda python bindings" OFF)

View File

@ -7,7 +7,8 @@ cmake_minimum_required (VERSION 3.13)
project (pyngraph)
if(NOT DEFINED OpenVINO_SOURCE_DIR)
find_package(InferenceEngineDeveloperPackage QUIET)
find_package(OpenVINODeveloperPackage QUIET
PATHS "${InferenceEngineDeveloperPackage_DIR}")
find_package(OpenVINO REQUIRED)
endif()
@ -70,7 +71,7 @@ endif()
# Install
if(OpenVINO_SOURCE_DIR OR InferenceEngineDeveloperPackage_FOUND)
if(OpenVINO_SOURCE_DIR OR OpenVINODeveloperPackage_FOUND)
ie_python_minimal_api(_${PROJECT_NAME})
add_clang_format_target(_${PROJECT_NAME}_clang FOR_TARGETS _${PROJECT_NAME})

View File

@ -69,8 +69,6 @@ pybind11_add_module(${PROJECT_NAME} MODULE NO_EXTRAS ${SOURCES})
if(TARGET offline_transformations)
set(OFFLINE_TRANSFORMATIONS_LIB offline_transformations)
elseif(TARGET IE::offline_transformations)
set(OFFLINE_TRANSFORMATIONS_LIB IE::offline_transformations)
else()
set(OFFLINE_TRANSFORMATIONS_LIB openvino::offline_transformations)
endif()
@ -89,7 +87,7 @@ if(OpenVINO_SOURCE_DIR)
)
endif()
if(OpenVINO_SOURCE_DIR OR InferenceEngineDeveloperPackage_FOUND)
if(OpenVINO_SOURCE_DIR OR OpenVINODeveloperPackage_FOUND)
ie_python_minimal_api(${PROJECT_NAME})
add_clang_format_target(${PROJECT_NAME}_clang FOR_TARGETS ${PROJECT_NAME})

View File

@ -22,8 +22,8 @@ if(COMMAND ie_add_vs_version_file)
FILEDESCRIPTION "Test Utils Python library")
endif()
if(InferenceEngineDeveloperPackage_FOUND)
list(APPEND link_libraries IE::commonTestUtils)
if(OpenVINODeveloperPackage_FOUND)
list(APPEND link_libraries openvino::commonTestUtils)
else()
list(APPEND link_libraries commonTestUtils)
endif()

View File

@ -30,7 +30,7 @@ endif()
# install
if(InferenceEngineDeveloperPackage_FOUND)
if(OpenVINODeveloperPackage_FOUND)
ie_cpack(template)
endif()
# [cmake:main]

View File

@ -45,7 +45,7 @@ function(add_common_utils ADD_TARGET_NAME)
target_compile_definitions(${ADD_TARGET_NAME} PUBLIC USE_BOOST_RE)
debug_message(STATUS "Adding boost dependency")
if (VERBOSE_BUILD)
if (CMAKE_VERBOSE_MAKEFILE)
set(Boost_DEBUG on)
endif ()
find_package(Boost REQUIRED COMPONENTS regex)

View File

@ -4,8 +4,8 @@
# Search OpenVINO Runtime installed
find_package(PkgConfig QUIET)
# TODO: fix apple and cross-compilation later
if(PkgConfig_FOUND AND NOT CMAKE_CROSSCOMPILING AND NOT APPLE)
# TODO: fix cross-compilation later
if(PkgConfig_FOUND AND NOT CMAKE_CROSSCOMPILING)
pkg_search_module(openvino REQUIRED
IMPORTED_TARGET
openvino)

View File

@ -239,7 +239,7 @@ endif()
if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND)
if(ENABLE_SYSTEM_PROTOBUF)
set(Protobuf_USE_STATIC_LIBS ON)
if(VERBOSE_BUILD)
if(CMAKE_VERBOSE_MAKEFILE)
set(Protobuf_DEBUG ON)
endif()
find_package(Protobuf 3.18.2 REQUIRED)

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
if(NOT ENABLE_PYTHON)
message(WARNING "Please enable IE & nGraph Python API (pyopenvino) targets to enable Model Optimizer target")
message(WARNING "Please enable OpenVINO Runtime Python API (set -DENABLE_PYTHON=ON) targets to enable Model Optimizer target")
else()
add_custom_target(model_optimizer DEPENDS ie_api openvino_ir_frontend pyopenvino)