Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix path to generated ov_plugins.hpp (#26521)
OpenVino fails to compile if it's used as a subdirectory in CMakeLists.txt. For example, below scenario: ``` $ git clone https://github.com/openvinotoolkit/openvino --recursive $ cat CMakeLists.txt project(testing) add_subdirectory(openvino) $ mkdir build $ cmake -B build -S . $ make -C build openvino_runtime_obj ``` ends with compilation error: ``` core_impl.cpp:32:10: fatal error: ov_plugins.hpp: No such file or directory 32 | #include "ov_plugins.hpp" | ^~~~~~~~~~~~~~~~ ``` because of incorrect include path. openvino_runtime_obj target expects ov_plugins.hpp to be present in ${CMAKE_CURRENT_BINARY_DIR} (which is build/openvino/src/inference in this case), but ov_plugins.hpp is generated to ${CMAKE_BINARY_DIR}/src/inference (which is build/src/inference). To fix that, ov_generate_plugins_hpp can use BINARY_DIR property of openvino_runtime_obj instead of ${CMAKE_BINARY_DIR}/src/inference.
- Loading branch information