From 6c051a55e5cbc55ad806f96591d40220544297ef Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 16 Mar 2018 16:36:11 +0300 Subject: [PATCH] cmake: don't add include /src directory to avoid conflicts during opencv_world builds --- cmake/OpenCVCompilerOptimizations.cmake | 6 +++--- cmake/OpenCVModule.cmake | 1 - cmake/cl2cpp.cmake | 2 +- modules/core/src/logger.cpp | 2 +- modules/core/src/trace.cpp | 2 +- modules/core/src/utils/filesystem.cpp | 2 +- modules/dnn/src/layers/batch_norm_layer.cpp | 4 ++-- modules/dnn/src/layers/concat_layer.cpp | 4 ++-- modules/dnn/src/layers/convolution_layer.cpp | 4 ++-- modules/dnn/src/layers/detection_output_layer.cpp | 2 +- modules/dnn/src/layers/elementwise_layers.cpp | 4 ++-- modules/dnn/src/layers/eltwise_layer.cpp | 4 ++-- modules/dnn/src/layers/flatten_layer.cpp | 2 +- modules/dnn/src/layers/fully_connected_layer.cpp | 4 ++-- modules/dnn/src/layers/layers_common.hpp | 2 +- modules/dnn/src/layers/lrn_layer.cpp | 4 ++-- modules/dnn/src/layers/max_unpooling_layer.cpp | 2 +- modules/dnn/src/layers/padding_layer.cpp | 2 +- modules/dnn/src/layers/permute_layer.cpp | 2 +- modules/dnn/src/layers/pooling_layer.cpp | 4 ++-- modules/dnn/src/layers/prior_box_layer.cpp | 2 +- modules/dnn/src/layers/region_layer.cpp | 2 +- modules/dnn/src/layers/reshape_layer.cpp | 2 +- modules/dnn/src/layers/scale_layer.cpp | 4 ++-- modules/dnn/src/layers/shift_layer.cpp | 2 +- modules/dnn/src/layers/softmax_layer.cpp | 4 ++-- modules/dnn/src/nms.cpp | 2 +- modules/viz/src/precomp.hpp | 14 +++++++------- 28 files changed, 45 insertions(+), 46 deletions(-) diff --git a/cmake/OpenCVCompilerOptimizations.cmake b/cmake/OpenCVCompilerOptimizations.cmake index feb144b317..4c777f6c16 100644 --- a/cmake/OpenCVCompilerOptimizations.cmake +++ b/cmake/OpenCVCompilerOptimizations.cmake @@ -743,11 +743,11 @@ endmacro() macro(ocv_add_dispatched_file filename) if(NOT OPENCV_INITIAL_PASS) set(__codestr " -#include \"precomp.hpp\" -#include \"${filename}.simd.hpp\" +#include \"${CMAKE_CURRENT_LIST_DIR}/src/precomp.hpp\" +#include \"${CMAKE_CURRENT_LIST_DIR}/src/${filename}.simd.hpp\" ") - set(__declarations_str "#define CV_CPU_SIMD_FILENAME \"${filename}.simd.hpp\"") + set(__declarations_str "#define CV_CPU_SIMD_FILENAME \"${CMAKE_CURRENT_LIST_DIR}/src/${filename}.simd.hpp\"") set(__dispatch_modes "BASELINE") set(__optimizations "${ARGN}") diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index f5beeba09a..0d3d33a4f5 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -700,7 +700,6 @@ endmacro() macro(ocv_module_include_directories) ocv_target_include_directories(${the_module} "${OPENCV_MODULE_${the_module}_LOCATION}/include" - "${OPENCV_MODULE_${the_module}_LOCATION}/src" "${CMAKE_CURRENT_BINARY_DIR}" # for precompiled headers ) ocv_target_include_modules(${the_module} ${OPENCV_MODULE_${the_module}_DEPS} ${ARGN}) diff --git a/cmake/cl2cpp.cmake b/cmake/cl2cpp.cmake index f9e36550db..a9d1b6789d 100644 --- a/cmake/cl2cpp.cmake +++ b/cmake/cl2cpp.cmake @@ -17,7 +17,7 @@ set(nested_namespace_end "}") set(STR_CPP "// This file is auto-generated. Do not edit! -#include \"precomp.hpp\" +#include \"opencv2/core.hpp\" #include \"cvconfig.h\" #include \"${OUTPUT_HPP_NAME}\" diff --git a/modules/core/src/logger.cpp b/modules/core/src/logger.cpp index b390a2538e..6574bd4ac1 100644 --- a/modules/core/src/logger.cpp +++ b/modules/core/src/logger.cpp @@ -2,7 +2,7 @@ // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. -#include +#include "precomp.hpp" #include #include diff --git a/modules/core/src/trace.cpp b/modules/core/src/trace.cpp index e22f997a70..a8fd26db05 100644 --- a/modules/core/src/trace.cpp +++ b/modules/core/src/trace.cpp @@ -2,7 +2,7 @@ // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. -#include +#include "precomp.hpp" #include #include diff --git a/modules/core/src/utils/filesystem.cpp b/modules/core/src/utils/filesystem.cpp index 9af7e14e89..d9d72ecedc 100644 --- a/modules/core/src/utils/filesystem.cpp +++ b/modules/core/src/utils/filesystem.cpp @@ -2,7 +2,7 @@ // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. -#include "precomp.hpp" +#include "../precomp.hpp" #include diff --git a/modules/dnn/src/layers/batch_norm_layer.cpp b/modules/dnn/src/layers/batch_norm_layer.cpp index 504d888a04..b55a0a72fb 100644 --- a/modules/dnn/src/layers/batch_norm_layer.cpp +++ b/modules/dnn/src/layers/batch_norm_layer.cpp @@ -10,8 +10,8 @@ Implementation of Batch Normalization layer. */ #include "../precomp.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #include #ifdef HAVE_OPENCL diff --git a/modules/dnn/src/layers/concat_layer.cpp b/modules/dnn/src/layers/concat_layer.cpp index f9c4494b47..fd55e7c24a 100644 --- a/modules/dnn/src/layers/concat_layer.cpp +++ b/modules/dnn/src/layers/concat_layer.cpp @@ -42,8 +42,8 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #ifdef HAVE_OPENCL #include "opencl_kernels_dnn.hpp" diff --git a/modules/dnn/src/layers/convolution_layer.cpp b/modules/dnn/src/layers/convolution_layer.cpp index 229897618c..84841bf43f 100644 --- a/modules/dnn/src/layers/convolution_layer.cpp +++ b/modules/dnn/src/layers/convolution_layer.cpp @@ -42,8 +42,8 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #include "opencv2/core/hal/hal.hpp" #include "opencv2/core/hal/intrin.hpp" #include diff --git a/modules/dnn/src/layers/detection_output_layer.cpp b/modules/dnn/src/layers/detection_output_layer.cpp index 712d542ed7..dcce8422ba 100644 --- a/modules/dnn/src/layers/detection_output_layer.cpp +++ b/modules/dnn/src/layers/detection_output_layer.cpp @@ -42,7 +42,7 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_inf_engine.hpp" +#include "../op_inf_engine.hpp" #include #include #include "../nms.inl.hpp" diff --git a/modules/dnn/src/layers/elementwise_layers.cpp b/modules/dnn/src/layers/elementwise_layers.cpp index 7394f2ed70..44c8567acf 100644 --- a/modules/dnn/src/layers/elementwise_layers.cpp +++ b/modules/dnn/src/layers/elementwise_layers.cpp @@ -42,8 +42,8 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #include "opencv2/imgproc.hpp" #include #include diff --git a/modules/dnn/src/layers/eltwise_layer.cpp b/modules/dnn/src/layers/eltwise_layer.cpp index 65238318be..01c1f2f4be 100644 --- a/modules/dnn/src/layers/eltwise_layer.cpp +++ b/modules/dnn/src/layers/eltwise_layer.cpp @@ -42,8 +42,8 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #ifdef HAVE_OPENCL #include "opencl_kernels_dnn.hpp" diff --git a/modules/dnn/src/layers/flatten_layer.cpp b/modules/dnn/src/layers/flatten_layer.cpp index 9d12d05c19..dd46b86e69 100644 --- a/modules/dnn/src/layers/flatten_layer.cpp +++ b/modules/dnn/src/layers/flatten_layer.cpp @@ -42,7 +42,7 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_inf_engine.hpp" +#include "../op_inf_engine.hpp" #include #include #include diff --git a/modules/dnn/src/layers/fully_connected_layer.cpp b/modules/dnn/src/layers/fully_connected_layer.cpp index 16c71fe57c..f00d9cfae8 100644 --- a/modules/dnn/src/layers/fully_connected_layer.cpp +++ b/modules/dnn/src/layers/fully_connected_layer.cpp @@ -42,8 +42,8 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #include #ifdef HAVE_OPENCL diff --git a/modules/dnn/src/layers/layers_common.hpp b/modules/dnn/src/layers/layers_common.hpp index 97902138b1..4bb4c317e4 100644 --- a/modules/dnn/src/layers/layers_common.hpp +++ b/modules/dnn/src/layers/layers_common.hpp @@ -47,7 +47,7 @@ #define CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY // dispatched AVX/AVX2 optimizations -#include "layers/layers_common.simd.hpp" +#include "./layers_common.simd.hpp" #include "layers/layers_common.simd_declarations.hpp" #undef CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY diff --git a/modules/dnn/src/layers/lrn_layer.cpp b/modules/dnn/src/layers/lrn_layer.cpp index 0fa541f2a0..2ae10f25da 100644 --- a/modules/dnn/src/layers/lrn_layer.cpp +++ b/modules/dnn/src/layers/lrn_layer.cpp @@ -42,8 +42,8 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/dnn/shape_utils.hpp" #include "opencv2/core/hal/hal.hpp" diff --git a/modules/dnn/src/layers/max_unpooling_layer.cpp b/modules/dnn/src/layers/max_unpooling_layer.cpp index 69fd030b6b..8b7c96f2fc 100644 --- a/modules/dnn/src/layers/max_unpooling_layer.cpp +++ b/modules/dnn/src/layers/max_unpooling_layer.cpp @@ -11,7 +11,7 @@ Implementation of Batch Normalization layer. #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" +#include "../op_halide.hpp" #include #include diff --git a/modules/dnn/src/layers/padding_layer.cpp b/modules/dnn/src/layers/padding_layer.cpp index 52f7b6b9c0..4934524909 100644 --- a/modules/dnn/src/layers/padding_layer.cpp +++ b/modules/dnn/src/layers/padding_layer.cpp @@ -11,7 +11,7 @@ Implementation of padding layer, which adds paddings to input blob. #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" +#include "../op_halide.hpp" #include namespace cv diff --git a/modules/dnn/src/layers/permute_layer.cpp b/modules/dnn/src/layers/permute_layer.cpp index b98365848f..2bf73f2524 100644 --- a/modules/dnn/src/layers/permute_layer.cpp +++ b/modules/dnn/src/layers/permute_layer.cpp @@ -42,7 +42,7 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_inf_engine.hpp" +#include "../op_inf_engine.hpp" #include #include diff --git a/modules/dnn/src/layers/pooling_layer.cpp b/modules/dnn/src/layers/pooling_layer.cpp index faa87a8773..8e6215eef8 100644 --- a/modules/dnn/src/layers/pooling_layer.cpp +++ b/modules/dnn/src/layers/pooling_layer.cpp @@ -43,8 +43,8 @@ #include "../precomp.hpp" #include "layers_common.hpp" #include "opencv2/core/hal/intrin.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #include #include using std::max; diff --git a/modules/dnn/src/layers/prior_box_layer.cpp b/modules/dnn/src/layers/prior_box_layer.cpp index d8ea5b6042..2315d368a0 100644 --- a/modules/dnn/src/layers/prior_box_layer.cpp +++ b/modules/dnn/src/layers/prior_box_layer.cpp @@ -42,7 +42,7 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_inf_engine.hpp" +#include "../op_inf_engine.hpp" #include #include #include diff --git a/modules/dnn/src/layers/region_layer.cpp b/modules/dnn/src/layers/region_layer.cpp index 3f9ba1fc0c..181d8fd9bb 100644 --- a/modules/dnn/src/layers/region_layer.cpp +++ b/modules/dnn/src/layers/region_layer.cpp @@ -43,7 +43,7 @@ #include "../precomp.hpp" #include #include -#include "nms.inl.hpp" +#include "../nms.inl.hpp" #ifdef HAVE_OPENCL #include "opencl_kernels_dnn.hpp" diff --git a/modules/dnn/src/layers/reshape_layer.cpp b/modules/dnn/src/layers/reshape_layer.cpp index 7530ffc59c..906e340411 100644 --- a/modules/dnn/src/layers/reshape_layer.cpp +++ b/modules/dnn/src/layers/reshape_layer.cpp @@ -42,7 +42,7 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_inf_engine.hpp" +#include "../op_inf_engine.hpp" #include namespace cv diff --git a/modules/dnn/src/layers/scale_layer.cpp b/modules/dnn/src/layers/scale_layer.cpp index 34f503e7a8..d32ab56d07 100644 --- a/modules/dnn/src/layers/scale_layer.cpp +++ b/modules/dnn/src/layers/scale_layer.cpp @@ -11,8 +11,8 @@ Implementation of Scale layer. #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #include namespace cv diff --git a/modules/dnn/src/layers/shift_layer.cpp b/modules/dnn/src/layers/shift_layer.cpp index 4a75624502..e0bea5ff90 100644 --- a/modules/dnn/src/layers/shift_layer.cpp +++ b/modules/dnn/src/layers/shift_layer.cpp @@ -10,7 +10,7 @@ Implementation of shift layer, which adds up const values to blob. */ #include "../precomp.hpp" -#include "op_inf_engine.hpp" +#include "../op_inf_engine.hpp" #include namespace cv diff --git a/modules/dnn/src/layers/softmax_layer.cpp b/modules/dnn/src/layers/softmax_layer.cpp index 12c2ec7de4..944173f7b1 100644 --- a/modules/dnn/src/layers/softmax_layer.cpp +++ b/modules/dnn/src/layers/softmax_layer.cpp @@ -42,8 +42,8 @@ #include "../precomp.hpp" #include "layers_common.hpp" -#include "op_halide.hpp" -#include "op_inf_engine.hpp" +#include "../op_halide.hpp" +#include "../op_inf_engine.hpp" #include #include using std::max; diff --git a/modules/dnn/src/nms.cpp b/modules/dnn/src/nms.cpp index f56191f9e0..3adaef165d 100644 --- a/modules/dnn/src/nms.cpp +++ b/modules/dnn/src/nms.cpp @@ -6,7 +6,7 @@ // Third party copyrights are property of their respective owners. #include "precomp.hpp" -#include +#include "nms.inl.hpp" namespace cv { diff --git a/modules/viz/src/precomp.hpp b/modules/viz/src/precomp.hpp index dc5a5db1ea..9596b96f08 100644 --- a/modules/viz/src/precomp.hpp +++ b/modules/viz/src/precomp.hpp @@ -140,13 +140,13 @@ # include /* unlink */ #endif -#include -#include -#include -#include -#include -#include -#include +#include "vtk/vtkOBJWriter.h" +#include "vtk/vtkXYZWriter.h" +#include "vtk/vtkXYZReader.h" +#include "vtk/vtkCloudMatSink.h" +#include "vtk/vtkCloudMatSource.h" +#include "vtk/vtkTrajectorySource.h" +#include "vtk/vtkImageMatSource.h" #include