Commit b06e0ec1 authored by mdurant's avatar mdurant
Browse files

Patch to enable building on Windows from John Cary, Tech-X

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12082 18c085ea-50e0-402c-830e-de6fd14e8384
parent 5690adbc
......@@ -49,14 +49,16 @@ IF (WIN32)
SET_UP_THIRD_PARTY(GDAL lib/${VISIT_MSVC_VERSION} include gdal_i libjpeg libpng13)
# normally handled in InstallThirdParty.cmake, but gdal has a weird
# naming convention on windows
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy
IF(EXISTS ${GDAL_LIBRARY_DIR}/gdal13.dll)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy
${GDAL_LIBRARY_DIR}/gdal13.dll
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ThirdParty)
INSTALL(FILES ${GDAL_LIBRARY_DIR}/gdal13.dll
INSTALL(FILES ${GDAL_LIBRARY_DIR}/gdal13.dll
DESTINATION ${VISIT_INSTALLED_VERSION_BIN}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
)
ENDIF(EXISTS ${GDAL_LIBRARY_DIR}/gdal13.dll)
ELSEIF(APPLE)
SET_UP_THIRD_PARTY(GDAL lib include gdal.1)
ELSE (WIN32)
......
......@@ -44,7 +44,7 @@
INCLUDE(${VISIT_SOURCE_DIR}/CMake/SetUpThirdParty.cmake)
IF (WIN32)
SET_UP_THIRD_PARTY(HDF5 lib/${VISIT_MSVC_VERSION} include hdf5dll)
SET_UP_THIRD_PARTY(HDF5 "lib/${VISIT_MSVC_VERSION};lib" include hdf5dll)
ELSE (WIN32)
SET_UP_THIRD_PARTY(HDF5 lib include hdf5)
ENDIF (WIN32)
......
......@@ -57,7 +57,8 @@
INCLUDE(${VISIT_SOURCE_DIR}/CMake/SetUpThirdParty.cmake)
IF (WIN32)
SET_UP_THIRD_PARTY(SILO lib/${VISIT_MSVC_VERSION} include silohdf5)
SET_UP_THIRD_PARTY(SILO lib/${VISIT_MSVC_VERSION} include silohdf5)
IF(EXISTS ${SILO_DIR}/lib/${VISIT_MSVC_VERSION}/silex.exe)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy
${SILO_DIR}/lib/${VISIT_MSVC_VERSION}/silex.exe
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ThirdParty)
......@@ -66,6 +67,7 @@ IF (WIN32)
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
)
ENDIF()
ELSE (WIN32)
SET_UP_THIRD_PARTY(SILO lib include siloh5)
ENDIF (WIN32)
......
......@@ -73,14 +73,18 @@ ELSE (WIN32)
)
ENDIF (WIN32)
IF(NOT MESA_FOUND)
IF(NOT WIN32)
IF(NOT MESA_FOUND)
MESSAGE(FATAL_ERROR "MESA is required to build VisIt")
ENDIF(NOT MESA_FOUND)
SET(MSG "Check for osmesa size limit")
MESSAGE(STATUS ${MSG})
ENDIF(NOT MESA_FOUND)
# Need to have the mesa libs.
SET(MY_LIBS ${MESA_LIB})
SET(MY_LIBS ${MESA_LIB})
ELSE(NOT WIN32)
IF(NOT MESA_FOUND)
MESSAGE(WARNING "MESA not found. Proceeding without.")
ENDIF()
ENDIF(NOT WIN32)
# Unix needs X_LIBS and THREAD_LIBS.
IF (NOT WIN32)
IF (CMAKE_X_LIBS)
......@@ -90,25 +94,34 @@ ENDIF (NOT WIN32)
IF (CMAKE_THREAD_LIBS)
SET(MY_LIBS ${MY_LIBS} ${CMAKE_THREAD_LIBS})
ENDIF (CMAKE_THREAD_LIBS)
MESSAGE(STATUS "Added unix libs.")
SET(TRY_RUN_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp)
IF (WIN32)
IF(MESA_FOUND)
IF(EXISTS ${MESA_LIBRARY_DIR}/MesaGL32.dll)
# Need these dlls to run the program
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ${MESA_LIBRARY_DIR}/MesaGL32.dll ${TRY_RUN_DIR}/CMakeFiles/CMakeTmp/debug/MesaGL32.dll)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ${MESA_LIBRARY_DIR}/osmesa32.dll ${TRY_RUN_DIR}/CMakeFiles/CMakeTmp/debug/osmesa32.dll)
ENDIF()
ENDIF()
ENDIF (WIN32)
MESSAGE(STATUS "Copied Windows Mesa libs.")
TRY_RUN(TRY_RUN_RESULT HAVE_OSMESA_SIZE
IF(MESA_FOUND)
SET(MSG "Check for osmesa size limit")
MESSAGE(STATUS ${MSG})
SET(TRY_RUN_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp)
TRY_RUN(TRY_RUN_RESULT HAVE_OSMESA_SIZE
${TRY_RUN_DIR}
${VISIT_SOURCE_DIR}/CMake/FindOSMesaSize.C
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${MESA_INCLUDE_DIR}"
"-DLINK_DIRECTORIES:STRING=${MESA_LIBRARY_DIR}"
"-DLINK_LIBRARIES:STRING=${MY_LIBS}"
OUTPUT_VARIABLE OUTPUT
)
)
MESSAGE(STATUS "${MSG} - OUTPUT_VARIABLE: ${OUTPUT}")
IF (HAVE_OSMESA_SIZE)
IF (HAVE_OSMESA_SIZE)
IF ("${TRY_RUN_RESULT}" MATCHES "FAILED_TO_RUN")
MESSAGE(STATUS "${MSG} - failed to run, defaulting to 4096")
SET(OSMESA_SIZE_LIMIT 4096)
......@@ -128,12 +141,14 @@ IF (HAVE_OSMESA_SIZE)
ENDIF (EXISTS ${CMAKE_BINARY_DIR}/junk.txt)
ENDIF (WIN32)
ENDIF ("${TRY_RUN_RESULT}" MATCHES "FAILED_TO_RUN")
ELSE(HAVE_OSMESA_SIZE)
MESSAGE(STATUS "${MSG} - OUTPUT_VARIABLE: ${OUTPUT}")
ELSE(HAVE_OSMESA_SIZE)
MESSAGE(STATUS "${MSG} - not found, defaulting to 4096")
SET(HAVE_OSMESA_SIZE 0 CACHE INTERNAL "support for osmesa_size")
SET(OSMESA_SIZE_LIMIT 4096)
ENDIF (HAVE_OSMESA_SIZE)
ENDIF()
ELSE()
MESSAGE(STATUS "Mesa not found, OSMESA_SIZE_LIMIT defaulting to 4096")
SET(HAVE_OSMESA_SIZE 0 CACHE INTERNAL "support for osmesa_size")
SET(OSMESA_SIZE_LIMIT 4096)
ENDIF ()
......@@ -74,12 +74,45 @@ IF(NOT "${QT_BIN}" MATCHES "OFF")
MESSAGE(FATAL_ERROR "Qt4 is required to build VisIt.")
ENDIF(NOT QT_FOUND)
ELSE (NOT WIN32)
SET(QT_LIBRARY_DIR ${QT_DIR}/lib/${VISIT_MSVC_VERSION} CACHE PATH "Qt library dir" FORCE )
# MESSAGE("QT_DIR = ${QT_DIR}")
SET(QT_INCLUDE_DIR ${QT_DIR}/include)
SET(QT_BINARY_DIR ${QT_DIR}/lib/${VISIT_MSVC_VERSION} CACHE INTERNAL "" FORCE )
SET(QT_MOC_EXECUTABLE ${QT_DIR}/lib/${VISIT_MSVC_VERSION}/moc.exe )
IF(EXISTS ${QT_DIR}/lib/${VISIT_MSVC_VERSION})
SET(QT_SHAREDLIB_DIR ${QT_DIR}/lib/${VISIT_MSVC_VERSION} CACHE PATH "Qt library dir" FORCE )
SET(QT_LIBRARY_DIR ${QT_DIR}/lib/${VISIT_MSVC_VERSION} CACHE PATH "Qt library dir" FORCE )
SET(QT_BINARY_DIR ${QT_DIR}/lib/${VISIT_MSVC_VERSION} CACHE INTERNAL "" FORCE )
ELSEIF(EXISTS ${QT_DIR}/bin)
# Installed QT now puts dll's in bin, but lib's in lib, and one might need
# to look in both places, with dll prefered.
SET(QT_SHAREDLIB_DIR ${QT_DIR}/bin CACHE PATH "Qt shared library dir" FORCE )
SET(QT_LIBRARY_DIR ${QT_DIR}/lib CACHE PATH "Qt library dir" FORCE )
SET(QT_BINARY_DIR ${QT_DIR}/bin CACHE INTERNAL "" FORCE )
ELSE()
MESSAGE(SEND_ERROR "Neither ${QT_DIR}/lib/${VISIT_MSVC_VERSION} nor ${QT_DIR}/bin exists.")
ENDIF()
SET(QT_MOC_EXECUTABLE ${QT_BINARY_DIR}/moc.exe)
SET(QT_INCLUDES ${QT_INCLUDE_DIR})
SET(QT_WIN_LIBS QtCore QtDesigner QtDesignerComponents QtGui QtNetwork QtOpenGL QtSql QtXml QtSvg Qt QtTest QtMain QtAssistantClient QtHelp QtXml QtXMLPatterns QtUiTools)
# These might be dlls or libs
SET(QT_WIN_LIBS QtDesigner QtDesignerComponents QtSql QtSvg Qt QtTest QtMain QtAssistantClient QtHelp QtXMLPatterns QtUiTools)
FOREACH(QTWINLIB ${QT_WIN_LIBS})
STRING(TOUPPER ${QTWINLIB} upper_qtwinlib)
SET(QT_${upper_qtwinlib}_FOUND 1)
SET(QT_${upper_qtwinlib}_INCLUDE_DIR ${QT_INCLUDE_DIR}/${QTWINLIB} CACHE PATH "The Qt ${QTWINLIB} include dir" FORCE)
IF (EXISTS ${QT_SHAREDLIB_DIR}/${QTWINLIB}4.dll)
SET(QT_${upper_qtwinlib}_LIBRARY ${QT_SHAREDLIB_DIR}/${QTWINLIB}4.dll CACHE STRING "The Qt ${QTWINLIB} library" FORCE)
SET(QT_${upper_qtwinlib}_LIBRARY_RELEASE ${QT_SHAREDLIB_DIR}/${QTWINLIB}4.dll)
ELSEIF (EXISTS ${QT_LIBRARY_DIR}/${QTWINLIB}4.lib)
SET(QT_${upper_qtwinlib}_LIBRARY ${QT_LIBRARY_DIR}/${QTWINLIB}4.lib CACHE STRING "The Qt ${QTWINLIB} library" FORCE)
SET(QT_${upper_qtwinlib}_LIBRARY_RELEASE ${QT_LIBRARY_DIR}/${QTWINLIB}4.lib)
ELSE ()
SET(QT_${upper_qtwinlib}_LIBRARY ${QT_LIBRARY_DIR}/${QTWINLIB}.lib CACHE STRING "The Qt ${QTWINLIB} library" FORCE)
SET(QT_${upper_qtwinlib}_LIBRARY_RELEASE ${QT_LIBRARY_DIR}/${QTWINLIB}.lib)
ENDIF ()
ENDFOREACH(QTWINLIB)
# These are just libs, or the distributed dll is munged.
SET(QT_WIN_LIBS QtCore QtGui QtOpenGL QtNetwork QtXml)
FOREACH(QTWINLIB ${QT_WIN_LIBS})
STRING(TOUPPER ${QTWINLIB} upper_qtwinlib)
SET(QT_${upper_qtwinlib}_FOUND 1)
......@@ -87,11 +120,12 @@ IF(NOT "${QT_BIN}" MATCHES "OFF")
IF (EXISTS ${QT_LIBRARY_DIR}/${QTWINLIB}4.lib)
SET(QT_${upper_qtwinlib}_LIBRARY ${QT_LIBRARY_DIR}/${QTWINLIB}4.lib CACHE STRING "The Qt ${QTWINLIB} library" FORCE)
SET(QT_${upper_qtwinlib}_LIBRARY_RELEASE ${QT_LIBRARY_DIR}/${QTWINLIB}4.lib)
ELSE (EXISTS ${QT_LIBRARY_DIR}/${QTWINLIB}4.lib)
ELSE ()
SET(QT_${upper_qtwinlib}_LIBRARY ${QT_LIBRARY_DIR}/${QTWINLIB}.lib CACHE STRING "The Qt ${QTWINLIB} library" FORCE)
SET(QT_${upper_qtwinlib}_LIBRARY_RELEASE ${QT_LIBRARY_DIR}/${QTWINLIB}.lib)
ENDIF (EXISTS ${QT_LIBRARY_DIR}/${QTWINLIB}4.lib)
ENDIF ()
ENDFOREACH(QTWINLIB)
ENDIF (NOT WIN32)
#
......
......@@ -134,12 +134,14 @@ FOREACH(X ${VTK_INCLUDE_DIRS})
DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
PATTERN ".svn" EXCLUDE
)
INSTALL(DIRECTORY ${X}/../MangleMesaInclude
IF(MESA_FOUND AND EXISTS ${X}/../MangleMesaInclude)
INSTALL(DIRECTORY ${X}/../MangleMesaInclude
DESTINATION ${VISIT_INSTALLED_VERSION_INCLUDE}/vtk/include
FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_WRITE GROUP_READ WORLD_READ
DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
PATTERN ".svn" EXCLUDE
)
)
ENDIF()
ENDIF(EXISTS ${X}/vtkActor.h)
ENDFOREACH(X)
......
......@@ -58,7 +58,7 @@ INCLUDE(${VISIT_SOURCE_DIR}/CMake/ThirdPartyInstallLibrary.cmake)
#
# pkg is the name used to specify the x_DIR (generally upper case name
# of pkg)
# libdirextension is the path beyond x_DIR where the libs may be found.
# libdirextensions are the paths beyond x_DIR where the libs may be found.
# incdirextension is the path beyond x_DIR where the includes may be found.
# libs is the list of library names for this package
#
......@@ -74,7 +74,7 @@ INCLUDE(${VISIT_SOURCE_DIR}/CMake/ThirdPartyInstallLibrary.cmake)
# to make status message for failure to find distinguishable in
# cmake output from other messages.
#
FUNCTION(SET_UP_THIRD_PARTY pkg libdirextension incdirextension libs)
FUNCTION(SET_UP_THIRD_PARTY pkg libdirextensions incdirextension libs)
MESSAGE(STATUS "Looking for ${pkg}")
SET(base_dir "${pkg}_DIR")
SET(base_dir_val "${${base_dir}}")
......@@ -108,7 +108,6 @@ FUNCTION(SET_UP_THIRD_PARTY pkg libdirextension incdirextension libs)
SET("${lib_var}" "")
SET("${inc_dir_var}" "${base_dir_val}/${incdirextension}")
SET("${lib_dir_var}" "${base_dir_val}/${libdirextension}")
IF(NOT EXISTS ${${inc_dir_var}})
IF(IGNORE_THIRD_PARTY_LIB_PROBLEMS)
......@@ -118,15 +117,30 @@ FUNCTION(SET_UP_THIRD_PARTY pkg libdirextension incdirextension libs)
ENDIF(IGNORE_THIRD_PARTY_LIB_PROBLEMS)
RETURN()
ENDIF(NOT EXISTS ${${inc_dir_var}})
##
# Set lib dir to fitst existing of base_dir/extensions
# Minimal intrusion on existing logic, but one might wnat
# to allow libs to exist in multiple directories, as
# they do for Qt.
##
SET(${lib_dir_var} "")
FOREACH(X ${libdirextensions})
IF(EXISTS ${base_dir_val}/${X} AND "${${lib_dir_var}}" STREQUAL "")
SET(${lib_dir_var} ${base_dir_val}/${X})
ENDIF()
ENDFOREACH(X)
IF(NOT EXISTS ${${lib_dir_var}})
#
# If non empty string, lib_dir was found
#
IF("${${lib_dir_var}}" STREQUAL "")
IF(IGNORE_THIRD_PARTY_LIB_PROBLEMS)
MESSAGE(STATUS "\n** \n** \n** Library Directory for ${pkg} (${${lib_dir_var}}) does not exist.\n**\n**")
MESSAGE(STATUS "\n** \n** \n** None of library directories for ${pkg} (${base_dir_val}/${libdirextensions}) exist.\n**\n**")
ELSE(IGNORE_THIRD_PARTY_LIB_PROBLEMS)
MESSAGE(FATAL_ERROR " Library Directory for ${pkg} (${${lib_dir_var}}) does not exist.")
MESSAGE(FATAL_ERROR " None of library directories for ${pkg} (${base_dir_val}/${libdirextensions}) exist.\n**\n**")
ENDIF(IGNORE_THIRD_PARTY_LIB_PROBLEMS)
RETURN()
ENDIF(NOT EXISTS ${${lib_dir_var}})
ENDIF()
# If the inc and lib directories are different then attempt to
# install the include directory.
......
......@@ -117,7 +117,7 @@ FUNCTION(THIRD_PARTY_INSTALL_LIBRARY LIBFILE)
IF(NOT ${tmpLIBFILE} STREQUAL ${LIBREALPATH})
# We need to install a library and its symlinks
GET_FILENAME_COMPONENT(curPATH ${LIBREALPATH} PATH)
IF((NOT ${curPATH} STREQUAL "/usr/lib") AND (NOT ${curPATH} MATCHES "^\\/System\\/Library\\/Frameworks\\/.*"))
IF((NOT ${curPATH} STREQUAL "/usr/lib") AND (NOT ${curPATH} MATCHES "^\\/System\\/Library\\/Frameworks\\/.*") AND (NOT ${curPATH} MATCHES "^\\/Library\\/Frameworks\\/.*"))
GET_FILENAME_COMPONENT(curNAMEWE ${LIBREALPATH} NAME_WE)
GET_FILENAME_COMPONENT(curEXT ${LIBREALPATH} EXT)
STRING(REPLACE "." ";" extList ${curEXT})
......@@ -176,7 +176,8 @@ FUNCTION(THIRD_PARTY_INSTALL_LIBRARY LIBFILE)
ENDIF(IS_DIRECTORY ${curNAMEWithExt})
ENDIF(EXISTS ${curNAMEWithExt})
ENDFOREACH(curNAMEWithExt)
ENDIF((NOT ${curPATH} STREQUAL "/usr/lib") AND (NOT ${curPATH} MATCHES "^\\/System\\/Library\\/Frameworks\\/.*"))
# ENDIF((NOT ${curPATH} STREQUAL "/usr/lib") AND (NOT ${curPATH} MATCHES "^\\/System\\/Library\\/Frameworks\\/.*"))
ENDIF((NOT ${curPATH} STREQUAL "/usr/lib") AND (NOT ${curPATH} MATCHES "^\\/System\\/Library\\/Frameworks\\/.*") AND (NOT ${curPATH} MATCHES "^\\/Library\\/Frameworks\\/.*"))
ELSE(NOT ${tmpLIBFILE} STREQUAL ${LIBREALPATH})
# We need to install just the library
IF(IS_DIRECTORY ${tmpLIBFILE})
......
......@@ -165,11 +165,29 @@ SET(BUILD_SHARED_LIBS 1)
SITE_NAME(HOSTNAME)
#-----------------------------------------------------------------------------
# Add an option to not force cache for 3rd party
#----------------------------------------------------------------------------
OPTION(VISIT_OPTION_DEFAULT_NOFORCE
"Do not force replacement in cache." OFF)
#-----------------------------------------------------------------------------
# Include this computer's config-site if one exists
#-----------------------------------------------------------------------------
FUNCTION(VISIT_OPTION_DEFAULT var)
IF(VISIT_OPTION_DEFAULT_NOFORCE)
# MESSAGE(STATUS "VISIT_OPTION_DEFAULT_NOFORCE is on.")
IF(NOT ${var})
MESSAGE(STATUS "Setting ${var}.")
SET(${var} ${ARGN} CACHE PATH "${var} default value")
ELSE()
MESSAGE(STATUS "Not setting ${var}.")
ENDIF()
ELSE()
# MESSAGE(STATUS "VISIT_OPTION_DEFAULT_NOFORCE is off.")
SET(${var} ${ARGN} CACHE PATH "${var} default value" FORCE)
ENDIF()
ENDFUNCTION(VISIT_OPTION_DEFAULT var)
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/SetupITAPS.cmake)
......@@ -353,9 +371,11 @@ SET(VISIT_VERSION ${VERSION})
IF(WIN32)
IF( NOT APPENDED_VISIT_VERSION_TO_INSTALL_PATH)
IF(NOT CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX "${VISIT_BINARY_DIR}/VisIt ${VISIT_VERSION}"
CACHE PATH "Install path prefix, prepended onto install directories" FORCE)
SET(APPENDED_VISIT_VERSION_TO_INSTALL_PATH TRUE CACHE INTERNAL "")
ENDIF()
ENDIF( NOT APPENDED_VISIT_VERSION_TO_INSTALL_PATH)
SET(VISIT_INSTALLED_VERSION ${CMAKE_INSTALL_PREFIX}
CACHE PATH "VisIt install directory" FORCE)
......@@ -512,7 +532,9 @@ MACRO(VISIT_INSTALL_PLUGINS type)
# not configure, so the dollar sign must be escaped in the string
# below. Then during install, ${BUILD_TYPE} will be expanded.
FOREACH(target ${ARGN})
SET(filename "${VISIT_BINARY_DIR}/exe/\${BUILD_TYPE}/${type}/lib${target}.dll")
# SET(filename "${VISIT_BINARY_DIR}/exe/\${BUILD_TYPE}/${type}/lib${target}.dll")
# JRC 21Jul2010: The files are built directly under exe
SET(filename "${VISIT_BINARY_DIR}/exe/\${BUILD_TYPE}/lib${target}.dll")
INSTALL(FILES ${filename}
DESTINATION ${VISIT_INSTALLED_VERSION_PLUGINS}/${type}
COMPONENT RUNTIME
......@@ -802,7 +824,8 @@ IF(CMAKE_HOST_UNIX)
ADD_DEFINITIONS(-D_LARGEFILE64_SOURCE)
ELSE(CMAKE_HOST_UNIX)
IF(WIN32)
SET(ZLIB_LIBRARY_DIR ${VISIT_WINDOWS_DIR}/ThirdParty/zlib/lib/${VISIT_MSVC_VERSION})
SET(ZLIB_LIBRARY_DIR ${VISIT_WINDOWS_DIR}/ThirdParty/zlib/lib/${VISIT_MSVC_VERSION})
IF(EXISTS ${ZLIB_LIBRARY_DIR}/zlib1.dll)
SET(ZLIB_LIB ${ZLIB_LIBRARY_DIR}/zlib1.lib)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy
${ZLIB_LIBRARY_DIR}/zlib1.dll
......@@ -815,6 +838,7 @@ ELSE(CMAKE_HOST_UNIX)
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
)
ENDIF()
ELSE(WIN32)
SET(ZLIB_LIB vtkzlib)
ENDIF(WIN32)
......
......@@ -38,9 +38,11 @@
#
#****************************************************************************/
IF(NOT WIN32)
SET(AVTPLOTTER_MESA_SOURCES
vtk/vtkOSMesaRenderWindow.C
)
ENDIF(NOT WIN32)
SET_SOURCE_FILES_PROPERTIES(
${AVTPLOTTER_MESA_SOURCES}
......
......@@ -971,6 +971,8 @@ avtXRayImageQuery::CollectImages(int root, int nImageFragments,
delete [] recvBuf;
return image;
#else
return 0;
#endif
}
......
......@@ -74,11 +74,19 @@ SET_SOURCE_FILES_PROPERTIES(
COMPILE_FLAGS "-I ${MESA_INCLUDE_DIR} -I ${OPENGL_INCLUDE_DIR} -I ${GLEW_INCLUDE_DIR}"
)
ELSE (NOT WIN32)
SET_SOURCE_FILES_PROPERTIES(
IF(MESA_FOUND)
SET_SOURCE_FILES_PROPERTIES(
Colleagues/VisWinRendering.C
PROPERTIES
COMPILE_FLAGS "-I ${MESA_INCLUDE_DIR} -I ${GLEW_INCLUDE_DIR}"
)
COMPILE_FLAGS "-I ${MESA_INCLUDE_DIR} -I${GLEW_INCLUDE_DIR}"
)
ELSE()
SET_SOURCE_FILES_PROPERTIES(
Colleagues/VisWinRendering.C
PROPERTIES
COMPILE_FLAGS "-I ${GLEW_INCLUDE_DIR}"
)
ENDIF()
ENDIF (NOT WIN32)
SET(EXCEPTIONS_SOURCES
......
......@@ -2,7 +2,7 @@
IF (MSVC_VERSION)
SET(ERRMSG "You have chosen a compiler version not currently supported. You will need to build all dependent 3rd party libraries with this compiler, and provide the correct locations for them.")
IF (NOT MSVC_VERSION LESS 1600)
MESSAGE(SEND_ERROR "${ERRMSG}")
MESSAGE(WARNING "${ERRMSG}")
ELSEIF (NOT MSVC_VERSION LESS 1500)
SET(VISIT_MSVC_VERSION "MSVC90")
ELSEIF (NOT MSVC_VERSION LESS 1400)
......
......@@ -344,7 +344,9 @@ ${QT_QTXML_INCLUDE_DIR}
${QT_QTUITOOLS_INCLUDE_DIR}
)
LINK_DIRECTORIES(${LIBRARY_OUTPUT_DIRECTORY} ${QT_LIBRARY_DIR})
LINK_DIRECTORIES(${LIBRARY_OUTPUT_DIRECTORY}
${QT_SHAREDLIB_DIR} ${QT_LIBRARY_DIR}
)
SET(GUI_QT_LIBS
${QT_QTUITOOLS_LIBRARY}
......@@ -388,6 +390,13 @@ IF(APPLE)
PROPERTIES
LINK_FLAGS "-framework Carbon"
)
ELSEIF(WIN32)
# Needed because QT-4.6.3 has one library, QT_QTUITOOLS_LIBRARY,
# with a default link library in it.
SET_TARGET_PROPERTIES(gui
PROPERTIES
LINK_FLAGS "/NODEFAULTLIB:libcmt"
)
ENDIF(APPLE)
# Install these targets
......
......@@ -37,7 +37,9 @@
*****************************************************************************/
#include "QvisStripChart.h"
#include <math.h>
// #include <math.h>
#include <cmath>
#include <limits>
#include <QFont>
#include <QPainter>
......@@ -91,15 +93,15 @@ VisItSimStripChart::VisItSimStripChart(QWidget *parent, int winX, int winY )
winYSize = winY;
maxPoint = 1.0;
minPoint =-1.0;
minData = HUGE_VAL;
maxData = -HUGE_VAL;
minData = std::numeric_limits<double>::max();
maxData = -std::numeric_limits<double>::max();
resize(winX,winY);
enableLogScale = FALSE;
// set the timeshift offset to start at the right side of the
// window.
timeShift = width();
setOutOfBandLimits( -HUGE_VAL,HUGE_VAL);
setOutOfBandLimits( -std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
// create in disabled mode
enabled = false;
outOfBandLimitsEnabled = 0;
......@@ -762,8 +764,8 @@ void VisItSimStripChart::reset()
vdelta = 0;
maxPoint = 1.0;
minPoint =-1.0;
minData = HUGE_VAL;
maxData = -HUGE_VAL;
minData = std::numeric_limits<double>::max();
maxData = -std::numeric_limits<double>::max();
currentData = 0.0;
currentCycle = 0;
currentScaledY=0;
......@@ -774,7 +776,7 @@ void VisItSimStripChart::reset()
// window.
timeShift = width();
setOutOfBandLimits( -HUGE_VAL,HUGE_VAL);
setOutOfBandLimits( -std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
points.clear();
// create in disabled mode
enabled = false;
......
......@@ -28,7 +28,11 @@ avtLabelFilter.C
avtLabelSubsetsFilter.C
avtLabelsMapper.C
avtLabelRenderer.C
avtMesaLabelRenderer.C
)
IF(MESA_FOUND)
SET(LIBV_SOURCES ${LIBV_SOURCES} avtMesaLabelRenderer.C)
ENDIF(MESA_FOUND)
SET(LIBV_SOURCES ${LIBV_SOURCES}
avtOpenGLLabelRenderer.C
${COMMON_SOURCES}
)
......@@ -40,7 +44,11 @@ avtLabelFilter.C
avtLabelSubsetsFilter.C
avtLabelsMapper.C
avtLabelRenderer.C
avtMesaLabelRenderer.C
)
IF(MESA_FOUND)
SET(LIBE_SOURCES ${LIBE_SOURCES} avtMesaLabelRenderer.C)
ENDIF(MESA_FOUND)
SET(LIBE_SOURCES ${LIBE_SOURCES}
avtOpenGLLabelRenderer.C
${COMMON_SOURCES}
)
......
......@@ -29,7 +29,11 @@ avtSpreadsheetRenderer.C
avtSpreadsheetRenderer_Viewer.C
avtSpreadsheetTraceRenderer.C
avtOpenGLSpreadsheetTraceRenderer.C
avtMesaSpreadsheetTraceRenderer.C
)
IF(MESA_FOUND)
SET(LIBV_SOURCES ${LIBV_SOURCES} avtMesaSpreadsheetTraceRenderer.C)
ENDIF()
SET(LIBV_SOURCES ${LIBV_SOURCES}
SpreadsheetViewer.C
SpreadsheetCurveViewer.C
SpreadsheetTable.C
......@@ -52,7 +56,11 @@ avtSpreadsheetRenderer.C
avtSpreadsheetRenderer_Engine.C
avtSpreadsheetTraceRenderer.C
avtOpenGLSpreadsheetTraceRenderer.C
avtMesaSpreadsheetTraceRenderer.C
)
IF(MESA_FOUND)
SET(LIBE_SOURCES ${LIBE_SOURCES} avtMesaSpreadsheetTraceRenderer.C)
ENDIF()
SET(LIBE_SOURCES ${LIBE_SOURCES}
${COMMON_SOURCES}
)
......
......@@ -47,6 +47,9 @@ vtkStandardNewMacro(vtkVisItStreamLine);
#define VTK_START_FROM_LOCATION 1
#ifdef WIN32
// JRC 21Jul2010: this hack no longer needed, as vtk patch
// now export StreamArray
#ifndef VTK_STREAM_ARRAY_EXPORTED
//
// VTK does not export these symbols from their Graphics DLL and it causes
// link problems for us on Windows, so define the functions here and hope it
......@@ -90,6 +93,7 @@ vtkStreamer::StreamArray::StreamArray()
this->Direction = VTK_INTEGRATE_FORWARD;
}
#endif
#endif
// Construct object with step size set to 1.0.
vtkVisItStreamLine::vtkVisItStreamLine()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment