Fixed install rules for case when only ONNX FE is enabled (#21114)
This commit is contained in:
1 parent
bed6eeb94b
commit
3fbef0d498
5 files changed
+20
-16
No files matched your search
@@ -85,12 +85,13 @@ unset(protobuf_installed CACHE)
|
||||
# FILEDESCRIPTION <description> # used on Windows to describe DLL file
|
||||
# [LINKABLE_FRONTEND] # whether we can use FE API directly or via FEM only
|
||||
# [SKIP_INSTALL] # private frontend, not for end users
|
||||
# [PROTOBUF_REQUIRED] # options to denote that protobuf is used
|
||||
# [PROTOBUF_LITE] # requires only libprotobuf-lite
|
||||
# [SKIP_NCC_STYLE] # use custom NCC rules
|
||||
# [LINK_LIBRARIES <lib1 lib2 ...>])
|
||||
#
|
||||
macro(ov_add_frontend)
|
||||
set(options LINKABLE_FRONTEND PROTOBUF_LITE SKIP_NCC_STYLE SKIP_INSTALL)
|
||||
set(options LINKABLE_FRONTEND PROTOBUF_REQUIRED PROTOBUF_LITE SKIP_NCC_STYLE SKIP_INSTALL)
|
||||
set(oneValueArgs NAME FILEDESCRIPTION)
|
||||
set(multiValueArgs LINK_LIBRARIES PROTO_FILES)
|
||||
cmake_parse_arguments(OV_FRONTEND "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
@@ -171,7 +172,7 @@ macro(ov_add_frontend)
|
||||
|
||||
# Create library
|
||||
add_library(${TARGET_NAME} ${LIBRARY_SRC} ${LIBRARY_HEADERS} ${LIBRARY_PUBLIC_HEADERS}
|
||||
${PROTO_SRCS} ${PROTO_HDRS} ${flatbuffers_schema_files} ${proto_files})
|
||||
${PROTO_SRCS} ${PROTO_HDRS} ${flatbuffers_schema_files} ${proto_files})
|
||||
|
||||
if(OV_FRONTEND_LINKABLE_FRONTEND)
|
||||
# create beautiful alias
|
||||
@@ -179,7 +180,7 @@ macro(ov_add_frontend)
|
||||
endif()
|
||||
|
||||
# Shutdown protobuf when unloading the frontend dynamic library
|
||||
if(proto_files AND BUILD_SHARED_LIBS)
|
||||
if(OV_FRONTEND_PROTOBUF_REQUIRED AND BUILD_SHARED_LIBS)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE openvino::protobuf_shutdown)
|
||||
endif()
|
||||
|
||||
@@ -208,17 +209,17 @@ macro(ov_add_frontend)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ${OV_FRONTEND_LINK_LIBRARIES} PUBLIC openvino::runtime)
|
||||
ov_add_library_version(${TARGET_NAME})
|
||||
|
||||
# WA for TF frontends which always require protobuf (not protobuf-lite)
|
||||
# if TF FE is built in static mode, use protobuf for all other FEs
|
||||
if(FORCE_FRONTENDS_USE_PROTOBUF)
|
||||
set(OV_FRONTEND_PROTOBUF_LITE OFF)
|
||||
endif()
|
||||
# if protobuf::libprotobuf-lite is not available, use protobuf::libprotobuf
|
||||
if(NOT TARGET protobuf::libprotobuf-lite)
|
||||
set(OV_FRONTEND_PROTOBUF_LITE OFF)
|
||||
endif()
|
||||
if(OV_FRONTEND_PROTOBUF_REQUIRED)
|
||||
# WA for TF frontends which always require protobuf (not protobuf-lite)
|
||||
# if TF FE is built in static mode, use protobuf for all other FEs
|
||||
if(FORCE_FRONTENDS_USE_PROTOBUF)
|
||||
set(OV_FRONTEND_PROTOBUF_LITE OFF)
|
||||
endif()
|
||||
# if protobuf::libprotobuf-lite is not available, use protobuf::libprotobuf
|
||||
if(NOT TARGET protobuf::libprotobuf-lite)
|
||||
set(OV_FRONTEND_PROTOBUF_LITE OFF)
|
||||
endif()
|
||||
|
||||
if(proto_files)
|
||||
if(OV_FRONTEND_PROTOBUF_LITE)
|
||||
set(protobuf_target_name libprotobuf-lite)
|
||||
set(protobuf_install_name "protobuf_lite_installed")
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
ov_add_frontend(NAME onnx
|
||||
LINKABLE_FRONTEND
|
||||
PROTOBUF_REQUIRED
|
||||
PROTOBUF_LITE
|
||||
SKIP_NCC_STYLE
|
||||
FILEDESCRIPTION "FrontEnd to load and convert ONNX file format"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
ov_add_frontend(NAME paddle
|
||||
LINKABLE_FRONTEND
|
||||
PROTOBUF_REQUIRED
|
||||
PROTOBUF_LITE
|
||||
FILEDESCRIPTION "FrontEnd to load and convert PaddlePaddle file format"
|
||||
LINK_LIBRARIES openvino::util openvino::core::dev)
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
|
||||
ov_add_frontend(NAME tensorflow
|
||||
PROTOBUF_REQUIRED
|
||||
LINKABLE_FRONTEND
|
||||
FILEDESCRIPTION "FrontEnd to load and convert TensorFlow file format"
|
||||
LINK_LIBRARIES openvino::core::dev openvino::frontend::tensorflow_common)
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
#
|
||||
|
||||
ov_add_frontend(NAME tensorflow_lite
|
||||
LINKABLE_FRONTEND
|
||||
FILEDESCRIPTION "FrontEnd to load and convert TensorFlow Lite file format"
|
||||
LINK_LIBRARIES openvino::core::dev openvino::frontend::tensorflow_common)
|
||||
LINKABLE_FRONTEND
|
||||
FILEDESCRIPTION "FrontEnd to load and convert TensorFlow Lite file format"
|
||||
LINK_LIBRARIES openvino::core::dev openvino::frontend::tensorflow_common)
|
||||
Reference in new issue
Block a user