Skip to content

Commit

Permalink
Added extra flatc variables used by NPU (openvinotoolkit#22620)
Browse files Browse the repository at this point in the history
### Details:
- Required to build NPU and OpenVINO in a single shot for wheel packages

### Tickets:
- CVS-130134
  • Loading branch information
ilya-lavrenov authored Feb 8, 2024
1 parent 8401bf0 commit bf64016
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions thirdparty/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions thirdparty/flatbuffers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit bf64016

Please sign in to comment.