VTK.cmake 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #
  2. # VTK
  3. #
  4. SET (VTK_DEPENDS)
  5. ctkMacroShouldAddExternalProject(VTK_LIBRARIES add_project)
  6. IF(${add_project})
  7. # Sanity checks
  8. IF(DEFINED VTK_DIR AND NOT EXISTS ${VTK_DIR})
  9. MESSAGE(FATAL_ERROR "VTK_DIR variable is defined but corresponds to non-existing directory")
  10. ENDIF()
  11. IF(NOT DEFINED VTK_DIR)
  12. SET(proj VTK)
  13. # MESSAGE(STATUS "Adding project:${proj}")
  14. SET(VTK_DEPENDS ${proj})
  15. ExternalProject_Add(${proj}
  16. GIT_REPOSITORY ${git_protocol}://vtk.org/VTK.git
  17. INSTALL_COMMAND ""
  18. CMAKE_GENERATOR ${gen}
  19. CMAKE_ARGS
  20. ${ep_common_args}
  21. -DVTK_WRAP_TCL:BOOL=OFF
  22. -DVTK_WRAP_PYTHON:BOOL=OFF
  23. -DVTK_WRAP_JAVA:BOOL=OFF
  24. -DBUILD_SHARED_LIBS:BOOL=ON
  25. -DDESIRED_QT_VERSION:STRING=4
  26. -DVTK_USE_GUISUPPORT:BOOL=ON
  27. -DVTK_USE_QVTK_QTOPENGL:BOOL=ON
  28. -DVTK_USE_QT:BOOL=ON
  29. -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
  30. )
  31. SET(VTK_DIR ${ep_build_dir}/${proj})
  32. # Since the link directories associated with VTK is used, it makes sens to
  33. # update CTK_EXTERNAL_LIBRARY_DIRS with its associated library output directory
  34. LIST(APPEND CTK_EXTERNAL_LIBRARY_DIRS ${VTK_DIR}/bin)
  35. ENDIF()
  36. ENDIF()