Commit 79ffaa8c authored by Maksim Shabunin's avatar Maksim Shabunin

Fixed cutom_hal.hpp file generation

parent 72774380
...@@ -606,6 +606,7 @@ include(cmake/OpenCVDetectVTK.cmake) ...@@ -606,6 +606,7 @@ include(cmake/OpenCVDetectVTK.cmake)
# Package config in: OpenCV_HALConfig.cmake or opencv_hal-config.cmake # Package config in: OpenCV_HALConfig.cmake or opencv_hal-config.cmake
# Use variables: OpenCV_HAL_LIBRARIES, OpenCV_HAL_HEADERS and OpenCV_HAL_INCLUDE_DIRS variables # Use variables: OpenCV_HAL_LIBRARIES, OpenCV_HAL_HEADERS and OpenCV_HAL_INCLUDE_DIRS variables
find_package(OpenCV_HAL CONFIG QUIET) find_package(OpenCV_HAL CONFIG QUIET)
set(_includes "")
if (OpenCV_HAL_FOUND) if (OpenCV_HAL_FOUND)
# 1. libraries # 1. libraries
foreach (l ${OpenCV_HAL_LIBRARIES}) foreach (l ${OpenCV_HAL_LIBRARIES})
...@@ -613,15 +614,14 @@ if (OpenCV_HAL_FOUND) ...@@ -613,15 +614,14 @@ if (OpenCV_HAL_FOUND)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${l}) set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${l})
endforeach() endforeach()
# 2. headers # 2. headers
set(_includes "")
foreach (h ${OpenCV_HAL_HEADERS}) foreach (h ${OpenCV_HAL_HEADERS})
set(_includes "${_includes}\n#include \"${h}\"") set(_includes "${_includes}\n#include \"${h}\"")
endforeach() endforeach()
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/custom_hal.hpp.in" "${CMAKE_BINARY_DIR}/custom_hal.hpp" @ONLY)
unset(_includes)
# 3. include paths # 3. include paths
ocv_include_directories(${OpenCV_HAL_INCLUDE_DIRS}) ocv_include_directories(${OpenCV_HAL_INCLUDE_DIRS})
endif() endif()
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/custom_hal.hpp.in" "${CMAKE_BINARY_DIR}/custom_hal.hpp" @ONLY)
unset(_includes)
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Add CUDA libraries (needed for apps/tools, samples) # Add CUDA libraries (needed for apps/tools, samples)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment