vcpkg/ports/lapack-reference/cmake-config.patch
Kai Pastor 85d7c82eef
[lapack-reference] Update, fixes (#28679)
* [cmake-user] Test FindLAPACK.cmake

* Minor cleanup

* Avoid release-only lib variable

* Fix usage of external blas

* Update to 3.11

* Add usage doc

* Update versions
2023-01-04 12:37:43 -08:00

22 lines
906 B
Diff

diff --git a/CMAKE/lapack-config-install.cmake.in b/CMAKE/lapack-config-install.cmake.in
index 7760960..102eb92 100644
--- a/CMAKE/lapack-config-install.cmake.in
+++ b/CMAKE/lapack-config-install.cmake.in
@@ -12,8 +12,14 @@ unset(_LAPACK_TARGET)
set(LAPACK_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
# Report the blas and lapack raw or imported libraries.
-set(LAPACK_blas_LIBRARIES "@BLAS_LIBRARIES@")
+if("@USE_OPTIMIZED_BLAS@")
+ include(CMakeFindDependencyMacro)
+ find_dependency(BLAS) # For current build type
+ set(LAPACK_blas_LIBRARIES "${BLAS_LIBRARIES}")
+else()
+ set(LAPACK_blas_LIBRARIES "@BLASLIB@") # target carries link libraries
+endif()
set(LAPACK_lapack_LIBRARIES "@LAPACK_LIBRARIES@")
-set(LAPACK_LIBRARIES ${LAPACK_blas_LIBRARIES} ${LAPACK_lapack_LIBRARIES})
+set(LAPACK_LIBRARIES ${LAPACK_lapack_LIBRARIES}) # target carries link libraries
unset(_LAPACK_SELF_DIR)