Skip to content

Commit 0bd061f

Browse files
committed
Merge pull request #1413 from alalek:fix_build
2 parents e9cd99d + 27ced2c commit 0bd061f

File tree

11 files changed

+77
-92
lines changed

11 files changed

+77
-92
lines changed

modules/cnn_3dobj/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
set(BUILD_opencv_cnn_3dobj_INIT OFF) # Must be disabled by default - requires custom build of Caffe.
2+
13
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
24

35
find_package(Caffe)
@@ -8,7 +10,9 @@ else()
810
message(STATUS "Caffe: NO")
911
endif()
1012

11-
find_package(Protobuf)
13+
if(NOT BUILD_PROTOBUF)
14+
find_package(Protobuf)
15+
endif()
1216
if(Protobuf_FOUND)
1317
message(STATUS "Protobuf: YES")
1418
set(HAVE_PROTOBUF 1)

modules/cnn_3dobj/FindProtobuf.cmake

Lines changed: 0 additions & 10 deletions
This file was deleted.

modules/cvv/include/opencv2/cvv/call_meta_data.hpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,10 @@ struct CallMetaData
5858

5959
} // namespaces
6060

61-
#ifdef __GNUC__
62-
#define CVVISUAL_FUNCTION_NAME_MACRO __PRETTY_FUNCTION__
63-
#else
64-
#define CVVISUAL_FUNCTION_NAME_MACRO __func__
65-
#endif
66-
6761
/**
6862
* @brief Creates an instance of CallMetaData with the location of the macro as
6963
* value.
7064
*/
71-
#define CVVISUAL_LOCATION \
72-
::cvv::impl::CallMetaData(__FILE__, __LINE__, \
73-
CVVISUAL_FUNCTION_NAME_MACRO)
65+
#define CVVISUAL_LOCATION ::cvv::impl::CallMetaData(__FILE__, __LINE__, CV_Func)
7466

7567
#endif

modules/cvv/src/qtutil/filter/changed_pixels_widget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ void changedPixelImage(const cv::Mat& mat0, const cv::Mat& mat1, cv::Mat& out)
6767
template<int Depth, int Channels>
6868
void changedPixelImage(const cv::Mat& mat0, const cv::Mat& mat1, cv::Mat& out)
6969
{
70-
using PixelInType=const cvv::qtutil::PixelType<Depth,Channels>;
70+
using PixelInType=cvv::qtutil::PixelType<Depth,Channels>;
7171
using PixelOutType=cvv::qtutil::DepthType<CV_8U>;
7272

7373

7474
cv::Mat result=cv::Mat::zeros(mat0.rows, mat0.cols,CV_8U);
7575
bool same;
76-
PixelInType* in0;
77-
PixelInType* in1;
76+
const PixelInType* in0;
77+
const PixelInType* in1;
7878
for(int i=0;i<result.rows;i++)
7979
{
8080
for(int j=0;j<result.cols;j++)

modules/cvv/test/test_location.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ TEST(LocationTest, FileLineFunction)
1212
auto locationMacroResult = CVVISUAL_LOCATION;
1313
size_t line = __LINE__ - 1;
1414
auto file = __FILE__;
15-
auto fun = CVVISUAL_FUNCTION_NAME_MACRO;
15+
auto fun = CV_Func;
1616
EXPECT_EQ(locationMacroResult.isKnown, true);
1717
EXPECT_EQ(locationMacroResult.file, file);
1818
EXPECT_EQ(locationMacroResult.line, line);

modules/dnn_modern/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ add_definitions(-DCNN_NO_SERIALIZATION -DCNN_USE_CAFFE_CONVERTER)
7979

8080
# NOTE: In case that proto files already exist,
8181
# this is not needed anymore.
82-
find_package(Protobuf QUIET)
82+
if(NOT BUILD_PROTOBUF)
83+
find_package(Protobuf QUIET)
84+
endif()
8385

8486
if(NOT ${Protobuf_FOUND})
8587
message(STATUS "Module opencv_dnn_modern disabled because Protobuf is not found")

modules/surface_matching/src/ppf_helpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Mat loadPLYSimple(const char* fileName, int withNormals)
121121
{
122122
float* data = cloud.ptr<float>(i);
123123
int col = 0;
124-
for (; col < withNormals ? 6 : 3; ++col)
124+
for (; col < (withNormals ? 6 : 3); ++col)
125125
{
126126
ifs >> data[col];
127127
}

0 commit comments

Comments
 (0)