|
From: <ai...@us...> - 2009-06-28 22:39:24
|
Revision: 10092
http://plplot.svn.sourceforge.net/plplot/?rev=10092&view=rev
Author: airwin
Date: 2009-06-28 22:39:22 +0000 (Sun, 28 Jun 2009)
Log Message:
-----------
Fix indentation.
Make DEFAULT_ALL_DEVICES ON prevail over DEFAULT_NO_DEVICES.
Implement DEFAULT_NO_QT_DEVICES and DEFAULT_NO_CAIRO_DEVICES.
Modified Paths:
--------------
trunk/cmake/modules/drivers-init.cmake
Modified: trunk/cmake/modules/drivers-init.cmake
===================================================================
--- trunk/cmake/modules/drivers-init.cmake 2009-06-28 15:21:29 UTC (rev 10091)
+++ trunk/cmake/modules/drivers-init.cmake 2009-06-28 22:39:22 UTC (rev 10092)
@@ -40,27 +40,58 @@
# and drivers. This will be inspected to build up the set of drivers
# to be compiled based on which devices are selected.
+option(DEFAULT_ALL_DEVICES
+ "Enable all devices by default (ON) or enable devices individually by default (OFF)"
+ OFF
+ )
+
option(DEFAULT_NO_DEVICES
-"Disable all (ON) or enable individually (OFF) devices by default"
-OFF
-)
+ "Disable all devices by default (ON) or enable devices individually by default (OFF)"
+ OFF
+ )
-option(DEFAULT_ALL_DEVICES
-"Enable all (ON) or enable individually (OFF) devices by default"
-OFF
-)
+if(DEFAULT_ALL_DEVICES AND DEFAULT_NO_DEVICES)
+ message(STATUS
+ "WARNING. DEFAULT_ALL_DEVICES ON supersedes DEFAULT_NO_DEVICES ON.")
+ set(DEFAULT_NO_DEVICES OFF
+ CACHE BOOL
+ "Disable all devices by default (ON) or enable devices individually by default (OFF)"
+ FORCE
+ )
+endif(DEFAULT_ALL_DEVICES AND DEFAULT_NO_DEVICES)
-if(DEFAULT_NO_DEVICES AND DEFAULT_ALL_DEVICES)
- message(STATUS
- "WARNING. DEFAULT_NO_DEVICES ON supersedes DEFAULT_ALL_DEVICES ON.")
- set(DEFAULT_ALL_DEVICES OFF
- CACHE BOOL
- "Enable all (ON) or enable individually (OFF) devices by default"
- FORCE
+option(DEFAULT_NO_QT_DEVICES
+ "Disable all qt devices by default (ON) or enable qt devices individually by default (OFF)"
+ OFF
)
-endif(DEFAULT_NO_DEVICES AND DEFAULT_ALL_DEVICES)
+option(DEFAULT_NO_CAIRO_DEVICES
+ "Disable all cairo devices by default (ON) or enable cairo devices individually by default (OFF)"
+ OFF
+ )
+if(DEFAULT_ALL_DEVICES)
+ if(DEFAULT_NO_QT_DEVICES)
+ message(STATUS
+ "WARNING. DEFAULT_ALL_DEVICES ON supersedes DEFAULT_NO_QT_DEVICES ON.")
+ set(DEFAULT_NO_QT_DEVICES OFF
+ CACHE BOOL
+ "Disable all qt devices by default (ON) or enable qt devices individually by default (OFF)"
+ FORCE
+ )
+ endif(DEFAULT_NO_QT_DEVICES)
+
+ if(DEFAULT_NO_CAIRO_DEVICES)
+ message(STATUS
+ "WARNING. DEFAULT_ALL_DEVICES ON supersedes DEFAULT_NO_CAIRO_DEVICES ON.")
+ set(DEFAULT_NO_CAIRO_DEVICES OFF
+ CACHE BOOL
+ "Disable all cairo devices by default (ON) or enable cairo devices individually by default (OFF)"
+ FORCE
+ )
+ endif(DEFAULT_NO_CAIRO_DEVICES)
+endif(DEFAULT_ALL_DEVICES)
+
# The DRIVERS_DEVICE_LIST defined below is a list of
# <device>:<drive>:<enable_default> items. <enable_default> should be
# "ON" or "OFF" and this will reflect in inclusion/exclusion by default
@@ -71,107 +102,111 @@
# consumption, but this is not necessary.
set(DRIVERS_DEVICE_LIST
-"aqt:aqt:ON"
-# memcairo does not work so turn it off by default.
-# The remaining cairo devices work well so turn them on by default.
-"memcairo:cairo:OFF"
-"extcairo:cairo:ON"
-"pdfcairo:cairo:ON"
-"pngcairo:cairo:ON"
-"pscairo:cairo:ON"
-"svgcairo:cairo:ON"
-"xcairo:cairo:ON"
-"cgm:cgm:ON"
-"dg300:dg300:OFF"
-"epsqt:qt:ON"
-"pdfqt:qt:ON"
-"qtwidget:qt:ON"
-"bmpqt:qt:ON"
-"jpgqt:qt:ON"
-"pngqt:qt:ON"
-"ppmqt:qt:ON"
-"tiffqt:qt:ON"
-"extqt:qt:ON"
-# Currently does not validate at http://validator.w3.org/, but that appears
-# to be a result of the validator being unfamiliar with SVG-1.2 (a draft
-# SVG standard that has not been finalized yet) which is produced
-# by Qt4. The validation errors
-# referred to the version number (1.2) and one attribute (vector-effect)
-# which is clearly documented in the 1.2 draft. Also, text offset issues
-# which were in SVG results produced by QT-4.4.3 are gone for QT-4.5.0.
-# Therefore, the conclusion is to enable svgqt by default.
-"svgqt:qt:ON"
-# gd related devices are not maintained.
-"gif:gd:OFF"
-"jpeg:gd:OFF"
-"png:gd:OFF"
-# gcw is not maintained.
-"gcw:gcw:OFF"
-# Do not implement gnome which is superseded by gcw
-#"gnome:gnome:OFF"
-# Produces ton of "Invalid pen selection." messages
-"hp7470:hpgl:OFF"
-# Produces ton of "Invalid pen selection." messages
-"hp7580:hpgl:OFF"
-# Segfaults.
-"lj_hpgl:hpgl:OFF"
-"imp:impress:OFF"
-# Default off because poorly maintained (colours are incorrect)
-# must use software fill, and must run as root.
-"linuxvga:linuxvga:OFF"
-"ljii:ljii:OFF"
-"ljiip:ljiip:OFF"
-"mem:mem:ON"
-"ntk:ntk:OFF"
-"null:null:ON"
-# glibc detects double free
-"pbm:pbm:OFF"
-"pdf:pdf:OFF"
-# (2007-09-01) As discussed on list, don't enable plmeta until we sort
-# out the known issues (e.g., strings, aspect ratio, and TrueType fonts).
-# This is going to take time/energy for some volunteer who has not volunteered
-# yet.... :-)
-"plmeta:plmeta:OFF"
-"ps:ps:ON"
-# No longer segfaults, but still default OFF because cleaner/better ways
-# (psttf and pscairo) to get modern fonts for postscript results.
-"pstex:pstex:OFF"
-"psttf:psttf:ON"
-"svg:svg:ON"
-"conex:tek:OFF"
-"mskermit:tek:OFF"
-"tek4010:tek:OFF"
-"tek4010f:tek:OFF"
-"tek4107:tek:OFF"
-"tek4107f:tek:OFF"
-"versaterm:tek:OFF"
-"vlt:tek:OFF"
-"xterm:tek:OFF"
-"tk:tk:ON"
-"tkwin:tkwin:ON"
-"wingcc:wingcc:ON"
-"wxwidgets:wxwidgets:ON"
-"wxpng:wxwidgets:OFF"
-"xfig:xfig:ON"
-"xwin:xwin:ON"
-)
+ "aqt:aqt:ON"
+ # memcairo does not work so turn it off by default.
+ # The remaining cairo devices work well so turn them on by default.
+ "memcairo:cairo:OFF"
+ "extcairo:cairo:ON"
+ "pdfcairo:cairo:ON"
+ "pngcairo:cairo:ON"
+ "pscairo:cairo:ON"
+ "svgcairo:cairo:ON"
+ "xcairo:cairo:ON"
+ "cgm:cgm:ON"
+ "dg300:dg300:OFF"
+ "epsqt:qt:ON"
+ "pdfqt:qt:ON"
+ "qtwidget:qt:ON"
+ "bmpqt:qt:ON"
+ "jpgqt:qt:ON"
+ "pngqt:qt:ON"
+ "ppmqt:qt:ON"
+ "tiffqt:qt:ON"
+ "extqt:qt:ON"
+ # Currently does not validate at http://validator.w3.org/, but that appears
+ # to be a result of the validator being unfamiliar with SVG-1.2 (a draft
+ # SVG standard that has not been finalized yet) which is produced
+ # by Qt4. The validation errors
+ # referred to the version number (1.2) and one attribute (vector-effect)
+ # which is clearly documented in the 1.2 draft. Also, text offset issues
+ # which were in SVG results produced by QT-4.4.3 are gone for QT-4.5.0.
+ # Therefore, the conclusion is to enable svgqt by default.
+ "svgqt:qt:ON"
+ # gd related devices are not maintained.
+ "gif:gd:OFF"
+ "jpeg:gd:OFF"
+ "png:gd:OFF"
+ # gcw is not maintained.
+ "gcw:gcw:OFF"
+ # Do not implement gnome which is superseded by gcw
+ #"gnome:gnome:OFF"
+ # Produces ton of "Invalid pen selection." messages
+ "hp7470:hpgl:OFF"
+ # Produces ton of "Invalid pen selection." messages
+ "hp7580:hpgl:OFF"
+ # Segfaults.
+ "lj_hpgl:hpgl:OFF"
+ "imp:impress:OFF"
+ # Default off because poorly maintained (colours are incorrect)
+ # must use software fill, and must run as root.
+ "linuxvga:linuxvga:OFF"
+ "ljii:ljii:OFF"
+ "ljiip:ljiip:OFF"
+ "mem:mem:ON"
+ "ntk:ntk:OFF"
+ "null:null:ON"
+ # glibc detects double free
+ "pbm:pbm:OFF"
+ "pdf:pdf:OFF"
+ # (2007-09-01) As discussed on list, don't enable plmeta until we sort
+ # out the known issues (e.g., strings, aspect ratio, and TrueType fonts).
+ # This is going to take time/energy for some volunteer who has not volunteered
+ # yet.... :-)
+ "plmeta:plmeta:OFF"
+ "ps:ps:ON"
+ # No longer segfaults, but still default OFF because cleaner/better ways
+ # (psttf and pscairo) to get modern fonts for postscript results.
+ "pstex:pstex:OFF"
+ "psttf:psttf:ON"
+ "svg:svg:ON"
+ "conex:tek:OFF"
+ "mskermit:tek:OFF"
+ "tek4010:tek:OFF"
+ "tek4010f:tek:OFF"
+ "tek4107:tek:OFF"
+ "tek4107f:tek:OFF"
+ "versaterm:tek:OFF"
+ "vlt:tek:OFF"
+ "xterm:tek:OFF"
+ "tk:tk:ON"
+ "tkwin:tkwin:ON"
+ "wingcc:wingcc:ON"
+ "wxwidgets:wxwidgets:ON"
+ "wxpng:wxwidgets:OFF"
+ "xfig:xfig:ON"
+ "xwin:xwin:ON"
+ )
-set(PRESET_DEFAULT OFF)
-
if(DEFAULT_ALL_DEVICES)
set(DEFAULT ON)
set(PRESET_DEFAULT ON)
-endif(DEFAULT_ALL_DEVICES)
-
-if(DEFAULT_NO_DEVICES)
+elseif(DEFAULT_NO_DEVICES)
set(DEFAULT OFF)
set(PRESET_DEFAULT ON)
-endif(DEFAULT_NO_DEVICES)
+else(DEFAULT_ALL_DEVICES)
+ set(PRESET_DEFAULT OFF)
+endif(DEFAULT_ALL_DEVICES)
foreach(DRIVERS_DEVICE ${DRIVERS_DEVICE_LIST})
string(REGEX REPLACE "^(.*):.*:.*$" "\\1" DEVICE ${DRIVERS_DEVICE})
if(NOT PRESET_DEFAULT)
- string(REGEX REPLACE "^.*:.*:(.*)$" "\\1" DEFAULT ${DRIVERS_DEVICE})
+ if(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt")
+ set(DEFAULT OFF)
+ elseif(DEFAULT_NO_CAIRO_DEVICES AND DEVICE MATCHES ".*cairo.*")
+ set(DEFAULT OFF)
+ else(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt")
+ string(REGEX REPLACE "^.*:.*:(.*)$" "\\1" DEFAULT ${DRIVERS_DEVICE})
+ endif(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt")
endif(NOT PRESET_DEFAULT)
option(PLD_${DEVICE} "Enable ${DEVICE} device" ${DEFAULT})
endforeach(DRIVERS_DEVICE)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|