Commit d54511ca authored by schultezub's avatar schultezub
Browse files

Added TBB to makefiles

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@186 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent 18a150aa
# Try to find TBB library and include path. Once done this will define:
# TBB_FOUND
# TBB_DEFINITIONS
# TBB_INCLUDE_DIR
# TBB_LIBRARY (containing both debug and release libraries on win32)
# TBB_LICENSE_FILE
IF (WIN32)
SET(TBB_DIR "${TUMVIS_HOME}/ext/tbb" CACHE PATH "If TBB is not found, set this path")
SET(TBB_INCLUDE_DIR "${TBB_DIR}/include")
IF(TUMVIS_MSVC2008)
SET(TBB_CDIR "vc9")
ELSEIF(TUMVIS_MSVC2010)
SET(TBB_CDIR "vc10")
ELSE()
MESSAGE(WARNING "Compiler not supported by makefile, you might be able to fix that...")
ENDIF(TUMVIS_MSVC2008)
# set debug and release library
IF(TUMVIS_WIN32)
SET(TBB_LIBRARY_DEBUG "${TBB_DIR}/lib/ia32/${TBB_CDIR}/tbb_debug.lib")
SET(TBB_DLL_DEBUG "${TBB_DIR}/bin/ia32/${TBB_CDIR}/tbb_debug.dll")
SET(TBB_PDB_DEBUG "${TBB_DIR}/bin/ia32/${TBB_CDIR}/tbb_debug.pdb")
SET(TBB_LIBRARY_RELEASE "${TBB_DIR}/lib/ia32/${TBB_CDIR}/tbb.lib")
SET(TBB_DLL_RELEASE "${TBB_DIR}/bin/ia32/${TBB_CDIR}/tbb.dll")
SET(TBB_PDB_RELEASE "${TBB_DIR}/bin/ia32/${TBB_CDIR}/tbb.pdb")
ELSEIF(TUMVIS_WIN64)
SET(TBB_LIBRARY_DEBUG "${TBB_DIR}/lib/intel64/${TBB_CDIR}/tbb_debug.lib")
SET(TBB_DLL_DEBUG "${TBB_DIR}/bin/intel64/${TBB_CDIR}/tbb_debug.dll")
SET(TBB_PDB_DEBUG "${TBB_DIR}/bin/intel64/${TBB_CDIR}/tbb_debug.pdb")
SET(TBB_LIBRARY_RELEASE "${TBB_DIR}/lib/intel64/${TBB_CDIR}/tbb.lib")
SET(TBB_DLL_RELEASE "${TBB_DIR}/bin/intel64/${TBB_CDIR}/tbb.dll")
SET(TBB_PDB_RELEASE "${TBB_DIR}/bin/intel64/${TBB_CDIR}/tbb.pdb")
ELSE()
MESSAGE(FATAL_ERROR "Neither TUMVIS_WIN32 nor TUMVIS_WIN64 defined!")
ENDIF(TUMVIS_WIN32)
IF (TBB_LIBRARY_DEBUG AND TBB_LIBRARY_RELEASE)
SET(TBB_LIBRARY debug ${TBB_LIBRARY_DEBUG} optimized ${TBB_LIBRARY_RELEASE})
ENDIF(TBB_LIBRARY_DEBUG AND TBB_LIBRARY_RELEASE)
SET(TBB_LICENSE_FILE "${TBB_DIR}/COPYING")
ELSE (WIN32)
FIND_PATH(
TBB_INCLUDE_DIR
NAMES tbb/mutex.h
PATHS ${TBB_DIR}/include /usr/include /usr/local/include /sw/include /opt/local/include
DOC "The directory where tbb/*.h resides"
)
FIND_LIBRARY(
TBB_LIBRARY
NAMES TBB libtbb
PATHS ${TBB_DIR}/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /opt/local/lib
DOC "The TBB library"
)
ENDIF (WIN32)
IF(TBB_INCLUDE_DIR AND TBB_LIBRARY)
SET(TBB_FOUND TRUE)
ELSE(TBB_INCLUDE_DIR AND TBB_LIBRARY)
SET(TBB_FOUND FALSE)
ENDIF(TBB_INCLUDE_DIR AND TBB_LIBRARY)
UNSET(TBB_DIR)
MARK_AS_ADVANCED(TBB_DIR TBB_DIR TBB_INCLUDE_DIR TBB_LIBRARY TBB_LIBRARY_DEBUG TBB_LIBRARY_RELEASE TBB_DLL_DEBUG TBB_DLL_RELEASE)
...@@ -161,5 +161,20 @@ ELSE(GLEW_FOUND) ...@@ -161,5 +161,20 @@ ELSE(GLEW_FOUND)
MESSAGE(FATAL_ERROR "GLEW not found!") MESSAGE(FATAL_ERROR "GLEW not found!")
ENDIF(GLEW_FOUND) ENDIF(GLEW_FOUND)
# TBB
FIND_PACKAGE(TBB REQUIRED)
IF(TBB_FOUND)
MESSAGE(STATUS "* Found TBB")
LIST(APPEND TUMVIS_DEFINITIONS ${TBB_DEFINITIONS})
LIST(APPEND TUMVIS_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIR})
LIST(APPEND TUMVIS_EXTERNAL_LIBRARIES ${TBB_LIBRARY})
LIST(APPEND TUMVIS_EXTERNAL_DEBUG_DLLS ${TBB_DLL_DEBUG})
LIST(APPEND TUMVIS_EXTERNAL_RELEASE_DLLS ${TBB_DLL_RELEASE})
LIST(APPEND TUMVIS_EXTERNAL_LICENSE_FILES ${TBB_LICENSE_FILE})
ELSE(TBB_FOUND)
MESSAGE(FATAL_ERROR "TBB not found!")
ENDIF(TBB_FOUND)
SET(COMMONCONF_PROCESSED TRUE) SET(COMMONCONF_PROCESSED TRUE)
ENDIF(NOT COMMONCONF_PROCESSED) ENDIF(NOT COMMONCONF_PROCESSED)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment