-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindVTBB.cmake
73 lines (65 loc) · 2.19 KB
/
FindVTBB.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# $Id: FindVTBB.cmake 21620 2011-05-30 10:28:48Z dr165799 $
include( FindPackageHandleStandardArgs )
include( VistaFindUtils )
include( VistaHWArchSettings )
if( NOT VTBB_FOUND )
# tbb.h marks the tbb distribution
vista_find_package_root( TBB include/tbb/tbb.h )
if( TBB_ROOT_DIR )
#Provide specific libraries for release and debug build here
set( TBB_LIBRARIES
optimized tbb
optimized tbbmalloc
optimized tbbmalloc_proxy
debug tbb_debug
debug tbbmalloc_debug
debug tbbmalloc_proxy_debug
)
set( TBB_INCLUDE_DIRS ${TBB_ROOT_DIR}/include )
# Set platform specific TBB path here
if( UNIX )
#UNIX is easy, as usual
set( TBB_LIBRARY_DIRS ${TBB_ROOT_DIR}/lib )
elseif(WIN32)
#For WIN32, tbb contains specific libraries for different compilers
if( MSVC )
if( MSVC80 )
if(VISTA_64BIT)
set( TBB_LIBRARY_DIRS
${TBB_ROOT_DIR}/lib/intel64/vc8
${TBB_ROOT_DIR}/bin/intel64/vc8 )
else(VISTA_64BIT)
set( TBB_LIBRARY_DIRS
${TBB_ROOT_DIR}/lib/intel32/vc8
${TBB_ROOT_DIR}/bin/intel32/vc8 )
endif(VISTA_64BIT)
elseif( MSVC90 )
if(VISTA_64BIT)
set( TBB_LIBRARY_DIRS
${TBB_ROOT_DIR}/lib/intel64/vc9
${TBB_ROOT_DIR}/bin/intel64/vc9 )
else(VISTA_64BIT)
set( TBB_LIBRARY_DIRS
${TBB_ROOT_DIR}/lib/intel32/vc9
${TBB_ROOT_DIR}/bin/intel32/vc9 )
endif(VISTA_64BIT)
elseif( MSVC10 )
if(VISTA_64BIT)
set( TBB_LIBRARY_DIRS
${TBB_ROOT_DIR}/lib/intel64/vc10
${TBB_ROOT_DIR}/bin/intel64/vc10 )
else(VISTA_64BIT)
set( TBB_LIBRARY_DIRS
${TBB_ROOT_DIR}/lib/intel32/vc10
${TBB_ROOT_DIR}/bin/intel32/vc10 )
endif(VISTA_64BIT)
else( MSVC80 )
message( WARNING "FindPackageTBB - Unknown MSVC version" )
endif( MSVC80 )
else( MSVC )
message( WARNING "FindPackageTBB - using WIN32 without Visual Studio - this will probably fail - use at your own risk!" )
endif( MSVC )
endif(UNIX)
endif( TBB_ROOT_DIR )
endif( NOT VTBB_FOUND )
find_package_handle_standard_args( VTBB "TBB could not be found" TBB_ROOT_DIR )