|
From: <arj...@us...> - 2013-09-07 08:29:48
|
Revision: 12502
http://sourceforge.net/p/plplot/code/12502
Author: arjenmarkus
Date: 2013-09-07 08:29:45 +0000 (Sat, 07 Sep 2013)
Log Message:
-----------
Rearrange the order of including header files to avoid a conflict between the Windows header and the X11 header - the latter defines the macro Status which the first uses as an argument name.
Furthermore, because of the routine cairo_win32_surface_create is missing from the cairo library, we can not build the wincairo device. For now this is turned off under Cygwin.
Modified Paths:
--------------
trunk/cmake/modules/cairo.cmake
trunk/drivers/cairo.c
Modified: trunk/cmake/modules/cairo.cmake
===================================================================
--- trunk/cmake/modules/cairo.cmake 2013-08-30 19:13:41 UTC (rev 12501)
+++ trunk/cmake/modules/cairo.cmake 2013-09-07 08:29:45 UTC (rev 12502)
@@ -36,7 +36,7 @@
# cairo_LINK_FLAGS - list of full path names of libraries and
# linker flags for dynamic cairo device driver.
# cairo_RPATH - RPATH directory list for cairo device driver.
-# current assumption is the list only has one
+# current assumption is the list only has one
# element corresponding to the pkg-config libdir
# variable for pangocairo.
# DRIVERS_LINK_FLAGS - list of device LINK_FLAGS for case
@@ -55,13 +55,13 @@
OR PLD_pngcairo
OR PLD_pscairo
OR PLD_epscairo
- OR PLD_svgcairo
+ OR PLD_svgcairo
OR PLD_xcairo
OR PLD_extcairo
OR PLD_wincairo
)
if(NOT PKG_CONFIG_EXECUTABLE)
- message(STATUS
+ message(STATUS
"WARNING: pkg-config not found. Setting cairo drivers to OFF."
)
set(PLD_memcairo OFF CACHE BOOL "Enable memcairo device" FORCE)
@@ -80,7 +80,7 @@
OR PLD_pngcairo
OR PLD_pscairo
OR PLD_epscairo
- OR PLD_svgcairo
+ OR PLD_svgcairo
OR PLD_xcairo
OR PLD_extcairo
OR PLD_wincairo
@@ -92,7 +92,7 @@
OR PLD_pngcairo
OR PLD_pscairo
OR PLD_epscairo
- OR PLD_svgcairo
+ OR PLD_svgcairo
OR PLD_xcairo
OR PLD_extcairo
OR PLD_wincairo
@@ -101,13 +101,13 @@
pangocairo
includedir
linkdir
- linkflags
+ linkflags
cflags
version
_CAIRO
)
if(linkflags)
- # Check that the pangocairo library version is recent
+ # Check that the pangocairo library version is recent
# enough to efficiently handle text clipping.
# If it is not then we print a warning.
transform_version(NUMERICAL_PANGOCAIRO_MINIMUM_VERSION "1.20.5")
@@ -119,12 +119,12 @@
filter_rpath(cairo_RPATH)
if(PLD_xcairo AND X11_COMPILE_FLAGS)
# Blank-delimited required.
- string(REGEX REPLACE ";" " "
+ string(REGEX REPLACE ";" " "
cairo_COMPILE_FLAGS "${cflags} ${X11_COMPILE_FLAGS}"
)
set(cairo_LINK_FLAGS ${linkflags} ${X11_LIBRARIES})
else(PLD_xcairo AND X11_COMPILE_FLAGS)
- message(STATUS
+ message(STATUS
"WARNING: X windows not found. Setting xcairo driver to OFF."
)
# Blank-delimited required.
@@ -133,7 +133,7 @@
string(REGEX REPLACE ";" " " cairo_COMPILE_FLAGS "${cflags}")
set(cairo_LINK_FLAGS ${linkflags})
endif(PLD_xcairo AND X11_COMPILE_FLAGS)
-
+
#message("cairo_COMPILE_FLAGS = ${cairo_COMPILE_FLAGS}")
#message("cairo_LINK_FLAGS = ${cairo_LINK_FLAGS}")
@@ -165,7 +165,7 @@
OR PLD_pngcairo
OR PLD_pscairo
OR PLD_epscairo
- OR PLD_svgcairo
+ OR PLD_svgcairo
OR PLD_xcairo
OR PLD_extcairo
OR PLD_wincairo
@@ -180,8 +180,15 @@
endif(NOT PLD_extcairo)
if(NOT WIN32_OR_CYGWIN)
- message(STATUS
+ message(STATUS
"Not a Windows platform so setting wincairo driver to OFF."
)
set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE)
+else(NOT WIN32_OR_CYGWIN)
+ if(CYGWIN)
+ message(STATUS
+ "Cygwin does not currently provide support for the wincairo driver - turning this OFF."
+ )
+ set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE)
+ endif(CYGWIN)
endif(NOT WIN32_OR_CYGWIN)
Modified: trunk/drivers/cairo.c
===================================================================
--- trunk/drivers/cairo.c 2013-08-30 19:13:41 UTC (rev 12501)
+++ trunk/drivers/cairo.c 2013-09-07 08:29:45 UTC (rev 12502)
@@ -41,6 +41,9 @@
#include "drivers.h"
// Driver-dependent includes
+#if defined ( PLD_wincairo )
+#include <windows.h>
+#endif
#if defined ( PLD_xcairo )
#include <cairo-xlib.h>
#include <X11/X.h>
@@ -58,10 +61,8 @@
#if defined ( PLD_svgcairo )
#include <cairo-svg.h>
#endif
-#if defined ( PLD_wincairo )
-#include <windows.h>
-#endif
+
//--------------------------------------------------------------------------
// Constants & global (to this file) variables
//--------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|