forked from Slicer/Slicer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSlicerBlockInstallTBB.cmake
31 lines (28 loc) · 1.03 KB
/
SlicerBlockInstallTBB.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
# -------------------------------------------------------------------------
# Find and install TBB Libs
# -------------------------------------------------------------------------
set(TBB_INSTALL_LIB_DIR "${Slicer_INSTALL_LIB_DIR}")
if(NOT EXISTS "${TBB_BIN_DIR}")
message(FATAL_ERROR "CMake variable TBB_BIN_DIR is set to a nonexistent directory: ${TBB_BIN_DIR}")
endif()
if(NOT EXISTS "${TBB_LIB_DIR}")
message(FATAL_ERROR "CMake variable TBB_LIB_DIR is set to a nonexistent directory: ${TBB_LIB_DIR}")
endif()
if(WIN32)
install(
FILES
${TBB_BIN_DIR}/tbb12.dll
${TBB_BIN_DIR}/tbbmalloc.dll
${TBB_BIN_DIR}/tbbmalloc_proxy.dll
DESTINATION bin COMPONENT Runtime)
elseif(APPLE)
message(FATAL_ERROR "This CMake module does NOT support macOS")
elseif(UNIX)
foreach(file IN ITEMS
${TBB_LIB_DIR}/libtbb.so.12
${TBB_LIB_DIR}/libtbbmalloc.so.2.5
${TBB_LIB_DIR}/libtbbmalloc_proxy.so.2.5
)
slicerInstallLibrary(FILE ${file} DESTINATION ${TBB_INSTALL_LIB_DIR} COMPONENT Runtime STRIP)
endforeach()
endif()