Skip to content

Commit 05248a3

Browse files
committed
cmake: fix order of MKL libraries, don't pass additional libraries as modules
1 parent 1304ad1 commit 05248a3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cmake/OpenCVFindMKL.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ if(${MKL_VERSION_STR} VERSION_GREATER "11.3.0" OR ${MKL_VERSION_STR} VERSION_EQU
9696
${MKL_ROOT_DIR}/lib
9797
${MKL_ROOT_DIR}/lib/${MKL_ARCH} ${MKL_ROOT_DIR}/../tbb/lib/${MKL_ARCH})
9898

99-
set(mkl_lib_list
100-
mkl_core
101-
mkl_intel_${MKL_ARCH_SUFFIX})
99+
set(mkl_lib_list "mkl_intel_${MKL_ARCH_SUFFIX}")
102100

103101
if(MKL_WITH_TBB)
104102
list(APPEND mkl_lib_list mkl_tbb_thread tbb)
@@ -111,6 +109,8 @@ if(${MKL_VERSION_STR} VERSION_GREATER "11.3.0" OR ${MKL_VERSION_STR} VERSION_EQU
111109
else()
112110
list(APPEND mkl_lib_list mkl_sequential)
113111
endif()
112+
113+
list(APPEND mkl_lib_list mkl_core)
114114
else()
115115
message(STATUS "MKL version ${MKL_VERSION_STR} is not supported")
116116
mkl_fail()

modules/core/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
set(the_description "The Core Functionality")
22
ocv_add_module(core
33
"${OPENCV_HAL_LINKER_LIBS}"
4-
PRIVATE_REQUIRED ${ZLIB_LIBRARIES} "${OPENCL_LIBRARIES}" "${VA_LIBRARIES}" "${LAPACK_LIBRARIES}"
54
OPTIONAL opencv_cudev
65
WRAP java python)
76

@@ -33,5 +32,7 @@ ocv_glob_module_sources(SOURCES "${OPENCV_MODULE_opencv_core_BINARY_DIR}/version
3332
ocv_module_include_directories(${the_module} ${ZLIB_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS})
3433
ocv_create_module(${extra_libs})
3534

35+
ocv_target_link_libraries(${the_module} ${ZLIB_LIBRARIES} "${OPENCL_LIBRARIES}" "${VA_LIBRARIES}" "${LAPACK_LIBRARIES}")
36+
3637
ocv_add_accuracy_tests()
3738
ocv_add_perf_tests()

0 commit comments

Comments
 (0)