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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2021-12-13 18:46:11 +0300
committertamasmeszaros <meszaros.q@gmail.com>2021-12-13 19:11:17 +0300
commit08f88f09da1453f8e3c46627b1c71ffb2a5f1563 (patch)
treebf7c7747c2ffe1d76ee24616c9f12cee77b8ba5e /cmake
parent914f170a98cc1d29ed07a042e2ac57bc91b06dce (diff)
Fix error in previous commit
Diffstat (limited to '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 ()