From 3ff4f6fd324f5c6635b58f6b66f36cbcc00536ca Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 22 Jun 2022 19:00:10 -0400 Subject: [PATCH] COMP: Fix TBB configuration always using "lib" directory --- CMakeLists.txt | 9 +++------ scripts/internal/manylinux-build-module-wheels.sh | 2 +- scripts/internal/manylinux-build-wheels.sh | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad06f92a..f56192b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,14 +16,10 @@ message(STATUS "SuperBuild - ITKPythonPackage_WHEEL_NAME:${ITKPythonPackage_WHEE option(ITKPythonPackage_USE_TBB "Build and use oneTBB in the ITK python package" ON) -set(libpath "lib") -if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - set(libpath "lib64") -endif() if(ITK_SOURCE_DIR) - set(TBB_DIR "${ITK_SOURCE_DIR}/../oneTBB-prefix/${libpath}/cmake/TBB") + set(TBB_DIR "${ITK_SOURCE_DIR}/../oneTBB-prefix/lib/cmake/TBB") else() - set(TBB_DIR "${CMAKE_BINARY_DIR}/../oneTBB-prefix/${libpath}/cmake/TBB") + set(TBB_DIR "${CMAKE_BINARY_DIR}/../oneTBB-prefix/lib/cmake/TBB") endif() set(tbb_args ) if(ITKPythonPackage_USE_TBB) @@ -116,6 +112,7 @@ if(ITKPythonPackage_SUPERBUILD) -DTBB_TEST:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/../oneTBB-prefix + -DCMAKE_INSTALL_LIBDIR:STRING=lib # Skip default initialization by GNUInstallDirs CMake module ${ep_common_cmake_cache_args} -DCMAKE_BUILD_TYPE:STRING=Release BUILD_BYPRODUCTS "${TBB_DIR}/TBBConfig.cmake" diff --git a/scripts/internal/manylinux-build-module-wheels.sh b/scripts/internal/manylinux-build-module-wheels.sh index 7a317925..231cb197 100755 --- a/scripts/internal/manylinux-build-module-wheels.sh +++ b/scripts/internal/manylinux-build-module-wheels.sh @@ -61,7 +61,7 @@ source "${script_dir}/manylinux-build-common.sh" # Set up library paths in container so that shared libraries can be added to wheels sudo ldconfig -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/work/oneTBB-prefix/lib64:/usr/lib:/usr/lib64:/usr/local/lib:/usr/local/lib64 +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/work/oneTBB-prefix/lib:/usr/lib:/usr/lib64:/usr/local/lib:/usr/local/lib64 # Compile wheels re-using standalone project and archive cache for PYBIN in "${PYBINARIES[@]}"; do diff --git a/scripts/internal/manylinux-build-wheels.sh b/scripts/internal/manylinux-build-wheels.sh index c1ab4b65..10c73915 100755 --- a/scripts/internal/manylinux-build-wheels.sh +++ b/scripts/internal/manylinux-build-wheels.sh @@ -34,10 +34,10 @@ pushd /work/ITK-source > /dev/null 2>&1 cmake -DITKPythonPackage_BUILD_PYTHON:PATH=0 -G Ninja ../ ninja popd > /dev/null 2>&1 -tbb_dir=/work/oneTBB-prefix/lib64/cmake/TBB +tbb_dir=/work/oneTBB-prefix/lib/cmake/TBB # So auditwheel can find the libs sudo ldconfig -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/work/oneTBB-prefix/lib64:/usr/lib:/usr/lib64 +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/work/oneTBB-prefix/lib:/usr/lib:/usr/lib64 SINGLE_WHEEL=0