Merge pull request #7687 from apavlenko:vx-hal

pull/7901/head
Alexander Alekhin 8 years ago
commit 8d6500be20
  1. 21
      3rdparty/openvx/CMakeLists.txt
  2. 19
      3rdparty/openvx/hal/CMakeLists.txt
  3. 4
      3rdparty/openvx/hal/README.md
  4. 0
      3rdparty/openvx/hal/openvx_hal.cpp
  5. 0
      3rdparty/openvx/hal/openvx_hal.hpp

@ -1,18 +1,7 @@
add_library(openvx_hal STATIC src/openvx_hal.cpp include/openvx_hal.hpp include/ivx.hpp include/ivx_lib_debug.hpp) if(NOT HAVE_OPENVX)
target_include_directories(openvx_hal PUBLIC message(STATUS "OpenVX is not available, disabling openvx-related HAL and stuff")
${CMAKE_CURRENT_SOURCE_DIR}/include return()
${CMAKE_SOURCE_DIR}/modules/core/include
${CMAKE_SOURCE_DIR}/modules/imgproc/include
${OPENVX_INCLUDE_DIR})
target_link_libraries(openvx_hal LINK_PUBLIC ${OPENVX_LIBRARIES})
set_target_properties(openvx_hal PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
set_target_properties(openvx_hal PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH})
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(openvx_hal EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif() endif()
set(OPENVX_HAL_FOUND TRUE PARENT_SCOPE) set(OPENCV_3P_OPENVX_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(OPENVX_HAL_VERSION 0.0.1 PARENT_SCOPE) add_subdirectory(hal)
set(OPENVX_HAL_LIBRARIES "openvx_hal" PARENT_SCOPE)
set(OPENVX_HAL_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/openvx_hal.hpp" PARENT_SCOPE)
set(OPENVX_HAL_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include" "${OPENVX_INCLUDE_DIR}" PARENT_SCOPE)

@ -0,0 +1,19 @@
add_library(openvx_hal STATIC openvx_hal.cpp openvx_hal.hpp ${OPENCV_3P_OPENVX_DIR}/include/ivx.hpp ${OPENCV_3P_OPENVX_DIR}/include/ivx_lib_debug.hpp)
target_include_directories(openvx_hal PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${OPENCV_3P_OPENVX_DIR}/include
${CMAKE_SOURCE_DIR}/modules/core/include
${CMAKE_SOURCE_DIR}/modules/imgproc/include
${OPENVX_INCLUDE_DIR})
target_link_libraries(openvx_hal LINK_PUBLIC ${OPENVX_LIBRARIES})
set_target_properties(openvx_hal PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
set_target_properties(openvx_hal PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH})
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(openvx_hal EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
set(OPENVX_HAL_FOUND TRUE CACHE INTERNAL "")
set(OPENVX_HAL_VERSION 0.0.1 CACHE INTERNAL "")
set(OPENVX_HAL_LIBRARIES "openvx_hal" CACHE INTERNAL "")
set(OPENVX_HAL_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/openvx_hal.hpp" CACHE INTERNAL "")
set(OPENVX_HAL_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}" "${OPENCV_3P_OPENVX_DIR}/include" "${OPENVX_INCLUDE_DIR}" CACHE INTERNAL "")

@ -0,0 +1,4 @@
#OpenVX-based HAL implementation.
It's built when OpenVX is available (`HAVE_OPENVX`).
To build OpenCV with OpenVX support add the following **cmake** options:
`-DOPENVX_ROOT=/path/to/prebuilt/openvx -DWITH_OPENVX=YES`
Loading…
Cancel
Save