Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.

Commit

Permalink
Fix Accelerate.framework full path
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Apr 3, 2019
1 parent a565cb6 commit 08a9e94
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cmake/templates/OpenCVConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE_MANGLED_PATHS_CONFIGCMAKE@)
set(OpenCV_LIB_COMPONENTS @OPENCV_MODULES_CONFIGCMAKE@)
set(OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@)

if(APPLE)
find_package(accelerate REQUIRED)
endif()

if(NOT TARGET opencv_core)
include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${OpenCV_MODULES_SUFFIX}.cmake)
endif()
Expand Down Expand Up @@ -372,4 +376,3 @@ if("@Qt5OpenGL_FOUND@")
find_dependency(Qt5OpenGL)
endif()
# AWP: Qt5 dependencies -- end

9 changes: 8 additions & 1 deletion modules/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,16 @@ endif()

ocv_create_module(${extra_libs})

if(HUNTER_ENABLED AND APPLE)
find_package(accelerate REQUIRED)
set(__lapack_libraries accelerate::accelerate)
else()
set(__lapack_libraries ${LAPACK_LIBRARIES})
endif()

ocv_target_link_libraries(${the_module} LINK_PRIVATE
"${ZLIB_LIBRARIES}" "${OPENCL_LIBRARIES}" "${VA_LIBRARIES}"
"${LAPACK_LIBRARIES}" "${CPUFEATURES_LIBRARIES}" "${HALIDE_LIBRARIES}"
"${__lapack_libraries}" "${CPUFEATURES_LIBRARIES}" "${HALIDE_LIBRARIES}"
"${ITT_LIBRARIES}"
"${OPENCV_HAL_LINKER_LIBS}"
)
Expand Down
10 changes: 9 additions & 1 deletion modules/dnn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,15 @@ endif()

set(include_dirs ${fw_inc})
set(sources_options "")
set(libs libprotobuf ${LAPACK_LIBRARIES})

if(HUNTER_ENABLED AND APPLE)
find_package(accelerate REQUIRED)
set(__lapack_libraries accelerate::accelerate)
else()
set(__lapack_libraries ${LAPACK_LIBRARIES})
endif()

set(libs libprotobuf ${__lapack_libraries})
if(OPENCV_DNN_OPENCL AND HAVE_OPENCL)
list(APPEND include_dirs ${OPENCL_INCLUDE_DIRS})
else()
Expand Down

0 comments on commit 08a9e94

Please sign in to comment.