diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 5fa01c886..6868dec3b 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -152,6 +152,7 @@ include(GMP/GMP.cmake) include(MPFR/MPFR.cmake) include(CGAL/CGAL.cmake) include(NLopt/NLopt.cmake) +include(TBB/TBB.cmake) include(wxWidgets/wxWidgets.cmake) if (NOT "${ZLIB_PKG}" STREQUAL "") @@ -159,12 +160,13 @@ if (NOT "${ZLIB_PKG}" STREQUAL "") add_dependencies(dep_openexr ${ZLIB_PKG}) endif () +add_dependencies(dep_openvdb dep_TBB) + set(_dep_list dep_boost - dep_tbb + dep_TBB dep_libcurl dep_wxWidgets - dep_gtest dep_cereal dep_NLopt dep_openvdb diff --git a/deps/TBB/TBB.cmake b/deps/TBB/TBB.cmake new file mode 100644 index 000000000..463010e45 --- /dev/null +++ b/deps/TBB/TBB.cmake @@ -0,0 +1,17 @@ +prusaslicer_add_cmake_project( + TBB + URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz" + URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe + CMAKE_ARGS + -DTBB_BUILD_SHARED=OFF + -DTBB_BUILD_TESTS=OFF + -DTBB_BUILD_TESTS=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DCMAKE_DEBUG_POSTFIX=_debug +) + +if (MSVC) + add_debug_dep(dep_tbb) +endif () + + diff --git a/deps/deps-unix-common.cmake b/deps/deps-unix-common.cmake index f035817fe..23f718105 100644 --- a/deps/deps-unix-common.cmake +++ b/deps/deps-unix-common.cmake @@ -18,25 +18,6 @@ endif () # message(WARNING "No EXPAT dev package found in system, building static library. Consider installing the system package.") # endif () -ExternalProject_Add(dep_tbb - EXCLUDE_FROM_ALL 1 - URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz" - URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe - CMAKE_ARGS - -DTBB_BUILD_SHARED=OFF - -DTBB_BUILD_TESTS=OFF - -DCMAKE_CXX_FLAGS=${TBB_MINGW_WORKAROUND} - -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local - ${DEP_CMAKE_OPTS} -) - -ExternalProject_Add(dep_gtest - EXCLUDE_FROM_ALL 1 - URL "https://github.com/google/googletest/archive/release-1.8.1.tar.gz" - URL_HASH SHA256=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c - CMAKE_ARGS -DBUILD_GMOCK=OFF ${DEP_CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local -) - ExternalProject_Add(dep_cereal EXCLUDE_FROM_ALL 1 URL "https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz" @@ -96,7 +77,7 @@ ExternalProject_Add(dep_openvdb EXCLUDE_FROM_ALL 1 GIT_REPOSITORY https://github.com/AcademySoftwareFoundation/openvdb.git GIT_TAG aebaf8d95be5e57fd33949281ec357db4a576c2e #v6.2.1 - DEPENDS dep_blosc dep_openexr dep_tbb + DEPENDS dep_blosc dep_openexr CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local -DCMAKE_DEBUG_POSTFIX=d diff --git a/deps/deps-windows.cmake b/deps/deps-windows.cmake index eab60f698..61d9c60ea 100644 --- a/deps/deps-windows.cmake +++ b/deps/deps-windows.cmake @@ -81,40 +81,6 @@ ExternalProject_Add(dep_boost INSTALL_COMMAND "" # b2 does that already ) -ExternalProject_Add(dep_tbb - EXCLUDE_FROM_ALL 1 - URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz" - URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe - CMAKE_GENERATOR "${DEP_MSVC_GEN}" - CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}" - CMAKE_ARGS - -DCMAKE_DEBUG_POSTFIX=_debug - -DTBB_BUILD_SHARED=OFF - -DTBB_BUILD_TESTS=OFF - "-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local" - BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj - INSTALL_COMMAND "" -) - -add_debug_dep(dep_tbb) - -# ExternalProject_Add(dep_gtest -# EXCLUDE_FROM_ALL 1 -# URL "https://github.com/google/googletest/archive/release-1.8.1.tar.gz" -# URL_HASH SHA256=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c -# CMAKE_GENERATOR "${DEP_MSVC_GEN}" -# CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}" -# CMAKE_ARGS -# -DBUILD_GMOCK=OFF -# -Dgtest_force_shared_crt=ON -# -DCMAKE_POSITION_INDEPENDENT_CODE=ON -# "-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local" -# BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj -# INSTALL_COMMAND "" -# ) - -# add_debug_dep(dep_gtest) - ExternalProject_Add(dep_cereal EXCLUDE_FROM_ALL 1 URL "https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz"