File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ if(NOT WITH_PROTOBUF)
66 return ()
77endif ()
88
9- ocv_option(BUILD_PROTOBUF "Force to build libprotobuf runtime from sources" ON )
10- ocv_option(PROTOBUF_UPDATE_FILES "Force rebuilding .proto files (protoc should be available)" OFF )
9+ ocv_option(BUILD_PROTOBUF "Force to build libprotobuf runtime from sources" OFF )
10+ ocv_option(PROTOBUF_UPDATE_FILES "Force rebuilding .proto files (protoc should be available)" ON )
1111
1212# BUILD_PROTOBUF=OFF: Custom manual protobuf configuration (see find_package(Protobuf) for details):
1313# - Protobuf_INCLUDE_DIR
@@ -31,6 +31,7 @@ if(BUILD_PROTOBUF)
3131 set (HAVE_PROTOBUF TRUE )
3232else ()
3333 unset (Protobuf_VERSION CACHE )
34+ hunter_add_package(Protobuf)
3435 find_package (Protobuf QUIET )
3536
3637 # Backwards compatibility
@@ -68,7 +69,12 @@ else()
6869endif ()
6970
7071if (HAVE_PROTOBUF AND PROTOBUF_UPDATE_FILES AND NOT COMMAND PROTOBUF_GENERATE_CPP)
71- message (FATAL_ERROR "Can't configure protobuf dependency (BUILD_PROTOBUF=${BUILD_PROTOBUF} PROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES} )" )
72+ # message(FATAL_ERROR "Can't configure protobuf dependency (BUILD_PROTOBUF=${BUILD_PROTOBUF} PROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES})")
73+ hunter_add_package(Protobuf)
74+ find_package (Protobuf QUIET )
75+ if (NOT COMMAND PROTOBUF_GENERATE_CPP)
76+ message (FATAL_ERROR "PROTOBUF_GENERATE_CPP command is not available" )
77+ endif ()
7278endif ()
7379
7480if (HAVE_PROTOBUF)
You can’t perform that action at this time.
0 commit comments