From 54a23f71af5e9b35fa0cf0dc781dc189bb5c6a06 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 14 Jun 2016 10:40:04 +0000 Subject: [PATCH] include more selectively --- CMakeLists.txt | 4 +++- Common/OpenFile.cpp | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb4bd33318..27768b0909 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1270,7 +1270,9 @@ endif(LINUX_JOYSTICK_H) if(MSVC) add_definitions(-D_USE_MATH_DEFINES -DNOMINMAX -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE) - set(GMSH_SRC ${GMSH_SRC};Fltk/Win32Icon.rc) + if(HAVE_FLTK) + set(GMSH_SRC ${GMSH_SRC};Fltk/Win32Icon.rc) + endif(HAVE_FLTK) endif(MSVC) if(WIN32 OR CYGWIN) diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index 73e61785d8..5de96dc9a0 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -20,7 +20,6 @@ typedef unsigned long intptr_t; #include "Context.h" #include "OpenFile.h" #include "CommandLine.h" -#include "ReadImg.h" #include "OS.h" #include "StringUtils.h" #include "GeomMeshMatcher.h" @@ -45,6 +44,10 @@ typedef unsigned long intptr_t; #include "PViewOptions.h" #endif +#if defined(HAVE_GRAPHICS) +#include "ReadImg.h" +#endif + #if defined(HAVE_FLTK) #include <FL/fl_ask.H> #include "FlGui.h" -- GitLab