fix build issue on android on shutdown protobuf (#9615)
* fix build issue on android on shutdown protobuf * add ie_dependent_option for shutdown protobuf
This commit is contained in:
parent
080477aa9c
commit
6ae0ba481e
@ -150,7 +150,7 @@ macro(ov_add_frontend)
|
||||
endif()
|
||||
|
||||
# Shutdown protobuf when unloading the front dynamic library
|
||||
if(OV_FRONTEND_SHUTDOWN_PROTOBUF AND BUILD_SHARED_LIBS)
|
||||
if(ENABLE_SHUTDOWN_PROTOBUF AND OV_FRONTEND_SHUTDOWN_PROTOBUF AND BUILD_SHARED_LIBS)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ov_protobuf_shutdown)
|
||||
endif()
|
||||
|
||||
|
@ -154,6 +154,8 @@ ie_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
|
||||
ie_dependent_option(ENABLE_OV_TF_FRONTEND "Enable TensorFlow FrontEnd" ON "protoc_available" OFF)
|
||||
ie_dependent_option(ENABLE_SYSTEM_PROTOBUF "Use system protobuf" OFF
|
||||
"ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_TF_FRONTEND;BUILD_SHARED_LIBS" OFF)
|
||||
ie_dependent_option(ENABLE_SHUTDOWN_PROTOBUF "Shutdown protobuf when unload the frontend shared libraries" ON
|
||||
"ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_TF_FRONTEND;BUILD_SHARED_LIBS" OFF)
|
||||
ie_dependent_option(ENABLE_OV_CORE_UNIT_TESTS "Enables OpenVINO core unit tests" ON "ENABLE_TESTS;NOT ANDROID" OFF)
|
||||
ie_dependent_option(ENABLE_OV_CORE_BACKEND_UNIT_TESTS "Control the building of unit tests using backends" ON
|
||||
"ENABLE_OV_CORE_UNIT_TESTS" OFF)
|
||||
|
@ -71,4 +71,6 @@ install(DIRECTORY ${FRONTEND_INCLUDE_DIR}/openvino
|
||||
|
||||
|
||||
# Shutdown protobuf library
|
||||
if(ENABLE_SHUTDOWN_PROTOBUF)
|
||||
add_subdirectory(shutdown_protobuf)
|
||||
endif()
|
||||
|
@ -1,4 +1,4 @@
|
||||
set(TARGET_NAME ov_protobuf_shutdown)
|
||||
add_library(${TARGET_NAME} STATIC shutdown_protobuf.cpp)
|
||||
target_sources(${TARGET_NAME} INTERFACE shutdown_protobuf.cpp)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${Protobuf_INCLUDE_DIRS})
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE $<BUILD_INTERFACE:${Protobuf_INCLUDE_DIRS}>)
|
||||
|
Loading…
Reference in New Issue
Block a user