Commit 39112ec3 authored by bonnell's avatar bonnell
Browse files

Fix some issues with recent mesa-releated updates that affected the build on windows.

Allow CMAKE_INSTALL_PREFIX to be specified from command-line on windows, without being
over written.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12130 18c085ea-50e0-402c-830e-de6fd14e8384
parent 330173ff
......@@ -78,39 +78,39 @@ IF(NOT WIN32)
MESSAGE(FATAL_ERROR "MESA is required to build VisIt")
ENDIF(NOT MESA_FOUND)
# Need to have the mesa libs.
SET(MY_LIBS ${MESA_LIB})
ELSE(NOT WIN32)
IF(NOT MESA_FOUND)
MESSAGE(WARNING "MESA not found. Proceeding without.")
ENDIF()
ENDIF(NOT WIN32)
SET(MY_LIBS ${MESA_LIB})
# Unix needs X_LIBS and THREAD_LIBS.
IF (NOT WIN32)
IF (CMAKE_X_LIBS)
SET(MY_LIBS ${MY_LIBS} ${CMAKE_X_LIBS})
ENDIF (CMAKE_X_LIBS)
MESSAGE(STATUS "Added unix libs.")
ENDIF (NOT WIN32)
IF (CMAKE_THREAD_LIBS)
SET(MY_LIBS ${MY_LIBS} ${CMAKE_THREAD_LIBS})
ENDIF (CMAKE_THREAD_LIBS)
MESSAGE(STATUS "Added unix libs.")
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.")
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)
IF (WIN32)
# Need these dlls to run the program
IF(EXISTS ${MESA_LIBRARY_DIR}/MesaGL32.dll)
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(EXISTS ${MESA_LIBRARY_DIR}/MesaGL32.dll)
ENDIF (WIN32)
TRY_RUN(TRY_RUN_RESULT HAVE_OSMESA_SIZE
${TRY_RUN_DIR}
${VISIT_SOURCE_DIR}/CMake/FindOSMesaSize.C
......@@ -119,7 +119,7 @@ IF(MESA_FOUND)
"-DLINK_LIBRARIES:STRING=${MY_LIBS}"
OUTPUT_VARIABLE OUTPUT
)
MESSAGE(STATUS "${MSG} - OUTPUT_VARIABLE: ${OUTPUT}")
#MESSAGE(STATUS "${MSG} - OUTPUT_VARIABLE: ${OUTPUT}")
IF (HAVE_OSMESA_SIZE)
IF ("${TRY_RUN_RESULT}" MATCHES "FAILED_TO_RUN")
......
......@@ -141,6 +141,11 @@
# Mark C. Miller, Thu Jul 29 23:43:52 PDT 2010
# Added option to ignore problems finding third party libs. It is OFF
# by default.
#
# Kathleen Bonnell, Thu Aug 5 9:34:52 PDT 2010
# For winodws, only override cmake's default CMAKE_INSTALL_PREFIX if it
# wasn't specified on the command line.
#
#****************************************************************************/
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
......@@ -370,13 +375,17 @@ SET(VISIT_VERSION ${VERSION})
#-----------------------------------------------------------------------------
IF(WIN32)
IF( NOT APPENDED_VISIT_VERSION_TO_INSTALL_PATH)
IF(NOT CMAKE_INSTALL_PREFIX)
# override cmake's default of %Program Files% for CMAKE_INSTALL_PREFIX
# if it wasn't specified via command line,
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
IF( NOT APPENDED_VISIT_VERSION_TO_INSTALL_PATH)
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)
ENDIF( NOT APPENDED_VISIT_VERSION_TO_INSTALL_PATH)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# set up directories
SET(VISIT_INSTALLED_VERSION ${CMAKE_INSTALL_PREFIX}
CACHE PATH "VisIt install directory" FORCE)
SET(VISIT_INSTALLED_VERSION_BIN ${CMAKE_INSTALL_PREFIX}
......
......@@ -39,16 +39,16 @@
#****************************************************************************/
IF(NOT WIN32)
SET(AVTPLOTTER_MESA_SOURCES
vtk/vtkOSMesaRenderWindow.C
)
ENDIF(NOT WIN32)
SET(AVTPLOTTER_MESA_SOURCES
vtk/vtkOSMesaRenderWindow.C
)
SET_SOURCE_FILES_PROPERTIES(
SET_SOURCE_FILES_PROPERTIES(
${AVTPLOTTER_MESA_SOURCES}
PROPERTIES
COMPILE_FLAGS "-I${MESA_INCLUDE_DIR} -I${GLEW_INCLUDE_DIR}"
)
)
ENDIF(NOT WIN32)
SET(AVTPLOTTER_OPENGL_SOURCES
avtGLEWInitializer.C
......
......@@ -28,14 +28,14 @@ avtLabelFilter.C
avtLabelSubsetsFilter.C
avtLabelsMapper.C
avtLabelRenderer.C
avtOpenGLLabelRenderer.C
${COMMON_SOURCES}
)
IF(MESA_FOUND)
SET(LIBV_SOURCES ${LIBV_SOURCES} avtMesaLabelRenderer.C)
ENDIF(MESA_FOUND)
SET(LIBV_SOURCES ${LIBV_SOURCES}
avtOpenGLLabelRenderer.C
${COMMON_SOURCES}
)
SET(LIBE_SOURCES
LabelEnginePluginInfo.C
......@@ -44,14 +44,13 @@ avtLabelFilter.C
avtLabelSubsetsFilter.C
avtLabelsMapper.C
avtLabelRenderer.C
avtOpenGLLabelRenderer.C
${COMMON_SOURCES}
)
IF(MESA_FOUND)
SET(LIBE_SOURCES ${LIBE_SOURCES} avtMesaLabelRenderer.C)
ENDIF(MESA_FOUND)
SET(LIBE_SOURCES ${LIBE_SOURCES}
avtOpenGLLabelRenderer.C
${COMMON_SOURCES}
)
IF (NOT WIN32)
SET_SOURCE_FILES_PROPERTIES(avtOpenGLLabelRenderer.C
......
......@@ -29,17 +29,17 @@ avtSpreadsheetRenderer.C
avtSpreadsheetRenderer_Viewer.C
avtSpreadsheetTraceRenderer.C
avtOpenGLSpreadsheetTraceRenderer.C
)
IF(MESA_FOUND)
SET(LIBV_SOURCES ${LIBV_SOURCES} avtMesaSpreadsheetTraceRenderer.C)
ENDIF()
SET(LIBV_SOURCES ${LIBV_SOURCES}
SpreadsheetViewer.C
SpreadsheetCurveViewer.C
SpreadsheetTable.C
SpreadsheetTabWidget.C
${COMMON_SOURCES}
)
IF(MESA_FOUND)
SET(LIBV_SOURCES ${LIBV_SOURCES} avtMesaSpreadsheetTraceRenderer.C)
ENDIF()
SET(LIBV_MOC_SOURCES
SpreadsheetViewer.h
SpreadsheetCurveViewer.h
......@@ -56,13 +56,12 @@ avtSpreadsheetRenderer.C
avtSpreadsheetRenderer_Engine.C
avtSpreadsheetTraceRenderer.C
avtOpenGLSpreadsheetTraceRenderer.C
${COMMON_SOURCES}
)
IF(MESA_FOUND)
SET(LIBE_SOURCES ${LIBE_SOURCES} avtMesaSpreadsheetTraceRenderer.C)
ENDIF()
SET(LIBE_SOURCES ${LIBE_SOURCES}
${COMMON_SOURCES}
)
IF (NOT WIN32)
SET_SOURCE_FILES_PROPERTIES(avtOpenGLSpreadsheetTraceRenderer.C
......
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