|
From: <ai...@us...> - 2013-07-09 21:32:05
|
Revision: 12411
http://sourceforge.net/p/plplot/code/12411
Author: airwin
Date: 2013-07-09 21:32:02 +0000 (Tue, 09 Jul 2013)
Log Message:
-----------
Change all instances of WIN32 to WIN32_OR_CYGWIN to be consistent with
modern CMake which does not set WIN32 to be ON for the Cygwin
platform.
Untested since I have no access to a Cygwin platform. But the
build system now has a chance to work for that case so Cygwin
platform testing is now encouraged.
Modified Paths:
--------------
trunk/bindings/f77/CMakeLists.txt
trunk/bindings/f95/CMakeLists.txt
trunk/bindings/python/CMakeLists.txt
trunk/bindings/qt_gui/pyqt4/CMakeLists.txt
trunk/cmake/modules/FindGD.cmake
trunk/cmake/modules/cairo.cmake
trunk/cmake/modules/drivers.cmake
trunk/cmake/modules/fortran.cmake
trunk/cmake/modules/freetype.cmake
trunk/cmake/modules/pdf.cmake
trunk/cmake/modules/plplot.cmake
trunk/cmake/modules/wingcc.cmake
trunk/drivers/CMakeLists.txt
trunk/examples/lua/CMakeLists.txt
trunk/lib/qsastime/CMakeLists.txt
Modified: trunk/bindings/f77/CMakeLists.txt
===================================================================
--- trunk/bindings/f77/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/bindings/f77/CMakeLists.txt 2013-07-09 21:32:02 UTC (rev 12411)
@@ -78,7 +78,7 @@
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/sfstubs.f
PROPERTIES GENERATED ON)
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
# Set the flags for the C compiler. The C stubs need to have the
# correction case and calling convention for the Fortran compiler
IF(TARGET_FORTRAN MATCHES "IVF")
@@ -88,7 +88,7 @@
SET(DEFFILE "")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DCVF")
ENDIF(TARGET_FORTRAN MATCHES "IVF")
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
if(F77_CMD_LINE)
set(HAVE_F77PARSE_CL_FALSE C)
Modified: trunk/bindings/f95/CMakeLists.txt
===================================================================
--- trunk/bindings/f95/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/bindings/f95/CMakeLists.txt 2013-07-09 21:32:02 UTC (rev 12411)
@@ -45,7 +45,7 @@
)
## Build C part of F95 bindings
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
# Set the flags for the C compiler. The C stubs need to have the
# correct case and calling convention for the Fortran compiler
IF(TARGET_FORTRAN MATCHES "IVF")
@@ -55,7 +55,7 @@
SET(DEFFILE "")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DCVF")
ENDIF(TARGET_FORTRAN MATCHES "IVF")
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
set(plplotf95c${LIB_TAG}_LIB_SRCS
sc3d.c
Modified: trunk/bindings/python/CMakeLists.txt
===================================================================
--- trunk/bindings/python/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/bindings/python/CMakeLists.txt 2013-07-09 21:32:02 UTC (rev 12411)
@@ -86,14 +86,14 @@
)
endif(USE_RPATH)
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
set_target_properties(
_plplotcmodule
PROPERTIES
SUFFIX ".pyd"
OUTPUT_NAME "_plplotc"
)
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
add_library(plplot_widgetmodule MODULE plplot_widgetmodule.c)
set_target_properties(plplot_widgetmodule PROPERTIES PREFIX "")
Modified: trunk/bindings/qt_gui/pyqt4/CMakeLists.txt
===================================================================
--- trunk/bindings/qt_gui/pyqt4/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/bindings/qt_gui/pyqt4/CMakeLists.txt 2013-07-09 21:32:02 UTC (rev 12411)
@@ -69,16 +69,16 @@
${plplot_pyqt4_SRC}
)
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
set_target_properties(
plplot_pyqt4
PROPERTIES
PREFIX ""
SUFFIX ".pyd"
)
- else(WIN32)
+ else(WIN32_OR_CYGWIN)
set_target_properties(plplot_pyqt4 PROPERTIES PREFIX "")
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
target_link_libraries(
plplot_pyqt4
Modified: trunk/cmake/modules/FindGD.cmake
===================================================================
--- trunk/cmake/modules/FindGD.cmake 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/cmake/modules/FindGD.cmake 2013-07-09 21:32:02 UTC (rev 12411)
@@ -16,7 +16,7 @@
if(WIN32_AND_NOT_CYGWIN)
set(GD_NAMES ${GD_NAMES} bgd)
-else(WIN32)
+else(WIN32_AND_NOT_CYGWIN)
set(GD_NAMES ${GD_NAMES} gd)
endif(WIN32_AND_NOT_CYGWIN)
Modified: trunk/cmake/modules/cairo.cmake
===================================================================
--- trunk/cmake/modules/cairo.cmake 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/cmake/modules/cairo.cmake 2013-07-09 21:32:02 UTC (rev 12411)
@@ -179,9 +179,9 @@
set(extcairo_true "#")
endif(NOT PLD_extcairo)
-if(NOT WIN32)
+if(NOT WIN32_OR_CYGWIN)
message(STATUS
"Not a Windows platform so setting wincairo driver to OFF."
)
set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE)
-endif(NOT WIN32)
+endif(NOT WIN32_OR_CYGWIN)
Modified: trunk/cmake/modules/drivers.cmake
===================================================================
--- trunk/cmake/modules/drivers.cmake 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/cmake/modules/drivers.cmake 2013-07-09 21:32:02 UTC (rev 12411)
@@ -43,12 +43,12 @@
set(ENABLE_DYNDRIVERS OFF CACHE BOOL
"Enable dynamic loading of device drivers" FORCE)
endif(ENABLE_DYNDRIVERS AND NOT BUILD_SHARED_LIBS)
-if(ENABLE_DYNDRIVERS AND WIN32)
+if(ENABLE_DYNDRIVERS AND WIN32_OR_CYGWIN)
if(NOT CYGWIN)
set(LTDL_WIN32 ON)
set(LTDL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
endif(NOT CYGWIN)
-endif(ENABLE_DYNDRIVERS AND WIN32)
+endif(ENABLE_DYNDRIVERS AND WIN32_OR_CYGWIN)
if(ENABLE_DYNDRIVERS AND NOT LTDL_WIN32)
find_package(LTDL)
if(LTDL_FOUND)
Modified: trunk/cmake/modules/fortran.cmake
===================================================================
--- trunk/cmake/modules/fortran.cmake 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/cmake/modules/fortran.cmake 2013-07-09 21:32:02 UTC (rev 12411)
@@ -95,10 +95,10 @@
set(TARGET_FORTRAN "CVF" CACHE STRING "Target Fortran Compiler")
endif(CMAKE_Fortran_COMPILER MATCHES ".*/DF.*")
- if(CMAKE_Fortran_COMPILER MATCHES ".*/F90.*" AND WIN32)
+ if(CMAKE_Fortran_COMPILER MATCHES ".*/F90.*" AND WIN32_OR_CYGWIN)
# Compaq Visual Fortran - alternative name
message(STATUS "NOTICE: " "Found Compaq Visual Fortran")
set(TARGET_FORTRAN "CVF" CACHE STRING "Target Fortran Compiler")
- endif(CMAKE_Fortran_COMPILER MATCHES ".*/F90.*" AND WIN32)
+ endif(CMAKE_Fortran_COMPILER MATCHES ".*/F90.*" AND WIN32_OR_CYGWIN)
endif(ENABLE_f77 OR ENABLE_f95)
Modified: trunk/cmake/modules/freetype.cmake
===================================================================
--- trunk/cmake/modules/freetype.cmake 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/cmake/modules/freetype.cmake 2013-07-09 21:32:02 UTC (rev 12411)
@@ -41,19 +41,19 @@
if (WITH_FREETYPE)
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
set(
PL_FREETYPE_FONT_PATH
"c:/windows/fonts"
CACHE PATH "Path for TrueType fonts"
)
- else(WIN32)
+ else(WIN32_OR_CYGWIN)
set(
PL_FREETYPE_FONT_PATH
"/usr/share/fonts/truetype/freefont"
CACHE PATH "Path for TrueType fonts"
)
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
# PLplot internally needs a trailing slash for this path.
set(PL_FREETYPE_FONT_DIR "${PL_FREETYPE_FONT_PATH}/")
@@ -92,11 +92,11 @@
foreach(FONT_ENTRY ${PL_FREETYPE_FONT_LIST})
string(REGEX REPLACE "^(.*):.*:.*$" "\\1" NAME ${FONT_ENTRY})
- if (WIN32)
+ if (WIN32_OR_CYGWIN)
string(REGEX REPLACE "^.*:.*:(.*)$" "\\1" FONT ${FONT_ENTRY})
- else (WIN32)
+ else (WIN32_OR_CYGWIN)
string(REGEX REPLACE "^.*:(.*):.*$" "\\1" FONT ${FONT_ENTRY})
- endif (WIN32)
+ endif (WIN32_OR_CYGWIN)
set(${NAME} ${FONT}
CACHE FILEPATH "Font file for ${NAME}"
)
Modified: trunk/cmake/modules/pdf.cmake
===================================================================
--- trunk/cmake/modules/pdf.cmake 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/cmake/modules/pdf.cmake 2013-07-09 21:32:02 UTC (rev 12411)
@@ -32,13 +32,13 @@
find_package(hpdf)
if(hpdf_FOUND)
message(STATUS "Looking for haru pdf header and library - found")
- if(WIN32 AND NOT CMAKE_COMPILER_IS_GNUCC)
+ if(WIN32_OR_CYGWIN AND NOT CMAKE_COMPILER_IS_GNUCC)
set(pdf_COMPILE_FLAGS "-I${hpdf_INCLUDE_DIRS} -DHPDF_DLL")
- elseif(WIN32 AND CMAKE_COMPILER_IS_GNUCC)
+ elseif(WIN32_OR_CYGWIN AND CMAKE_COMPILER_IS_GNUCC)
set(pdf_COMPILE_FLAGS "-I${hpdf_INCLUDE_DIRS} -DHPDF_DLL_CDECL")
- else(WIN32 AND NOT CMAKE_COMPILER_IS_GNUCC)
+ else(WIN32_OR_CYGWIN AND NOT CMAKE_COMPILER_IS_GNUCC)
set(pdf_COMPILE_FLAGS "-I${hpdf_INCLUDE_DIRS}")
- endif(WIN32 AND NOT CMAKE_COMPILER_IS_GNUCC)
+ endif(WIN32_OR_CYGWIN AND NOT CMAKE_COMPILER_IS_GNUCC)
set(pdf_LINK_FLAGS "${hpdf_LIBRARIES}")
set(pdf_RPATH ${hpdf_LIBRARY_DIRS})
filter_rpath(pdf_RPATH)
Modified: trunk/cmake/modules/plplot.cmake
===================================================================
--- trunk/cmake/modules/plplot.cmake 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/cmake/modules/plplot.cmake 2013-07-09 21:32:02 UTC (rev 12411)
@@ -42,11 +42,11 @@
# transitively linked by default by CMake and also by pkg-config (used
# to generate compile and link flags for the traditional build and
# test system of the installed examples).
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
option(NON_TRANSITIVE "Option to use non-transitive linking" OFF)
- else(WIN32)
+ else(WIN32_OR_CYGWIN)
option(NON_TRANSITIVE "Option to use non-transitive linking" ON)
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
else(BUILD_SHARED_LIBS)
set(NON_TRANSITIVE OFF CACHE BOOL "Option to use non-transitive linking" FORCE)
endif(BUILD_SHARED_LIBS)
@@ -85,10 +85,10 @@
# Note, must come before java since that depends on, e.g., LIB_DIR.
# =======================================================================
-# WIN32 covers CYGWIN as well (and possibly MINGW, but we will make sure).
-if(WIN32 OR MINGW)
+# WIN32_OR_CYGWIN covers CYGWIN as well (and possibly MINGW, but we will make sure).
+if(WIN32_OR_CYGWIN OR MINGW)
set(EXEEXT .exe)
-endif(WIN32 OR MINGW)
+endif(WIN32_OR_CYGWIN OR MINGW)
include(double)
include(instdirs)
@@ -143,10 +143,10 @@
# create a devpackage file
option(DEVPAK "Create DevPackage" NO)
-if(DEVPAK AND NOT WIN32)
+if(DEVPAK AND NOT WIN32_OR_CYGWIN)
message( STATUS "DevPackage only available for Win32. Set DEVPAK to OFF." )
set(DEVPAK OFF)
-endif(DEVPAK AND NOT WIN32)
+endif(DEVPAK AND NOT WIN32_OR_CYGWIN)
if(DEVPAK AND BUILD_TEST)
message( STATUS "Examples are not build for DevPackage. Set BUILD_TEST to OFF." )
set(BUILD_TEST OFF)
@@ -479,7 +479,7 @@
# compilers are enabled (C is already enabled for the whole project
# and C++ should be enabled above).
# =======================================================================
-if(WIN32 AND NOT MINGW)
+if(WIN32_OR_CYGWIN AND NOT MINGW)
# MinGW excluded because it does not enable a static runtime according
# to http://lists-archives.com/mingw-users/00126-mingw-msvc-md-mt-ml.html .
option(STATIC_RUNTIME "Set Windows non-MinGW compiler static runtime linkage if requested" OFF)
@@ -504,7 +504,7 @@
endif(${flag_var} MATCHES "/MD")
endforeach(flag_var ${flag_vars})
endif(STATIC_RUNTIME)
-endif(WIN32 AND NOT MINGW)
+endif(WIN32_OR_CYGWIN AND NOT MINGW)
# =======================================================================
# additional library support
@@ -512,12 +512,12 @@
include(freetype)
# On windows systems the math library is not separated so do not specify
# it unless you are on a non-windows system.
-if(NOT WIN32)
+if(NOT WIN32_OR_CYGWIN)
find_library(MATH_LIB NAMES m PATHS /usr/local/lib /usr/lib)
if(NOT MATH_LIB)
message(FATAL_ERROR "Cannot find required math library")
endif(NOT MATH_LIB)
-endif(NOT WIN32)
+endif(NOT WIN32_OR_CYGWIN)
# Must come after MATH_LIB is defined (or not).
include(csiro)
Modified: trunk/cmake/modules/wingcc.cmake
===================================================================
--- trunk/cmake/modules/wingcc.cmake 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/cmake/modules/wingcc.cmake 2013-07-09 21:32:02 UTC (rev 12411)
@@ -28,9 +28,9 @@
# DRIVERS_LINK_FLAGS - list of LINK_FLAGS for all static devices.
# Windows-only device driver.
-if(PLD_wingcc AND NOT WIN32)
+if(PLD_wingcc AND NOT WIN32_OR_CYGWIN)
set(PLD_wingcc OFF CACHE BOOL "Enable wingcc device" FORCE)
-endif(PLD_wingcc AND NOT WIN32)
+endif(PLD_wingcc AND NOT WIN32_OR_CYGWIN)
if(PLD_wingcc)
message(STATUS "Looking for gdi32 header and library")
Modified: trunk/drivers/CMakeLists.txt
===================================================================
--- trunk/drivers/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/drivers/CMakeLists.txt 2013-07-09 21:32:02 UTC (rev 12411)
@@ -50,12 +50,12 @@
# in windows we move test-drv-info to the dll directory
# otherwise we use the RPATH functionality
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
set_target_properties(
test-drv-info
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/dll
)
- else(WIN32)
+ else(WIN32_OR_CYGWIN)
set(test-drv-info_RPATH
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/src
@@ -71,7 +71,7 @@
INSTALL_RPATH "${test-drv-info_RPATH}"
BUILD_WITH_INSTALL_RPATH ON
)
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
get_target_property(test-drv-info_LOCATION test-drv-info LOCATION)
set(test_dyndrivers_TDEPENDS test-drv-info)
@@ -149,14 +149,14 @@
# the prefix should always be nothing (rather than lib) and the suffix
# should be set in a platform-dependent manner in order for libltdl
# to find the dynamic device.
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
# strace showed that .dll was a must for libltdl on Cygwin.
set(DYNAMIC_SUFFIX ".dll")
- else(WIN32)
+ else(WIN32_OR_CYGWIN)
# So far this works on all non-Cygwin systems, but only Linux and
# Mac OS X have been tested so far.
set(DYNAMIC_SUFFIX ".so")
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
#message("${SOURCE_ROOT_NAME}_RPATH = ${${SOURCE_ROOT_NAME}_RPATH}")
if(USE_RPATH)
Modified: trunk/examples/lua/CMakeLists.txt
===================================================================
--- trunk/examples/lua/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/examples/lua/CMakeLists.txt 2013-07-09 21:32:02 UTC (rev 12411)
@@ -102,11 +102,11 @@
set_property(GLOBAL PROPERTY FILES_examples_lua ${command_DEPENDS})
endif(BUILD_TEST)
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
set(lua_lib_location ${CMAKE_BINARY_DIR}/dll)
- else(WIN32)
+ else(WIN32_OR_CYGWIN)
set(lua_lib_location ${CMAKE_BINARY_DIR}/bindings/lua)
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/plplot_examples.lua.in
${CMAKE_CURRENT_BINARY_DIR}/plplot_examples.lua
Modified: trunk/lib/qsastime/CMakeLists.txt
===================================================================
--- trunk/lib/qsastime/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410)
+++ trunk/lib/qsastime/CMakeLists.txt 2013-07-09 21:32:02 UTC (rev 12411)
@@ -138,9 +138,9 @@
# Don't bother with building qsastime_testlib on Windows because its
# C library is incapable of providing useful time routines to act
# as comparisons with qsastime library results.
- if(WIN32)
+ if(WIN32_OR_CYGWIN)
set(BUILD_QSASTIME_TESTLIB OFF CACHE BOOL "Build qsastime_testlib application which is used to test the qsastime library against the C library time routines" FORCE)
- endif(WIN32)
+ endif(WIN32_OR_CYGWIN)
# qsastime_extra.[ch] provides helper functions for qsastime_test that should
# not be part of the library.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|