diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake index 78860f2cd86aa3..527d11ebbcbfaa 100644 --- a/thirdparty/dependencies.cmake +++ b/thirdparty/dependencies.cmake @@ -400,6 +400,10 @@ if(ENABLE_OV_TF_LITE_FRONTEND) set(flatbuffers_COMPILER flatbuffers::flatc) else() add_subdirectory(thirdparty/flatbuffers EXCLUDE_FROM_ALL) + + # used by NPU repo + set(flatc_COMMAND flatc) + set(flatc_TARGET flatc) endif() # set additional variables, used in other places of our cmake scripts diff --git a/thirdparty/flatbuffers/CMakeLists.txt b/thirdparty/flatbuffers/CMakeLists.txt index 3f9f7f64cfc851..07be3ec09205ad 100644 --- a/thirdparty/flatbuffers/CMakeLists.txt +++ b/thirdparty/flatbuffers/CMakeLists.txt @@ -3,8 +3,6 @@ # set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" FORCE) -set(FLATBUFFERS_BUILD_FLATLIB OFF CACHE BOOL "" FORCE) -set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "" FORCE) set(FLATBUFFERS_INSTALL OFF CACHE BOOL "" FORCE) set(FLATBUFFERS_CPP_STD ${CMAKE_CXX_STANDARD}) @@ -35,9 +33,10 @@ else() TARGET_NAME host_flatc NATIVE_INSTALL_DIR "${HOST_FLATC_INSTALL_DIR}" CMAKE_ARGS "-DFLATBUFFERS_BUILD_TESTS=${FLATBUFFERS_BUILD_TESTS}" - "-DFLATBUFFERS_BUILD_FLATLIB=${FLATBUFFERS_BUILD_FLATLIB}" + "-DFLATBUFFERS_BUILD_FLATLIB=OFF" + "-DFLATBUFFERS_BUILD_FLATC=ON" + "-DFLATBUFFERS_BUILD_SHAREDLIB=OFF" "-DFLATBUFFERS_CPP_STD=${FLATBUFFERS_CPP_STD}" - "-DFLATBUFFERS_BUILD_FLATHASH=${FLATBUFFERS_BUILD_FLATHASH}" NATIVE_SOURCE_SUBDIR "flatbuffers" NATIVE_TARGETS flatc)