mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
dnn: avoid conflicts with original caffe.proto
rename caffe.proto => opencv-caffe.proto
This commit is contained in:
@@ -56,14 +56,15 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS
|
||||
)
|
||||
|
||||
if(PROTOBUF_UPDATE_FILES)
|
||||
file(GLOB proto_files src/tensorflow/*.proto)
|
||||
list(APPEND proto_files src/caffe/caffe.proto)
|
||||
file(GLOB proto_files ${CMAKE_CURRENT_SOURCE_DIR}/src/tensorflow/*.proto)
|
||||
list(APPEND proto_files ${CMAKE_CURRENT_SOURCE_DIR}/src/caffe/opencv-caffe.proto)
|
||||
set(PROTOBUF_GENERATE_CPP_APPEND_PATH ON) # required for tensorflow
|
||||
PROTOBUF_GENERATE_CPP(Protobuf_HDRS Protobuf_SRCS ${proto_files})
|
||||
else()
|
||||
file(GLOB fw_srcs ${CMAKE_CURRENT_SOURCE_DIR}/misc/tensorflow/*.cc)
|
||||
file(GLOB fw_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/misc/tensorflow/*.h)
|
||||
list(APPEND fw_srcs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/caffe.pb.cc)
|
||||
list(APPEND fw_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/caffe.pb.h)
|
||||
list(APPEND fw_srcs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/opencv-caffe.pb.cc)
|
||||
list(APPEND fw_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/opencv-caffe.pb.h)
|
||||
list(APPEND Protobuf_SRCS ${fw_srcs})
|
||||
list(APPEND Protobuf_HDRS ${fw_hdrs})
|
||||
list(APPEND Protobuf_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe)
|
||||
|
||||
@@ -42,8 +42,6 @@
|
||||
#include "../precomp.hpp"
|
||||
|
||||
#ifdef HAVE_PROTOBUF
|
||||
#include "caffe.pb.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -99,7 +99,6 @@
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
|
||||
#include "caffe.pb.h"
|
||||
#include "caffe_io.hpp"
|
||||
#include "glog_emulator.hpp"
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
#define __OPENCV_DNN_CAFFE_IO_HPP__
|
||||
#ifdef HAVE_PROTOBUF
|
||||
|
||||
#include "caffe.pb.h"
|
||||
#include "opencv-caffe.pb.h"
|
||||
|
||||
namespace cv {
|
||||
namespace dnn {
|
||||
|
||||
Reference in New Issue
Block a user