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:
Diffstat (limited to 'cmake/modules/FindTBB.cmake')
-rw-r--r--cmake/modules/FindTBB.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake
index 271015520..6aa89e312 100644
--- a/cmake/modules/FindTBB.cmake
+++ b/cmake/modules/FindTBB.cmake
@@ -8,9 +8,11 @@ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
set(_q QUIET)
endif()
-# Not building the static dependencies
+# Only consider the config scripts if not building with the static dependencies
+# and this call is not made from a static dependency build (e.g. dep_OpenVDB will use this module)
+# BUILD_SHARED_LIBS will always be defined for dependency projects and will be OFF.
# Newer versions of TBB also discourage from using TBB as a static library
-if (NOT SLIC3R_STATIC AND NOT BUILD_SHARED_LIBS)
+if (NOT SLIC3R_STATIC AND (NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS))
find_package(${CMAKE_FIND_PACKAGE_NAME} ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} CONFIG ${_q})
if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
@@ -25,4 +27,4 @@ endif ()
if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND)
include(${CMAKE_CURRENT_LIST_DIR}/FindTBB.cmake.in)
-endif () \ No newline at end of file
+endif ()