@@ -9,21 +9,21 @@ FetchContent_Declare(
9
9
URL_HASH SHA256=bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7
10
10
)
11
11
FetchContent_GetProperties(pybind11)
12
- if (NOT pybind11_POPULATED)
13
- FetchContent_Populate(pybind11)
14
- # search for FindPython3.cmake instead of legacy modules
15
- set (PYBIND11_FINDPYTHON ON )
16
- # the following two calls are required for cross-compilation
17
- if (OpenVINODeveloperPackage_DIR)
18
- ov_find_python3(REQUIRED)
19
- ov_detect_python_module_extension()
12
+ # search for FindPython3.cmake instead of legacy modules
13
+ set (PYBIND11_FINDPYTHON ON )
14
+ # the following two calls are required for cross-compilation
15
+ if (OpenVINODeveloperPackage_DIR)
16
+ ov_find_python3(REQUIRED)
17
+ ov_detect_python_module_extension()
18
+ else ()
19
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
20
+ find_package (Python3 REQUIRED COMPONENTS Interpreter Development.Module)
20
21
else ()
21
- if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
22
- find_package (Python3 REQUIRED COMPONENTS Interpreter Development.Module)
23
- else ()
24
- find_package (Python3 REQUIRED COMPONENTS Interpreter Development)
25
- endif ()
22
+ find_package (Python3 REQUIRED COMPONENTS Interpreter Development)
26
23
endif ()
24
+ endif ()
25
+ if (NOT pybind11_POPULATED)
26
+ FetchContent_Populate(pybind11)
27
27
add_subdirectory (${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR} )
28
28
endif ()
29
29
0 commit comments