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:
authortamasmeszaros <meszaros.q@gmail.com>2019-10-25 14:09:25 +0300
committertamasmeszaros <meszaros.q@gmail.com>2019-10-25 14:15:21 +0300
commit4554da29abc153c48284235ed73f2aa7d4eefc8e (patch)
treef10ab9acc594d933a0278429dccf4c6a9ea44b62 /cmake/modules/FindTBB.cmake
parenta7c843d2132c39fe699423af1a4fe44a86e4ff8d (diff)
Add OpenVDB to dependencies
* Add Linux openvdb integration * Add Mac openvdb integration and enable in ALL * Create openvdb sandbox to test integration. * Additional fixes in the patches * Remove slabasebed sandbox as it has no relevance now * Provide FindOpenVDB module and fix build issues
Diffstat (limited to 'cmake/modules/FindTBB.cmake')
-rw-r--r--cmake/modules/FindTBB.cmake20
1 files changed, 15 insertions, 5 deletions
diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake
index b09bafda3..3b9f46b96 100644
--- a/cmake/modules/FindTBB.cmake
+++ b/cmake/modules/FindTBB.cmake
@@ -93,8 +93,16 @@
# This module will also create the "tbb" target that may be used when building
# executables and libraries.
+unset(TBB_FOUND CACHE)
+unset(TBB_INCLUDE_DIRS CACHE)
+unset(TBB_LIBRARIES)
+unset(TBB_LIBRARIES_DEBUG)
+unset(TBB_LIBRARIES_RELEASE)
+
include(FindPackageHandleStandardArgs)
+find_package(Threads QUIET REQUIRED)
+
if(NOT TBB_FOUND)
##################################
@@ -215,6 +223,9 @@ if(NOT TBB_FOUND)
foreach(_comp ${TBB_SEARCH_COMPOMPONENTS})
if(";${TBB_FIND_COMPONENTS};tbb;" MATCHES ";${_comp};")
+ unset(TBB_${_comp}_LIBRARY_DEBUG CACHE)
+ unset(TBB_${_comp}_LIBRARY_RELEASE CACHE)
+
# Search for the libraries
find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp}${TBB_STATIC_SUFFIX}
HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
@@ -261,6 +272,7 @@ if(NOT TBB_FOUND)
set(TBB_LIBRARIES "${TBB_LIBRARIES_${TBB_BUILD_TYPE}}")
endif()
+ set(TBB_DEFINITIONS "")
if (MSVC AND TBB_STATIC)
set(TBB_DEFINITIONS __TBB_NO_IMPLICIT_LINKAGE)
endif ()
@@ -269,6 +281,7 @@ if(NOT TBB_FOUND)
find_package_handle_standard_args(TBB
REQUIRED_VARS TBB_INCLUDE_DIRS TBB_LIBRARIES
+ FAIL_MESSAGE "TBB library cannot be found. Consider set TBBROOT environment variable."
HANDLE_COMPONENTS
VERSION_VAR TBB_VERSION)
@@ -279,6 +292,8 @@ if(NOT TBB_FOUND)
if(NOT CMAKE_VERSION VERSION_LESS 3.0 AND TBB_FOUND)
add_library(TBB::tbb UNKNOWN IMPORTED)
set_target_properties(TBB::tbb PROPERTIES
+ INTERFACE_COMPILE_DEFINITIONS "${TBB_DEFINITIONS}"
+ INTERFACE_LINK_LIBRARIES "Threads::Threads;${CMAKE_DL_LIBS}"
INTERFACE_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIRS}
IMPORTED_LOCATION ${TBB_LIBRARIES})
if(TBB_LIBRARIES_RELEASE AND TBB_LIBRARIES_DEBUG)
@@ -290,11 +305,6 @@ if(NOT TBB_FOUND)
IMPORTED_LOCATION_MINSIZEREL ${TBB_LIBRARIES_RELEASE}
)
endif()
-
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- find_package(Threads QUIET REQUIRED)
- set_target_properties(TBB::tbb PROPERTIES INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS};Threads::Threads")
- endif()
endif()
mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARIES)