Skip to content

Commit

Permalink
COMP: Fix TBB configuration always using "lib" directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Jun 22, 2022
1 parent 1c3bdf6 commit 3c528ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/internal/manylinux-build-module-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/internal/manylinux-build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3c528ce

Please sign in to comment.