From 5d5fe7512398778681e0e2d2f5325e9c7995a7d0 Mon Sep 17 00:00:00 2001 From: Vladimir Zlobin Date: Thu, 21 Nov 2024 18:08:22 +0400 Subject: [PATCH] Allow missing OpenVINODeveloperPackage (#1243) Compiliung GenAI against ov archives prints Warning: Please, install pybind11-stubgen==2.5.1 otherwise --- src/python/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 898e18b895..25d81277d6 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -182,12 +182,14 @@ if(pybind11_stubgen_AVAILABLE) VERBATIM) add_custom_target(${TARGET_NAME}_stub ALL DEPENDS ${output_file}) -else() +elseif(OpenVINODeveloperPackage_FOUND) # Produce warning message at build time as well add_custom_command(OUTPUT pybind11_stub_gen_not_found.txt COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red "Warning: Please, install ${pybind11_stubgen_dep}") add_custom_target(${TARGET_NAME}_stub ALL DEPENDS pybind11_stub_gen_not_found.txt) +else() + add_custom_target(${TARGET_NAME}_stub ALL) endif() add_dependencies(${TARGET_NAME}_stub ${TARGET_NAME})