diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt index db673c7a2..cfa14cdcd 100644 --- a/modules/core/CMakeLists.txt +++ b/modules/core/CMakeLists.txt @@ -3,14 +3,14 @@ ocv_add_module(core ${ZLIB_LIBRARIES}) ocv_module_include_directories(${ZLIB_INCLUDE_DIR}) if(HAVE_CUDA) - ocv_source_group("Src\\Cuda" GLOB "src/cuda/*.cu") - ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpu/src" "${OpenCV_SOURCE_DIR}/modules/gpu/src/cuda" ${CUDA_INCLUDE_DIRS}) + ocv_source_group("Src\\Cuda" GLOB "src/cuda/*.cu") + ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpu/include" ${CUDA_INCLUDE_DIRS}) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef) - + file(GLOB lib_cuda "src/cuda/*.cu") ocv_cuda_compile(cuda_objs ${lib_cuda}) - + set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) else() set(lib_cuda "") diff --git a/modules/gpu/CMakeLists.txt b/modules/gpu/CMakeLists.txt index 9963ea754..4918ab4f2 100644 --- a/modules/gpu/CMakeLists.txt +++ b/modules/gpu/CMakeLists.txt @@ -7,11 +7,11 @@ ocv_add_module(gpu opencv_imgproc opencv_calib3d opencv_objdetect opencv_video o ocv_module_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/cuda" "${CMAKE_CURRENT_SOURCE_DIR}/../highgui/src") -file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h") -file(GLOB lib_int_hdrs "src/*.hpp" "src/*.h") +file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h") +file(GLOB lib_device_hdrs "include/opencv2/${name}/device/*.hpp" "include/opencv2/${name}/device/*.h") +file(GLOB lib_device_hdrs_detail "include/opencv2/${name}/device/detail/*.hpp" "include/opencv2/${name}/device/detail/*.h") +file(GLOB lib_int_hdrs "src/*.hpp" "src/*.h") file(GLOB lib_cuda_hdrs "src/cuda/*.hpp" "src/cuda/*.h") -file(GLOB lib_device_hdrs "src/opencv2/gpu/device/*.hpp" "src/opencv2/gpu/device/*.h") -file(GLOB lib_device_hdrs_detail "src/opencv2/gpu/device/detail/*.hpp" "src/opencv2/gpu/device/detail/*.h") file(GLOB lib_srcs "src/*.cpp") file(GLOB lib_cuda "src/cuda/*.cu*") @@ -74,8 +74,8 @@ else() endif() ocv_set_module_sources( - HEADERS ${lib_hdrs} - SOURCES ${lib_int_hdrs} ${lib_cuda_hdrs} ${lib_device_hdrs} ${lib_device_hdrs_detail} ${lib_srcs} ${lib_cuda} ${ncv_files} ${cuda_objs} + HEADERS ${lib_hdrs} ${lib_device_hdrs} ${lib_device_hdrs_detail} + SOURCES ${lib_int_hdrs} ${lib_cuda_hdrs} ${lib_srcs} ${lib_cuda} ${ncv_files} ${cuda_objs} ) ocv_create_module(${cuda_link_libs}) diff --git a/modules/gpu/src/opencv2/gpu/device/border_interpolate.hpp b/modules/gpu/include/opencv2/gpu/device/border_interpolate.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/border_interpolate.hpp rename to modules/gpu/include/opencv2/gpu/device/border_interpolate.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/color.hpp b/modules/gpu/include/opencv2/gpu/device/color.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/color.hpp rename to modules/gpu/include/opencv2/gpu/device/color.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/common.hpp b/modules/gpu/include/opencv2/gpu/device/common.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/common.hpp rename to modules/gpu/include/opencv2/gpu/device/common.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/datamov_utils.hpp b/modules/gpu/include/opencv2/gpu/device/datamov_utils.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/datamov_utils.hpp rename to modules/gpu/include/opencv2/gpu/device/datamov_utils.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/detail/color_detail.hpp b/modules/gpu/include/opencv2/gpu/device/detail/color_detail.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/detail/color_detail.hpp rename to modules/gpu/include/opencv2/gpu/device/detail/color_detail.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/detail/reduction_detail.hpp b/modules/gpu/include/opencv2/gpu/device/detail/reduction_detail.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/detail/reduction_detail.hpp rename to modules/gpu/include/opencv2/gpu/device/detail/reduction_detail.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/detail/transform_detail.hpp b/modules/gpu/include/opencv2/gpu/device/detail/transform_detail.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/detail/transform_detail.hpp rename to modules/gpu/include/opencv2/gpu/device/detail/transform_detail.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/detail/type_traits_detail.hpp b/modules/gpu/include/opencv2/gpu/device/detail/type_traits_detail.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/detail/type_traits_detail.hpp rename to modules/gpu/include/opencv2/gpu/device/detail/type_traits_detail.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/detail/vec_distance_detail.hpp b/modules/gpu/include/opencv2/gpu/device/detail/vec_distance_detail.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/detail/vec_distance_detail.hpp rename to modules/gpu/include/opencv2/gpu/device/detail/vec_distance_detail.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/dynamic_smem.hpp b/modules/gpu/include/opencv2/gpu/device/dynamic_smem.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/dynamic_smem.hpp rename to modules/gpu/include/opencv2/gpu/device/dynamic_smem.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/emulation.hpp b/modules/gpu/include/opencv2/gpu/device/emulation.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/emulation.hpp rename to modules/gpu/include/opencv2/gpu/device/emulation.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/filters.hpp b/modules/gpu/include/opencv2/gpu/device/filters.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/filters.hpp rename to modules/gpu/include/opencv2/gpu/device/filters.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/funcattrib.hpp b/modules/gpu/include/opencv2/gpu/device/funcattrib.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/funcattrib.hpp rename to modules/gpu/include/opencv2/gpu/device/funcattrib.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/functional.hpp b/modules/gpu/include/opencv2/gpu/device/functional.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/functional.hpp rename to modules/gpu/include/opencv2/gpu/device/functional.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/limits.hpp b/modules/gpu/include/opencv2/gpu/device/limits.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/limits.hpp rename to modules/gpu/include/opencv2/gpu/device/limits.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/saturate_cast.hpp b/modules/gpu/include/opencv2/gpu/device/saturate_cast.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/saturate_cast.hpp rename to modules/gpu/include/opencv2/gpu/device/saturate_cast.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/scan.hpp b/modules/gpu/include/opencv2/gpu/device/scan.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/scan.hpp rename to modules/gpu/include/opencv2/gpu/device/scan.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/static_check.hpp b/modules/gpu/include/opencv2/gpu/device/static_check.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/static_check.hpp rename to modules/gpu/include/opencv2/gpu/device/static_check.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/transform.hpp b/modules/gpu/include/opencv2/gpu/device/transform.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/transform.hpp rename to modules/gpu/include/opencv2/gpu/device/transform.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/type_traits.hpp b/modules/gpu/include/opencv2/gpu/device/type_traits.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/type_traits.hpp rename to modules/gpu/include/opencv2/gpu/device/type_traits.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/utility.hpp b/modules/gpu/include/opencv2/gpu/device/utility.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/utility.hpp rename to modules/gpu/include/opencv2/gpu/device/utility.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/vec_distance.hpp b/modules/gpu/include/opencv2/gpu/device/vec_distance.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/vec_distance.hpp rename to modules/gpu/include/opencv2/gpu/device/vec_distance.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/vec_math.hpp b/modules/gpu/include/opencv2/gpu/device/vec_math.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/vec_math.hpp rename to modules/gpu/include/opencv2/gpu/device/vec_math.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/vec_traits.hpp b/modules/gpu/include/opencv2/gpu/device/vec_traits.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/vec_traits.hpp rename to modules/gpu/include/opencv2/gpu/device/vec_traits.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/warp.hpp b/modules/gpu/include/opencv2/gpu/device/warp.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/warp.hpp rename to modules/gpu/include/opencv2/gpu/device/warp.hpp diff --git a/modules/gpu/src/opencv2/gpu/device/warp_reduce.hpp b/modules/gpu/include/opencv2/gpu/device/warp_reduce.hpp similarity index 100% rename from modules/gpu/src/opencv2/gpu/device/warp_reduce.hpp rename to modules/gpu/include/opencv2/gpu/device/warp_reduce.hpp