Skip to content

Commit e7547d6

Browse files
committed
Merge pull request #1342 from sovrasov:dnn_m_build_fix
2 parents 0e91983 + e7b54ce commit e7547d6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/dnn_modern/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ add_definitions(-DCNN_NO_SERIALIZATION -DCNN_USE_CAFFE_CONVERTER)
8181
# this is not needed anymore.
8282
find_package(Protobuf QUIET)
8383

84+
if(NOT ${Protobuf_FOUND})
85+
message(STATUS "Module opencv_dnn_modern disabled because Protobuf is not found")
86+
ocv_module_disable(dnn_modern)
87+
return()
88+
endif()
89+
8490
if(DEFINED PROTOBUF_PROTOC_EXECUTABLE AND EXISTS ${PROTOBUF_PROTOC_EXECUTABLE})
8591
execute_process(COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} caffe.proto --cpp_out=./
8692
WORKING_DIRECTORY ${TINYDNN_INCLUDE_DIRS}/tiny_dnn/io/caffe)

0 commit comments

Comments
 (0)