Skip to content

Commit

Permalink
[open3d] fix finding of blas/lapack libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 29, 2024
1 parent 4738138 commit ec4d328
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 17 deletions.
19 changes: 19 additions & 0 deletions ports/open3d/0002-blas.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/3rdparty/find_dependencies.cmake b/3rdparty/find_dependencies.cmake
index d694621ad..49a5f899e 100644
--- a/3rdparty/find_dependencies.cmake
+++ b/3rdparty/find_dependencies.cmake
@@ -1597,6 +1597,12 @@ else(OPEN3D_USE_ONEAPI_PACKAGES)
find_package(LAPACKE)
if(BLAS_FOUND AND LAPACK_FOUND AND LAPACKE_FOUND)
message(STATUS "System BLAS/LAPACK/LAPACKE found.")
+ if(TARGET BLAS::BLAS)
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM BLAS::BLAS)
+ endif()
+ if(TARGET LAPACK)
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM LAPACK::LAPACK)
+ endif()
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM
${BLAS_LIBRARIES}
${LAPACK_LIBRARIES}
--
2.45.2
5 changes: 3 additions & 2 deletions ports/open3d/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
0001-uvatlas.patch
0002-blas.patch
0003-liblzf.patch
0004-tiny_gltf.patch
0005-jsoncpp.patch
Expand All @@ -22,7 +23,7 @@ vcpkg_add_to_path(PREPEND "${GIT_PATH}")
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"gui" BUILD_GUI
"blas" USE_BLAS
"openblas" USE_OPENBLAS
"intel-oneapi" OPEN3D_USE_ONEAPI_PACKAGES
"sycl" BUILD_SYCL_MODULE
"openmp" WITH_OPENMP
Expand All @@ -49,7 +50,7 @@ vcpkg_cmake_configure(
-DBUILD_AZURE_KINECT=${BUILD_AZURE_KINECT}
-DBUILD_SYCL_MODULE=${BUILD_SYCL_MODULE}
-DOPEN3D_USE_ONEAPI_PACKAGES=${OPEN3D_USE_ONEAPI_PACKAGES}
-DUSE_BLAS=${USE_BLAS}
-DUSE_BLAS=${USE_OPENBLAS}
-DUSE_SYSTEM_BLAS=ON
-DWITH_OPENMP=${WITH_OPENMP}
-DUSE_SYSTEM_ASSIMP=ON
Expand Down
27 changes: 13 additions & 14 deletions ports/open3d/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"zeromq"
],
"default-features": [
"blas",
"gui",
"openblas",
"openmp"
],
"features": {
Expand All @@ -47,19 +47,6 @@
"azure-kinect-sensor-sdk"
]
},
"blas": {
"description": "Use BLAS/LAPACK/LAPACKE instead of MKL",
"dependencies": [
"blas",
"lapack",
{
"name": "lapack-reference",
"features": [
"lapacke"
]
}
]
},
"gui": {
"description": "Build the new GUI for Open3D",
"dependencies": [
Expand All @@ -72,6 +59,18 @@
"intel-mkl"
]
},
"openblas": {
"description": "Use OpenBLAS, LAPACK, and LAPACKE",
"dependencies": [
{
"name": "lapack-reference",
"features": [
"lapacke"
]
},
"openblas"
]
},
"openmp": {
"description": "Use OpenMP multi-threading"
},
Expand Down
2 changes: 1 addition & 1 deletion versions/o-/open3d.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "d9454d03d3c0f08fbd18f29cc4715b031f824bd9",
"git-tree": "5ee69ec3916f25be82ebd62e6e1f9044e63a18c8",
"version-semver": "0.18.0",
"port-version": 0
}
Expand Down

0 comments on commit ec4d328

Please sign in to comment.