summaryrefslogtreecommitdiff
path: root/CMAKE/lapack-config-install.cmake.in
diff options
context:
space:
mode:
authorjulie <julielangou@users.noreply.github.com>2014-02-09 00:37:45 +0000
committerjulie <julielangou@users.noreply.github.com>2014-02-09 00:37:45 +0000
commitdf747406083c0d2a08d7e2c9b8ad7b93a570e104 (patch)
treea98b3e15c0f92544337618fbdfc41435c9478b24 /CMAKE/lapack-config-install.cmake.in
parenta681d8fc7a25c6fc3c90ce0fff72dfd60c23e0f8 (diff)
downloadlapack-df747406083c0d2a08d7e2c9b8ad7b93a570e104.tar.gz
lapack-df747406083c0d2a08d7e2c9b8ad7b93a570e104.tar.bz2
lapack-df747406083c0d2a08d7e2c9b8ad7b93a570e104.zip
== Patch provided by Brad King from Kitware - brad.king@kitware.com ==
Provide CMake packages for both LAPACK and LAPACKE Teach "lapack-config.cmake" to provide variables LAPACK_blas_LIBRARIES LAPACK_lapack_LIBRARIES that contain either the target names when using the reference implementation or the system libraries found for them. Configure a "lapacke-config.cmake" file for the build and install trees to package LAPACKE. Teach it to load the LAPACK package installed with it. Provide variables LAPACKE_INCLUDE_DIRS LAPACKE_LIBRARIES containing the header file search path for lapacke headers and the list of lapacke library targets. This requires CMake 2.8.10 to separate the installation export for the lapacke library from the other targets.
Diffstat (limited to 'CMAKE/lapack-config-install.cmake.in')
-rw-r--r--CMAKE/lapack-config-install.cmake.in17
1 files changed, 15 insertions, 2 deletions
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)