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

Commit 79a341e

Browse files
rusloxsacha
authored andcommitted
Fix Accelerate.framework full path
1 parent 21a7735 commit 79a341e

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

cmake/templates/OpenCVConfig.cmake.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE_MANGLED_PATHS_CONFIGCMAKE@)
108108
set(OpenCV_LIB_COMPONENTS @OPENCV_MODULES_CONFIGCMAKE@)
109109
set(OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@)
110110

111+
if(APPLE)
112+
find_package(accelerate REQUIRED)
113+
endif()
114+
111115
if(NOT TARGET opencv_core)
112116
include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${OpenCV_MODULES_SUFFIX}.cmake)
113117
endif()
@@ -372,4 +376,3 @@ if("@Qt5OpenGL_FOUND@")
372376
find_dependency(Qt5OpenGL)
373377
endif()
374378
# AWP: Qt5 dependencies -- end
375-

modules/core/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,16 @@ endif()
7979

8080
ocv_create_module(${extra_libs})
8181

82+
if(HUNTER_ENABLED AND APPLE)
83+
find_package(accelerate REQUIRED)
84+
set(__lapack_libraries accelerate::accelerate)
85+
else()
86+
set(__lapack_libraries ${LAPACK_LIBRARIES})
87+
endif()
88+
8289
ocv_target_link_libraries(${the_module} LINK_PRIVATE
8390
"${ZLIB_LIBRARIES}" "${OPENCL_LIBRARIES}" "${VA_LIBRARIES}"
84-
"${LAPACK_LIBRARIES}" "${CPUFEATURES_LIBRARIES}" "${HALIDE_LIBRARIES}"
91+
"${__lapack_libraries}" "${CPUFEATURES_LIBRARIES}" "${HALIDE_LIBRARIES}"
8592
"${ITT_LIBRARIES}"
8693
"${OPENCV_HAL_LINKER_LIBS}"
8794
)

modules/dnn/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,15 @@ endif()
7272

7373
set(include_dirs ${fw_inc})
7474
set(sources_options "")
75-
set(libs libprotobuf ${LAPACK_LIBRARIES})
75+
76+
if(HUNTER_ENABLED AND APPLE)
77+
find_package(accelerate REQUIRED)
78+
set(__lapack_libraries accelerate::accelerate)
79+
else()
80+
set(__lapack_libraries ${LAPACK_LIBRARIES})
81+
endif()
82+
83+
set(libs libprotobuf ${__lapack_libraries})
7684
if(OPENCV_DNN_OPENCL AND HAVE_OPENCL)
7785
list(APPEND include_dirs ${OPENCL_INCLUDE_DIRS})
7886
else()

0 commit comments

Comments
 (0)