From: <ai...@us...> - 2013-07-09 21:02:33
|
Revision: 12410 http://sourceforge.net/p/plplot/code/12410 Author: airwin Date: 2013-07-09 21:02:31 +0000 (Tue, 09 Jul 2013) Log Message: ----------- Replace WIN32 AND NOT CYGWIN logic everywhere in CMake logic with the variable WIN32_AND_NOT_CYGWIN. Force our build system to use the modern usage which does not set WIN32 on CYGWIN platforms. Because of this change, WIN32_AND_NOT_CYGWIN is defined to be the same as ${WIN32}, but keep the WIN32_AND_NOT_CYGWIN name of the variable just to be clear. Note the Cygwin platform has no chance to work until a further change to replace WIN32 everywhere with WIN32_OR_CYGWIN is completed. That change should be coming soon. Modified Paths: -------------- trunk/CMakeLists.txt trunk/bindings/ada/CMakeLists.txt trunk/bindings/f77/CMakeLists.txt trunk/bindings/f95/CMakeLists.txt trunk/cmake/modules/FindGD.cmake trunk/examples/python/CMakeLists.txt Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2013-07-09 19:27:35 UTC (rev 12409) +++ trunk/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410) @@ -57,6 +57,15 @@ cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR) endif(CMAKE_SYSTEM_NAME STREQUAL "Linux") +# Force CMake to _NOT_ define 'WIN32' on Cygwin +set(CMAKE_LEGACY_CYGWIN_WIN32 OFF) +set(WIN32_AND_NOT_CYGWIN ${WIN32}) +if(WIN32 OR CYGWIN) + set(WIN32_OR_CYGWIN ON) +else(WIN32 OR CYGWIN) + set(WIN32_OR_CYGWIN OFF) +endif(WIN32 OR CYGWIN) + #foreach(policy RANGE 0 9) # cmake_policy(GET CMP000${policy} policy_result) # message(STATUS "Policy CMP000${policy} is ${policy_result}") Modified: trunk/bindings/ada/CMakeLists.txt =================================================================== --- trunk/bindings/ada/CMakeLists.txt 2013-07-09 19:27:35 UTC (rev 12409) +++ trunk/bindings/ada/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410) @@ -70,7 +70,7 @@ # Work around an issue in our CMake Ada language # support for MinGW/Windows. FIXME. This issue should be fixed # at the Ada language support level and not worked around here. - if(WIN32 AND NOT CYGWIN) + if(WIN32_AND_NOT_CYGWIN) add_custom_command( TARGET plplotada${LIB_TAG} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different @@ -78,7 +78,7 @@ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/dll VERBATIM ) - endif(WIN32 AND NOT CYGWIN) + endif(WIN32_AND_NOT_CYGWIN) target_link_libraries(plplotada${LIB_TAG} plplot${LIB_TAG} ${GNAT_LIB} Modified: trunk/bindings/f77/CMakeLists.txt =================================================================== --- trunk/bindings/f77/CMakeLists.txt 2013-07-09 19:27:35 UTC (rev 12409) +++ trunk/bindings/f77/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410) @@ -185,9 +185,9 @@ configurable.f ) - if(WIN32 AND BUILD_SHARED_LIBS AND NOT CYGWIN AND NOT MINGW) + if(WIN32_AND_NOT_CYGWIN AND BUILD_SHARED_LIBS AND NOT MINGW) SET(plplotf77${LIB_TAG}_LIB_SRCS ${plplotf77${LIB_TAG}_LIB_SRCS} plplotf77${DEFFILE}.def) - endif(WIN32 AND BUILD_SHARED_LIBS AND NOT CYGWIN AND NOT MINGW) + endif(WIN32_AND_NOT_CYGWIN AND BUILD_SHARED_LIBS AND NOT MINGW) add_library(plplotf77${LIB_TAG} ${plplotf77${LIB_TAG}_LIB_SRCS}) Modified: trunk/bindings/f95/CMakeLists.txt =================================================================== --- trunk/bindings/f95/CMakeLists.txt 2013-07-09 19:27:35 UTC (rev 12409) +++ trunk/bindings/f95/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410) @@ -131,9 +131,9 @@ sfstubsf95.f90 ) - if(WIN32 AND BUILD_SHARED_LIBS AND NOT MINGW AND NOT CYGWIN) + if(WIN32_AND_NOT_CYGWIN AND BUILD_SHARED_LIBS AND NOT MINGW) SET(plplotf95${LIB_TAG}_LIB_SRCS ${plplotf95${LIB_TAG}_LIB_SRCS} plplotf95${DEFFILE}.def) - endif(WIN32 AND BUILD_SHARED_LIBS AND NOT MINGW AND NOT CYGWIN) + endif(WIN32_AND_NOT_CYGWIN AND BUILD_SHARED_LIBS AND NOT MINGW) add_library(plplotf95${LIB_TAG} ${plplotf95${LIB_TAG}_LIB_SRCS}) Modified: trunk/cmake/modules/FindGD.cmake =================================================================== --- trunk/cmake/modules/FindGD.cmake 2013-07-09 19:27:35 UTC (rev 12409) +++ trunk/cmake/modules/FindGD.cmake 2013-07-09 21:02:31 UTC (rev 12410) @@ -14,11 +14,11 @@ /usr/include ) -if(WIN32 AND NOT CYGWIN) +if(WIN32_AND_NOT_CYGWIN) set(GD_NAMES ${GD_NAMES} bgd) else(WIN32) set(GD_NAMES ${GD_NAMES} gd) -endif(WIN32 AND NOT CYGWIN) +endif(WIN32_AND_NOT_CYGWIN) find_library(GD_LIBRARY NAMES ${GD_NAMES} @@ -33,12 +33,12 @@ endif(GD_LIBRARY AND GD_INCLUDE_DIR) if(GD_FOUND) - if(WIN32 AND NOT CYGWIN) + if(WIN32_AND_NOT_CYGWIN) set(GD_SUPPORTS_PNG ON) set(GD_SUPPORTS_JPEG ON) set(GD_SUPPORTS_GIF ON) get_filename_component(GD_LIBRARY_DIR ${GD_LIBRARY} PATH) - else(WIN32 AND NOT CYGWIN) + else(WIN32_AND_NOT_CYGWIN) include(CheckLibraryExists) get_filename_component(GD_LIB_PATH ${GD_LIBRARY} PATH) get_filename_component(GD_LIB ${GD_LIBRARY} NAME) @@ -110,7 +110,7 @@ set(GD_LIBRARY_DIR "${GD_LIBRARY_DIR}" "${GD_NEXTLIBDIR}") endif(NOT GD_TMP_FOUND) endforeach(GD_LIB ${GD_LIBRARIES}) - endif(WIN32 AND NOT CYGWIN) + endif(WIN32_AND_NOT_CYGWIN) endif(GD_FOUND) if(GD_FOUND) Modified: trunk/examples/python/CMakeLists.txt =================================================================== --- trunk/examples/python/CMakeLists.txt 2013-07-09 19:27:35 UTC (rev 12409) +++ trunk/examples/python/CMakeLists.txt 2013-07-09 21:02:31 UTC (rev 12410) @@ -232,11 +232,11 @@ set(python_location1 ${CMAKE_SOURCE_DIR}/bindings/python) set(python_location2 ${CMAKE_BINARY_DIR}/bindings/python) set(python_location3 ${CMAKE_BINARY_DIR}/examples/python) - if(WIN32 AND NOT CYGWIN) + if(WIN32_AND_NOT_CYGWIN) set(python_location4 ${CMAKE_BINARY_DIR}/dll) - else(WIN32 AND NOT CYGWIN) + else(WIN32_AND_NOT_CYGWIN) set(python_location3) - endif(WIN32 AND NOT CYGWIN) + endif(WIN32_AND_NOT_CYGWIN) set(python_location5 ${CMAKE_BINARY_DIR}/bindings/qt_gui/pyqt4) set(python_location6 ${CMAKE_BINARY_DIR}/bindings/gnome2/python) configure_file( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |