diff options
Diffstat (limited to 'CMAKE')
-rw-r--r-- | CMAKE/lapack-config-build.cmake.in | 11 | ||||
-rw-r--r-- | CMAKE/lapack-config-install.cmake.in | 17 |
2 files changed, 25 insertions, 3 deletions
diff --git a/CMAKE/lapack-config-build.cmake.in b/CMAKE/lapack-config-build.cmake.in index 8d60cc88..1d084fe1 100644 --- a/CMAKE/lapack-config-build.cmake.in +++ b/CMAKE/lapack-config-build.cmake.in @@ -1 +1,10 @@ -include("@LAPACK_BINARY_DIR@/lapack-targets.cmake") +# Load lapack targets from the build tree if necessary. +set(_LAPACK_TARGET "@_lapack_config_build_guard_target@") +if(_LAPACK_TARGET AND NOT TARGET "${_LAPACK_TARGET}") + include("@LAPACK_BINARY_DIR@/lapack-targets.cmake") +endif() +unset(_LAPACK_TARGET) + +# Report the blas and lapack raw or imported libraries. +set(LAPACK_blas_LIBRARIES "@BLAS_LIBRARIES@") +set(LAPACK_lapack_LIBRARIES "@LAPACK_LIBRARIES@") diff --git a/CMAKE/lapack-config-install.cmake.in b/CMAKE/lapack-config-install.cmake.in index 0c55fc17..4e04f871 100644 --- a/CMAKE/lapack-config-install.cmake.in +++ b/CMAKE/lapack-config-install.cmake.in @@ -1,2 +1,15 @@ -get_filename_component(_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${_SELF_DIR}/lapack-targets.cmake) +# Compute locations from <prefix>/lib/cmake/lapack-<v>/<self>.cmake +get_filename_component(_LAPACK_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +# Load lapack targets from the install tree if necessary. +set(_LAPACK_TARGET "@_lapack_config_install_guard_target@") +if(_LAPACK_TARGET AND NOT TARGET "${_LAPACK_TARGET}") + include("${_LAPACK_SELF_DIR}/lapack-targets.cmake") +endif() +unset(_LAPACK_TARGET) + +# Report the blas and lapack raw or imported libraries. +set(LAPACK_blas_LIBRARIES "@BLAS_LIBRARIES@") +set(LAPACK_lapack_LIBRARIES "@LAPACK_LIBRARIES@") + +unset(_LAPACK_SELF_DIR) |