From a5654bad887f4577bc2b3a8fb39f49734b0d2b73 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 4 Jun 2013 06:39:36 +0000
Subject: [PATCH] enable cairo by default

---
 CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18fba98a13..feaae6ffa7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,7 @@ option(ENABLE_BUILD_ANDROID "Build Gmsh library for Android NDK" OFF)
 option(ENABLE_BUILD_IOS "Build Gmsh library for iOS (ARM)" OFF)
 option(ENABLE_BUILD_IOS_EMULATOR "Build Gmsh library for iOS emulator (x86)" OFF)
 option(ENABLE_CGNS "Enable CGNS mesh export" OFF)
-option(ENABLE_CAIRO "Enable cairo to render fonts" OFF)
+option(ENABLE_CAIRO "Enable Cairo to render fonts" ${DEFAULT})
 option(ENABLE_CHACO "Enable Chaco mesh partitioner" ${DEFAULT})
 option(ENABLE_DINTEGRATION "Enable discrete integration and levelsets" ${DEFAULT})
 option(ENABLE_FLTK "Build FLTK GUI" ${DEFAULT})
@@ -568,7 +568,7 @@ if(ENABLE_BFGS)
   set_config_option(HAVE_BFGS "Bfgs")
 endif(ENABLE_BFGS)
 
-if(ENABLE_CAIRO)
+if(HAVE_FLTK AND ENABLE_CAIRO)
   find_library(CAIRO_LIB cairo)
   find_path(CAIRO_INC "cairo/cairo.h" PATH_SUFFIXES include)
   if(CAIRO_INC AND CAIRO_LIB)
@@ -576,7 +576,7 @@ if(ENABLE_CAIRO)
      list(APPEND EXTERNAL_LIBRARIES ${CAIRO_LIB})
      list(APPEND EXTERNAL_INCLUDES ${CAIRO_INC})
   endif(CAIRO_INC AND CAIRO_LIB)
-endif(ENABLE_CAIRO)
+endif(HAVE_FLTK AND ENABLE_CAIRO)
 
 if(ENABLE_DINTEGRATION)
   add_subdirectory(contrib/DiscreteIntegration)
-- 
GitLab