|
|
|
@ -615,28 +615,14 @@ if (WITH_TBB) |
|
|
|
|
include_directories(${TBB_INCLUDE_DIRS}) |
|
|
|
|
endif() |
|
|
|
|
link_directories(${TBB_LIBRARY_DIRS}) |
|
|
|
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${TBB_LIBRARIES}) |
|
|
|
|
else() |
|
|
|
|
set(TBB_DEFAULT_INCLUDE_DIRS |
|
|
|
|
"/opt/intel/tbb" |
|
|
|
|
"/usr/local/include" |
|
|
|
|
"/usr/include") |
|
|
|
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${TBB_LIBRARIES}) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
if (APPLE) |
|
|
|
|
set(TBB_DEFAULT_INCLUDE_DIRS |
|
|
|
|
"/usr/local/include" |
|
|
|
|
"/usr/include") |
|
|
|
|
endif() |
|
|
|
|
if (WIN32) |
|
|
|
|
set(TBB_DEFAULT_INCLUDE_DIRS |
|
|
|
|
"C:/Program Files/Intel/TBB" |
|
|
|
|
"C:/Program Files (x86)/Intel/TBB") |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if (NOT HAVE_TBB) |
|
|
|
|
find_path(TBB_INCLUDE_DIR "tbb/tbb.h" |
|
|
|
|
PATHS TBB_DEFAULT_INCLUDE_DIRS |
|
|
|
|
DOC "The path to TBB headers") |
|
|
|
|
set(TBB_DEFAULT_INCLUDE_DIRS "/opt/intel/tbb" "/usr/local/include" "/usr/include" "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB") |
|
|
|
|
|
|
|
|
|
find_path(TBB_INCLUDE_DIR "tbb/tbb.h" PATHS ${TBB_DEFAULT_INCLUDE_DIRS} DOC "The path to TBB headers") |
|
|
|
|
if (TBB_INCLUDE_DIR) |
|
|
|
|
if (UNIX) |
|
|
|
|
set(TBB_LIB_DIR "${TBB_INCLUDE_DIR}/../lib" CACHE PATH "Full path of TBB library directory") |
|
|
|
@ -647,53 +633,39 @@ if (WITH_TBB) |
|
|
|
|
elseif (UNIX) |
|
|
|
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} tbb) |
|
|
|
|
elseif (WIN32) |
|
|
|
|
if (CMAKE_COMPILER_IS_GNUCXX) |
|
|
|
|
set(TBB_LIB_DIR "${TBB_INCLUDE_DIR}/../lib" CACHE PATH "Full path of TBB library directory") |
|
|
|
|
link_directories("${TBB_LIB_DIR}") |
|
|
|
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} tbb) |
|
|
|
|
else() |
|
|
|
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*) |
|
|
|
|
set(X86_64 1) |
|
|
|
|
endif() |
|
|
|
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64*) |
|
|
|
|
set(X86_64 1) |
|
|
|
|
endif() |
|
|
|
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686*) |
|
|
|
|
set(X86 1) |
|
|
|
|
endif() |
|
|
|
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i386*) |
|
|
|
|
set(X86 1) |
|
|
|
|
endif() |
|
|
|
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86*) |
|
|
|
|
set(X86 1) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
set(_TBB_LIB_PATH "${TBB_INCLUDE_DIR}/../lib") |
|
|
|
|
if (X86_64) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/intel64") |
|
|
|
|
elseif(X86) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/ia32") |
|
|
|
|
endif() |
|
|
|
|
if (MSVC80) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc8") |
|
|
|
|
elseif(MSVC90) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc9") |
|
|
|
|
endif() |
|
|
|
|
elseif(MSVC10) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc10") |
|
|
|
|
endif() |
|
|
|
|
set(TBB_LIB_DIR "${_TBB_LIB_PATH}" CACHE PATH "Full path of TBB library directory") |
|
|
|
|
link_directories("${TBB_LIB_DIR}") |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
set(HAVE_TBB 1) |
|
|
|
|
if(NOT "${TBB_INCLUDE_DIR}" STREQUAL "") |
|
|
|
|
include_directories("${TBB_INCLUDE_DIR}") |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
#endif(WITH_TBB) |
|
|
|
|
if (CMAKE_COMPILER_IS_GNUCXX) |
|
|
|
|
set(TBB_LIB_DIR "${TBB_INCLUDE_DIR}/../lib" CACHE PATH "Full path of TBB library directory") |
|
|
|
|
link_directories("${TBB_LIB_DIR}") |
|
|
|
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} tbb) |
|
|
|
|
else() |
|
|
|
|
get_filename_component(_TBB_LIB_PATH "${TBB_INCLUDE_DIR}/../lib" ABSOLUTE) |
|
|
|
|
|
|
|
|
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*|x86_64*) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/intel64") |
|
|
|
|
endif() |
|
|
|
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86*|i386*|i686*) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/ia32") |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if (MSVC80) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc8") |
|
|
|
|
elseif(MSVC90) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc9") |
|
|
|
|
elseif(MSVC10) |
|
|
|
|
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc10") |
|
|
|
|
endif() |
|
|
|
|
set(TBB_LIB_DIR "${_TBB_LIB_PATH}" CACHE PATH "Full path of TBB library directory") |
|
|
|
|
link_directories("${TBB_LIB_DIR}") |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
set(HAVE_TBB 1) |
|
|
|
|
if(NOT "${TBB_INCLUDE_DIR}" STREQUAL "") |
|
|
|
|
include_directories("${TBB_INCLUDE_DIR}") |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
endif(WITH_TBB) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
############################ Intel IPP ############################# |
|
|
|
|