From 1a87f667e4c9bdcb21b980b30b27cea18b94a69d Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.r.kempf@gmail.com>
Date: Tue, 16 Dec 2014 14:52:57 +0100
Subject: [PATCH] [CMake] Also append the LAPACK libs to ALL_PKG_LIBS

We dont provide a custom find module, so we need to update
the property after executing the system wide find module.
---
 cmake/modules/DuneCommonMacros.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmake/modules/DuneCommonMacros.cmake b/cmake/modules/DuneCommonMacros.cmake
index 3e79466be..6ba0cad3c 100644
--- a/cmake/modules/DuneCommonMacros.cmake
+++ b/cmake/modules/DuneCommonMacros.cmake
@@ -12,6 +12,9 @@ if(Fortran_Works)
   # search for lapack
   find_package(LAPACK)
   set(HAVE_LAPACK ${LAPACK_FOUND})
+  if(${HAVE_LAPACK})
+    set_property(GLOBAL APPEND PROPERTY ALL_PKG_LIBS "${LAPACK_LIBRARIES}")
+  endif(${HAVE_LAPACK})
   set(HAVE_BLAS ${BLAS_FOUND})
 else(Fortran_Works)
   set(HAVE_LAPACK Off)
-- 
GitLab