From 05248a3dea893ba8683558b90854196ab3cfa5d0 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 15 Feb 2017 17:12:28 +0300 Subject: [PATCH] cmake: fix order of MKL libraries, don't pass additional libraries as modules --- cmake/OpenCVFindMKL.cmake | 6 +++--- modules/core/CMakeLists.txt | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/OpenCVFindMKL.cmake b/cmake/OpenCVFindMKL.cmake index 0f5462acd2..fd95dcb446 100644 --- a/cmake/OpenCVFindMKL.cmake +++ b/cmake/OpenCVFindMKL.cmake @@ -96,9 +96,7 @@ if(${MKL_VERSION_STR} VERSION_GREATER "11.3.0" OR ${MKL_VERSION_STR} VERSION_EQU ${MKL_ROOT_DIR}/lib ${MKL_ROOT_DIR}/lib/${MKL_ARCH} ${MKL_ROOT_DIR}/../tbb/lib/${MKL_ARCH}) - set(mkl_lib_list - mkl_core - mkl_intel_${MKL_ARCH_SUFFIX}) + set(mkl_lib_list "mkl_intel_${MKL_ARCH_SUFFIX}") if(MKL_WITH_TBB) 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 else() list(APPEND mkl_lib_list mkl_sequential) endif() + + list(APPEND mkl_lib_list mkl_core) else() message(STATUS "MKL version ${MKL_VERSION_STR} is not supported") mkl_fail() diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt index 41da825457..01b272e97e 100644 --- a/modules/core/CMakeLists.txt +++ b/modules/core/CMakeLists.txt @@ -1,7 +1,6 @@ set(the_description "The Core Functionality") ocv_add_module(core "${OPENCV_HAL_LINKER_LIBS}" - PRIVATE_REQUIRED ${ZLIB_LIBRARIES} "${OPENCL_LIBRARIES}" "${VA_LIBRARIES}" "${LAPACK_LIBRARIES}" OPTIONAL opencv_cudev WRAP java python) @@ -33,5 +32,7 @@ ocv_glob_module_sources(SOURCES "${OPENCV_MODULE_opencv_core_BINARY_DIR}/version ocv_module_include_directories(${the_module} ${ZLIB_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS}) ocv_create_module(${extra_libs}) +ocv_target_link_libraries(${the_module} ${ZLIB_LIBRARIES} "${OPENCL_LIBRARIES}" "${VA_LIBRARIES}" "${LAPACK_LIBRARIES}") + ocv_add_accuracy_tests() ocv_add_perf_tests()