|
|
|
@ -141,7 +141,7 @@ append_if_exist(Protobuf_SRCS |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
include_directories(BEFORE "${PROTOBUF_ROOT}/src") # ensure using if own headers: https://github.com/opencv/opencv/issues/13328 |
|
|
|
|
add_library(libprotobuf STATIC ${Protobuf_SRCS}) |
|
|
|
|
add_library(libprotobuf STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${Protobuf_SRCS}) |
|
|
|
|
target_include_directories(libprotobuf SYSTEM PUBLIC $<BUILD_INTERFACE:${PROTOBUF_ROOT}/src>) |
|
|
|
|
set_target_properties(libprotobuf |
|
|
|
|
PROPERTIES |
|
|
|
@ -157,7 +157,7 @@ get_protobuf_version(Protobuf_VERSION "${PROTOBUF_ROOT}/src") |
|
|
|
|
set(Protobuf_VERSION ${Protobuf_VERSION} CACHE INTERNAL "" FORCE) |
|
|
|
|
|
|
|
|
|
if(NOT BUILD_SHARED_LIBS) |
|
|
|
|
ocv_install_target(libprotobuf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev) |
|
|
|
|
ocv_install_target(libprotobuf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
ocv_install_3rdparty_licenses(protobuf LICENSE README.md) |
|
|
|
|