summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-05 16:34:42 +0000
committerManolo Gouy <Manolo>2016-02-05 16:34:42 +0000
commita8a777ff26dede82ff1b450806608851f63cb79f (patch)
tree20cb34a900305355f953d10a00e0de68169eb6f8 /src/CMakeLists.txt
parent254cb01f542b554b63c143718215b23f8151080c (diff)
New CMake option OPTION_PRINT_SUPPORT turned ON by default
When the option is off, file config.h defines NO_PRINT_SUPPORT which in turn produces a library without print support, that is, class Fl_Printer does nothing. When off, the FLTK library is somewhat smaller. Can be turned off only when the X11 library is used. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt16
1 files changed, 12 insertions, 4 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})