]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/cmake/modules/FindTBB.cmake
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / rocksdb / cmake / modules / FindTBB.cmake
CommitLineData
11fdf7f2
TL
1# - Find TBB
2# Find the Thread Building Blocks library and includes
3#
f67539c2 4# TBB_INCLUDE_DIRS - where to find tbb.h, etc.
11fdf7f2
TL
5# TBB_LIBRARIES - List of libraries when using TBB.
6# TBB_FOUND - True if TBB found.
7
8if(NOT DEFINED TBB_ROOT_DIR)
9 set(TBB_ROOT_DIR "$ENV{TBBROOT}")
10endif()
11
f67539c2
TL
12find_path(TBB_INCLUDE_DIRS
13 NAMES tbb/tbb.h
14 HINTS ${TBB_ROOT_DIR}/include)
11fdf7f2
TL
15
16find_library(TBB_LIBRARIES
f67539c2
TL
17 NAMES tbb
18 HINTS ${TBB_ROOT_DIR}/lib ENV LIBRARY_PATH)
11fdf7f2
TL
19
20include(FindPackageHandleStandardArgs)
f67539c2 21find_package_handle_standard_args(TBB DEFAULT_MSG TBB_LIBRARIES TBB_INCLUDE_DIRS)
11fdf7f2
TL
22
23mark_as_advanced(
f67539c2
TL
24 TBB_LIBRARIES
25 TBB_INCLUDE_DIRS)
26
27if(TBB_FOUND AND NOT (TARGET TBB::TBB))
28 add_library (TBB::TBB UNKNOWN IMPORTED)
29 set_target_properties(TBB::TBB
30 PROPERTIES
31 IMPORTED_LOCATION ${TBB_LIBRARIES}
32 INTERFACE_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIRS})
33endif()