diff --git a/cmake/modules/FindMKL.cmake b/cmake/modules/FindMKL.cmake index ef9d53379..80adeafd7 100644 --- a/cmake/modules/FindMKL.cmake +++ b/cmake/modules/FindMKL.cmake @@ -5,11 +5,16 @@ # MKL_LIBRARIES - The libraries needed to use mkl # MKL_DEFINITIONS - Compiler switches required for using mkl -find_path(MKL_INCLUDE_DIRS +find_path(MKL_INCLUDE_DIR NAMES mkl.h HINTS $ENV{MKL_DIR}/include PATHS) +find_path(MKL_FFTW_INCLUDE_DIR + NAMES fftw3.h + HINTS $ENV{MKL_DIR}/include/fftw + PATHS) + find_library(MKL_LIBRARIES NAMES mkl_rt HINTS $ENV{MKL_DIR}/lib/intel64 @@ -31,6 +36,7 @@ find_library(MKL_SEQ PATHS) set(MKL_STATIC_LIBRARIES -Wl,--start-group ${MKL_CORE} ${MKL_ILP} ${MKL_SEQ} -Wl,--end-group -lpthread -lm -ldl) +set(MKL_INCLUDE_DIRS ${MKL_INCLUDE_DIR} ${MKL_FFTW_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set MKL_FOUND to TRUE diff --git a/srslte/CMakeLists.txt b/srslte/CMakeLists.txt index 29f471c4f..1e86e01c3 100644 --- a/srslte/CMakeLists.txt +++ b/srslte/CMakeLists.txt @@ -46,7 +46,6 @@ add_custom_target (add_srslte_headers SOURCES ${HEADERS_ALL}) find_package(MKL) if(MKL_FOUND) include_directories(${MKL_INCLUDE_DIRS}) - include_directories(${MKL_INCLUDE_DIRS}/fftw) link_directories(${MKL_LIBRARY_DIRS}) else(MKL_FOUND) find_package(FFTW3F REQUIRED)