VTKCompatibility.cmake 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #=============================================================================
  2. # Copyright 2005-2009 Kitware, Inc.
  3. #
  4. # Distributed under the OSI-approved BSD License (the "License");
  5. # see accompanying file Copyright.txt for details.
  6. #
  7. # This software is distributed WITHOUT ANY WARRANTY; without even the
  8. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. # See the License for more information.
  10. #=============================================================================
  11. # (To distribute this file outside of CMake, substitute the full
  12. # License text for the above reference.)
  13. if(APPLE)
  14. set(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY}")
  15. set(CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_C_CREATE_SHARED_MODULE}")
  16. string( REGEX REPLACE "CMAKE_C_COMPILER"
  17. CMAKE_CXX_COMPILER CMAKE_CXX_CREATE_SHARED_MODULE
  18. "${CMAKE_CXX_CREATE_SHARED_MODULE}")
  19. string( REGEX REPLACE "CMAKE_C_COMPILER"
  20. CMAKE_CXX_COMPILER CMAKE_CXX_CREATE_SHARED_LIBRARY
  21. "${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
  22. endif()
  23. set(VTKFTGL_BINARY_DIR "${VTK_BINARY_DIR}/Utilities/ftgl"
  24. CACHE INTERNAL "")
  25. set(VTKFREETYPE_BINARY_DIR "${VTK_BINARY_DIR}/Utilities/freetype"
  26. CACHE INTERNAL "")
  27. set(VTKFTGL_SOURCE_DIR "${VTK_SOURCE_DIR}/Utilities/ftgl"
  28. CACHE INTERNAL "")
  29. set(VTKFREETYPE_SOURCE_DIR "${VTK_SOURCE_DIR}/Utilities/freetype"
  30. CACHE INTERNAL "")
  31. set(VTK_GLEXT_FILE "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/glext.h"
  32. CACHE FILEPATH
  33. "Location of the OpenGL extensions header file (glext.h).")
  34. set(VTK_GLXEXT_FILE
  35. "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/glxext.h" CACHE FILEPATH
  36. "Location of the GLX extensions header file (glxext.h).")
  37. set(VTK_WGLEXT_FILE "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/wglext.h"
  38. CACHE FILEPATH
  39. "Location of the WGL extensions header file (wglext.h).")
  40. # work around an old bug in VTK
  41. set(TIFF_RIGHT_VERSION 1)
  42. # for very old VTK (versions prior to 4.2)
  43. macro(SOURCE_FILES)
  44. message (FATAL_ERROR "You are trying to build a very old version of VTK (prior to VTK 4.2). To do this you need to use CMake 2.0 as it was the last version of CMake to support VTK 4.0.")
  45. endmacro()