File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,13 @@ if(NOT GENERATOR_IS_MULTI_CONFIG_VAR AND NOT DEFINED CMAKE_BUILD_TYPE)
1313 set (CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..." )
1414endif ()
1515
16- project (model_api)
16+ set (model_api_VERSION 0.0.0)
17+
18+ project (model_api
19+ VERSION ${model_api_VERSION}
20+ DESCRIPTION "OpenVINO Vision API"
21+ HOMEPAGE_URL "https://github.com/openvinotoolkit/model_api/"
22+ LANGUAGES CXX C)
1723
1824if (WIN32 )
1925 if (NOT "${CMAKE_SIZEOF_VOID_P} " EQUAL "8" )
@@ -23,10 +29,21 @@ if(WIN32)
2329 add_definitions (-DNOMINMAX)
2430endif ()
2531
26- set (model_api_VERSION 0.0.0)
27-
2832find_package (OpenCV REQUIRED COMPONENTS core imgproc)
29- find_package (OpenVINO REQUIRED COMPONENTS Runtime)
33+
34+ # Looking for OpenVINO in the python distribution. It doesn't work for cross-compiling build
35+ if (NOT CMAKE_CROSSCOMPILING )
36+ find_package (Python3 REQUIRED)
37+ execute_process (
38+ COMMAND ${Python3_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')"
39+ OUTPUT_VARIABLE OpenVINO_DIR_PY
40+ ERROR_QUIET
41+ )
42+ endif ()
43+
44+ find_package (OpenVINO REQUIRED
45+ COMPONENTS Runtime Threading
46+ HINTS "${OpenVINO_DIR_PY} " )
3047
3148include (FetchContent)
3249FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz)
You can’t perform that action at this time.
0 commit comments