From a3b5fcc5005558c3bcd2efcdb066d4855172039c Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 11 Sep 2009 20:52:49 +0000
Subject: [PATCH] link with vecLib framework on mac (instad of -llapack -lblas)

---
 CMakeLists.txt      | 10 +++++-----
 Graphics/gl2png.cpp |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c8371ac10..c5e37d20d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -155,7 +155,7 @@ if(ENABLE_BLAS_LAPACK)
     if(LAPACK_LIBRARIES)
       set(HAVE_BLAS TRUE)
       set(HAVE_LAPACK TRUE)
-      list(APPEND CONFIG_OPTIONS "IntelBlas" "IntelLapack")
+      list(APPEND CONFIG_OPTIONS "MKL")
     else(LAPACK_LIBRARIES)
       set(REFLAPACK_LIBS_REQUIRED lapack blas g2c gcc)
       find_all_libraries(LAPACK_LIBRARIES REFLAPACK_LIBS_REQUIRED "")
@@ -178,20 +178,20 @@ if(ENABLE_BLAS_LAPACK)
     if(LAPACK_LIBRARIES)
       set(HAVE_BLAS TRUE)
       set(HAVE_LAPACK TRUE)
-      list(APPEND CONFIG_OPTIONS "IntelBlas" "IntelLapack")
+      list(APPEND CONFIG_OPTIONS "MKL")
     endif(LAPACK_LIBRARIES)
   elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
     # on SunOS we know blas and lapack are available in sunperf
     set(HAVE_BLAS TRUE)
     set(HAVE_LAPACK TRUE)
-    list(APPEND CONFIG_OPTIONS "Blas" "Lapack")
+    list(APPEND CONFIG_OPTIONS "SunPerf")
     set(LAPACK_FLAGS -library=sunperf)
   elseif(APPLE)
     # on Mac we also know that blas and lapack are available
-    set(LAPACK_LIBRARIES "-llapack -lblas")
+    set(LAPACK_LIBRARIES "-framework vecLib")
     set(HAVE_BLAS TRUE)
     set(HAVE_LAPACK TRUE)
-    list(APPEND CONFIG_OPTIONS "Blas" "Lapack")
+    list(APPEND CONFIG_OPTIONS "VecLib")
   endif(MSVC)
   if(NOT HAVE_BLAS OR NOT HAVE_LAPACK)
     # if we haven't found blas and lapack without using the standard
diff --git a/Graphics/gl2png.cpp b/Graphics/gl2png.cpp
index e462fe5fee..52ea0584ea 100644
--- a/Graphics/gl2png.cpp
+++ b/Graphics/gl2png.cpp
@@ -64,10 +64,10 @@ void create_png(FILE *file, PixelBuffer *buffer, int quality)
   time_t now;
   time(&now);
   png_text text_ptr[10];  
-  text_ptr[0].key = "Creator";
-  text_ptr[0].text = "Gmsh";
+  text_ptr[0].key = (char*)"Creator";
+  text_ptr[0].text = (char*)"Gmsh";
   text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE;
-  text_ptr[1].key = "Date";
+  text_ptr[1].key = (char*)"Date";
   text_ptr[1].text = ctime(&now);
   text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE;
   png_set_text(png_ptr, info_ptr, text_ptr, 2);
-- 
GitLab