Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-08-17 19:27:51 +0300
committerbubnikv <bubnikv@gmail.com>2017-08-17 19:27:51 +0300
commitc0f099c2cf5413dd386bd08250ee9c0d95b0bba6 (patch)
tree6b45d010074900b00e261fcc8638779cff6dbcf5 /cmake/modules/FindTBB.cmake
parentbb36e78428bd05855fd6bd74807749547597d995 (diff)
CMake conversion, further steps: Now it compiles on Visual Studio 2013.
Diffstat (limited to 'cmake/modules/FindTBB.cmake')
-rw-r--r--cmake/modules/FindTBB.cmake23
1 files changed, 21 insertions, 2 deletions
diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake
index 0a1a5bb77..3f226c156 100644
--- a/cmake/modules/FindTBB.cmake
+++ b/cmake/modules/FindTBB.cmake
@@ -46,6 +46,9 @@
# tbb_preview, or tbb_preview_debug.
# * TBB_USE_DEBUG_BUILD - The debug version of tbb libraries, if present, will
# be used instead of the release version.
+# * TBB_STATIC - Static linking of libraries with a _static suffix.
+# For example, on Windows a tbb_static.lib will be searched for
+# instead of tbb.lib.
#
# Users may modify the behavior of this module with the following environment
# variables:
@@ -204,17 +207,21 @@ if(NOT TBB_FOUND)
set(TBB_SEARCH_COMPOMPONENTS tbb_preview tbbmalloc_proxy tbbmalloc tbb)
endif()
+ if(TBB_STATIC)
+ set(TBB_STATIC_SUFFIX "_static")
+ endif()
+
# Find each component
foreach(_comp ${TBB_SEARCH_COMPOMPONENTS})
if(";${TBB_FIND_COMPONENTS};tbb;" MATCHES ";${_comp};")
# Search for the libraries
- find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp}
+ find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp}${TBB_STATIC_SUFFIX}
HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH
PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})
- find_library(TBB_${_comp}_LIBRARY_DEBUG ${_comp}_debug
+ find_library(TBB_${_comp}_LIBRARY_DEBUG ${_comp}${TBB_STATIC_SUFFIX}_debug
HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH
PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})
@@ -243,6 +250,8 @@ if(NOT TBB_FOUND)
endif()
endforeach()
+ unset(TBB_STATIC_SUFFIX)
+
##################################
# Set compile flags and libraries
##################################
@@ -300,4 +309,14 @@ if(NOT TBB_FOUND)
unset(TBB_LIB_PATH_SUFFIX)
unset(TBB_DEFAULT_SEARCH_DIR)
+ if(TBB_DEBUG)
+ message(STATUS " TBB_INCLUDE_DIRS = ${TBB_INCLUDE_DIRS}")
+ message(STATUS " TBB_DEFINITIONS = ${TBB_DEFINITIONS}")
+ message(STATUS " TBB_LIBRARIES = ${TBB_LIBRARIES}")
+ message(STATUS " TBB_DEFINITIONS_DEBUG = ${TBB_DEFINITIONS_DEBUG}")
+ message(STATUS " TBB_LIBRARIES_DEBUG = ${TBB_LIBRARIES_DEBUG}")
+ message(STATUS " TBB_DEFINITIONS_RELEASE = ${TBB_DEFINITIONS_RELEASE}")
+ message(STATUS " TBB_LIBRARIES_RELEASE = ${TBB_LIBRARIES_RELEASE}")
+ endif()
+
endif()