Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see https://gitlab.lrz.de/profile/account). Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at https://doku.lrz.de/display/PUBLIC/GitLab . Thank you!

Commit 5889d2b8 authored by Jakob Weiss's avatar Jakob Weiss

Further necessary updates for VS 17

parent 3a2fa399
# 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)
IF(NOT TBB_ROOT)
# check environment variables
IF(NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
SET(TbbDirectory $ENV{TBB_INSTALL_DIR})
ENDIF(NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
# check default install directory
set(_TbbSeachPaths "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB" "${CampvisHome}/ext/tbb")
FIND_PATH(
TBB_ROOT
NAMES include/tbb/tbb.h
PATHS ${_TbbSeachPaths}
DOC "Intel TBB directory with includes, libs and dlls (i.e. where you extracted the binary distribution from threadingbuildingblocks.org.)"
)
IF(NOT TBB_ROOT)
MESSAGE(FATAL_ERROR "Could not find Intel TBB. Please set TBB_ROOT to the Intel TBB directory with includes, libs and dlls (i.e. where you extracted the binary distribution from threadingbuildingblocks.org.)")
ENDIF()
ENDIF()
SET(TbbDirectory ${TBB_ROOT})
IF(CAMPVIS_MSVC2010)
SET(TbbCompilerDirectory "vc10")
ELSEIF(CAMPVIS_MSVC11)
SET(TbbCompilerDirectory "vc11")
ELSEIF(CAMPVIS_MSVC12)
SET(TbbCompilerDirectory "vc12")
ELSEIF(CAMPVIS_MSVC14)
SET(TbbCompilerDirectory "vc14")
ELSEIF(CAMPVIS_MSVC15)
SET(TbbCompilerDirectory "vc14")
ELSE()
MESSAGE(WARNING "Compiler not supported by makefile, you might be able to fix that...")
ENDIF(CAMPVIS_MSVC2010)
FIND_PATH(
TBB_INCLUDE_DIR
NAMES tbb/tbb.h
PATHS ${TbbDirectory}/include
DOC "Intel TBB include directory (i.e. where tbb/tbb.h is)"
)
# set debug and release library
IF(CAMPVIS_WIN32)
SET(TbbPlatformDirectory "ia32")
ELSEIF(CAMPVIS_WIN64)
SET(TbbPlatformDirectory "intel64")
ELSE()
MESSAGE(FATAL_ERROR "Neither CAMPVIS_WIN32 nor CAMPVIS_WIN64 defined!")
ENDIF(CAMPVIS_WIN32)
SET(TBB_LIBRARY_DEBUG "${TbbDirectory}/lib/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbb_debug.lib")
SET(TBB_DLL_DEBUG "${TbbDirectory}/bin/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbb_debug.dll")
SET(TBB_PDB_DEBUG "${TbbDirectory}/bin/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbb_debug.pdb")
SET(TBB_LIBRARY_RELEASE "${TbbDirectory}/lib/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbb.lib")
SET(TBB_DLL_RELEASE "${TbbDirectory}/bin/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbb.dll")
SET(TBB_PDB_RELEASE "${TbbDirectory}/bin/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbb.pdb")
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_MALLOC_LIBRARY_DEBUG "${TbbDirectory}/lib/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbbmalloc_debug.lib")
SET(TBB_MALLOC_DLL_DEBUG "${TbbDirectory}/bin/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbbmalloc_debug.dll")
SET(TBB_MALLOC_PDB_DEBUG "${TbbDirectory}/bin/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbbmalloc_debug.pdb")
SET(TBB_MALLOC_LIBRARY_RELEASE "${TbbDirectory}/lib/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbbmalloc.lib")
SET(TBB_MALLOC_DLL_RELEASE "${TbbDirectory}/bin/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbbmalloc.dll")
SET(TBB_MALLOC_PDB_RELEASE "${TbbDirectory}/bin/${TbbPlatformDirectory}/${TbbCompilerDirectory}/tbbmalloc.pdb")
IF(TBB_MALLOC_LIBRARY_DEBUG AND TBB_MALLOC_LIBRARY_RELEASE)
SET(TBB_MALLOC_LIBRARY debug ${TBB_MALLOC_LIBRARY_DEBUG} optimized ${TBB_MALLOC_LIBRARY_RELEASE})
ENDIF(TBB_MALLOC_LIBRARY_DEBUG AND TBB_MALLOC_LIBRARY_RELEASE)
SET(TBB_LICENSE_FILE "${TbbDirectory}/COPYING")
ELSE (WIN32)
FIND_PATH(
TBB_INCLUDE_DIR
NAMES tbb/mutex.h
PATHS ${TbbDirectory}/include /usr/include /usr/local/include /sw/include /opt/local/include
DOC "The directory where tbb/*.h resides"
)
FIND_LIBRARY(
TBB_LIBRARY
NAMES libtbb.so
PATHS ${TbbDirectory}/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /opt/local/lib
DOC "The TBB library"
)
FIND_LIBRARY(
TBB_MALLOC_LIBRARY
NAMES libtbbmalloc.so
PATHS ${TbbDirectory}/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /opt/local/lib
DOC "The TBB malloc 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(TbbDirectory)
MARK_AS_ADVANCED(TbbDirectory TbbDirectory TBB_INCLUDE_DIR TBB_LIBRARY TBB_LIBRARY_DEBUG TBB_LIBRARY_RELEASE TBB_DLL_DEBUG TBB_DLL_RELEASE)
This diff is collapsed.
......@@ -254,13 +254,15 @@ ENDIF(GLEW_FOUND)
FIND_PACKAGE(TBB REQUIRED)
IF(TBB_FOUND)
MESSAGE(STATUS "* Found TBB")
LIST(APPEND CampvisGlobalDefinitions ${TBB_DEFINITIONS})
LIST(APPEND CampvisGlobalIncludeDirs ${TBB_INCLUDE_DIR})
LIST(APPEND CampvisGlobalExternalLibs ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY})
#LIST(APPEND CampvisGlobalDefinitions ${TBB_DEFINITIONS})
#LIST(APPEND CampvisGlobalIncludeDirs ${TBB_INCLUDE_DIR})
LIST(APPEND CampvisGlobalExternalLibs TBB::tbb TBB::tbbmalloc)
LIST(APPEND CampvisExternalDllsDebug ${TBB_DLL_DEBUG} ${TBB_MALLOC_DLL_DEBUG})
LIST(APPEND CampvisExternalDllsRelease ${TBB_DLL_RELEASE} ${TBB_MALLOC_DLL_RELEASE})
LIST(APPEND CampvisExternalLicenseFiles ${TBB_LICENSE_FILE})
if(WIN32 AND NOT TBB_DLL_DEBUG)
message(WARNING "TBB DLL Paths could not resolved. Please copy TBB dlls manually to output directory. (VCPKG takes care of that for you if you use it..)")
endif()
#LIST(APPEND CampvisExternalLicenseFiles ${TBB_LICENSE_FILE})
# unfortunately, the new TBB API does no longer allow copying of mutexes, hence we need to set a fallback define
LIST(APPEND CampvisGlobalDefinitions "-DTBB_DEPRECATED_MUTEX_COPYING")
ELSE(TBB_FOUND)
......
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