Skip to content

Commit 0669c34

Browse files
ruslorbsheth
authored andcommitted
Fix Accelerate.framework full path
1 parent 1862989 commit 0669c34

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

cmake/templates/OpenCVConfig.cmake.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ endforeach()
122122
unset(__d)
123123

124124

125+
if(APPLE)
126+
find_package(accelerate REQUIRED)
127+
endif()
128+
125129
if(NOT TARGET opencv_core)
126130
include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${OpenCV_MODULES_SUFFIX}.cmake)
127131
endif()
@@ -416,4 +420,3 @@ if("@Qt5OpenGL_FOUND@")
416420
find_dependency(Qt5OpenGL)
417421
endif()
418422
# AWP: Qt5 dependencies -- end
419-

modules/core/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,17 @@ endif()
143143

144144
ocv_create_module(${extra_libs})
145145

146+
if(HUNTER_ENABLED AND APPLE)
147+
find_package(accelerate REQUIRED)
148+
set(__lapack_libraries accelerate::accelerate)
149+
else()
150+
set(__lapack_libraries ${LAPACK_LIBRARIES})
151+
endif()
152+
146153
ocv_target_link_libraries(${the_module} PRIVATE
147154
"${ZLIB_LIBRARIES}" "${OPENCL_LIBRARIES}" "${VA_LIBRARIES}"
148155
"${OPENGL_LIBRARIES}"
149-
"${LAPACK_LIBRARIES}" "${CPUFEATURES_LIBRARIES}" "${HALIDE_LIBRARIES}"
156+
"${__lapack_libraries}" "${CPUFEATURES_LIBRARIES}" "${HALIDE_LIBRARIES}"
150157
"${ITT_LIBRARIES}"
151158
"${OPENCV_HAL_LINKER_LIBS}"
152159
)

modules/dnn/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,14 @@ endif()
120120

121121
set(sources_options "")
122122

123-
list(APPEND libs ${LAPACK_LIBRARIES})
123+
if(HUNTER_ENABLED AND APPLE)
124+
find_package(accelerate REQUIRED)
125+
set(__lapack_libraries accelerate::accelerate)
126+
else()
127+
set(__lapack_libraries ${LAPACK_LIBRARIES})
128+
endif()
129+
130+
list(APPEND libs ${__lapack_libraries})
124131
if(OPENCV_DNN_OPENCL AND HAVE_OPENCL)
125132
list(APPEND include_dirs ${OPENCL_INCLUDE_DIRS})
126133
else()

0 commit comments

Comments
 (0)