summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt16
-rw-r--r--src/Fl_Printer.cxx13
2 files changed, 23 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b28fff13b..4225b5377 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -46,9 +46,8 @@ set(CPPFILES
Fl_Paged_Device.cxx
Fl_Pixmap.cxx
Fl_Positioner.cxx
- Fl_PostScript.cxx
- Fl_Printer.cxx
Fl_Preferences.cxx
+ Fl_Printer.cxx
Fl_Progress.cxx
Fl_Repeat_Button.cxx
Fl_Return_Button.cxx
@@ -137,13 +136,22 @@ set(CPPFILES
fl_show_colormap.cxx
fl_symbols.cxx
fl_vertex.cxx
- ps_image.cxx
screen_xywh.cxx
fl_utf8.cxx
fl_encoding_latin1.cxx
fl_encoding_mac_roman.cxx
)
+if (USE_X11 AND NOT OPTION_PRINT_SUPPORT)
+ set(PSFILES
+ )
+else()
+ set(PSFILES
+ Fl_PostScript.cxx
+ ps_image.cxx
+ )
+endif(USE_X11 AND NOT OPTION_PRINT_SUPPORT)
+
set(DRIVER_FILES)
if (USE_X11)
@@ -280,7 +288,7 @@ else()
endif(APPLE AND NOT OPTION_APPLE_X11)
#######################################################################
-FL_ADD_LIBRARY(fltk STATIC "${CPPFILES};${MMFILES};${CFILES};fl_call_main.c")
+FL_ADD_LIBRARY(fltk STATIC "${CPPFILES};${PSFILES};${MMFILES};${CFILES};fl_call_main.c")
if(LIB_dl)
target_link_libraries(fltk ${LIB_dl})
diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx
index aece33443..a19b7cb7b 100644
--- a/src/Fl_Printer.cxx
+++ b/src/Fl_Printer.cxx
@@ -4,7 +4,7 @@
// Encompasses platform-specific printing-support code and
// PostScript output code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010 by Bill Spitzak and others.
+// Copyright 2010-2016 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -19,6 +19,15 @@
#include <FL/Fl_Printer.H>
+const char *Fl_Printer::class_id = "Fl_Printer";
+
+#ifdef NO_PRINT_SUPPORT
+
+Fl_Printer::Fl_Printer(void) {
+}
+
+#else
+
#if defined(WIN32) || defined(__APPLE__)
#elif defined(FL_PORTING)
# pragma message "FL_PORTING: implement the printer device specifics"
@@ -69,7 +78,6 @@ const char *Fl_Printer::property_save = "Save";
/** [this text may be customized at run-time] */
const char *Fl_Printer::property_cancel = "Cancel";
-const char *Fl_Printer::class_id = "Fl_Printer";
#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN)
const char *Fl_System_Printer::class_id = Fl_Printer::class_id;
#endif
@@ -207,6 +215,7 @@ Fl_Printer::~Fl_Printer(void)
delete printer;
}
+#endif // NO_PRINT_SUPPORT
//
// End of "$Id$".