Commit 07c931e3 authored by Brad King's avatar Brad King

ENH: Updated examples to use FIND_PACKAGE(VTK).

parent 363c674e
PROJECT (AMR)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(HierarchicalBox HierarchicalBox.cxx)
TARGET_LINK_LIBRARIES(HierarchicalBox vtkRendering vtkIO)
......
CMAKE_MINIMUM_REQUIRED(VERSION 1.6)
(VERSION 1.6)
# Set the project/library name here. Classes should be declared as
# "class vtkLocal_EXPORT vtkFoo", where vtkLocal is the name of the
......@@ -24,12 +24,11 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
# Find and load VTK settings.
INCLUDE(${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF(VTK_FOUND)
INCLUDE(${VTK_USE_FILE})
ELSE(VTK_FOUND)
MESSAGE(FATAL_ERROR "Set VTK_DIR.")
ENDIF(VTK_FOUND)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
# Give user option of building shared or static libraries. Default to
# the choice made for VTK.
......
PROJECT (DataManipulation)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(Arrays Arrays.cxx)
ADD_EXECUTABLE(Cube Cube.cxx)
......
......@@ -7,10 +7,11 @@ PROJECT (MotifExamples)
LINK_LIBRARIES(-lXm)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
LINK_LIBRARIES(
vtkRendering
......
IF(NOT VTK_SOURCE_DIR)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
ENDIF(NOT VTK_SOURCE_DIR)
PROJECT(QtEvents)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
INCLUDE (${CMAKE_ROOT}/Modules/FindQt.cmake)
......
IF(NOT VTK_SOURCE_DIR)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
ENDIF(NOT VTK_SOURCE_DIR)
PROJECT(QtImageViewer)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
INCLUDE (${CMAKE_ROOT}/Modules/FindQt.cmake)
......
IF(NOT VTK_SOURCE_DIR)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
ENDIF(NOT VTK_SOURCE_DIR)
PROJECT(QtSimpleView)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
INCLUDE (${CMAKE_ROOT}/Modules/FindQt.cmake)
......
PROJECT (Win32SampleMFC)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
LINK_LIBRARIES(
vtkRendering
......
PROJECT (Win32Cone)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
LINK_LIBRARIES(
vtkRendering
......
PROJECT(vtkMFC)
IF(NOT VTK_SOURCE_DIR)
# This INCLUDE is to allow developers with both MSVC and Borland compilers installed
# to manually change the FindVTK results to point to the correct (MSVC) vtk build directory
INCLUDE ($ENV{VTK_SOURCE_DIR}/Examples/GUI/Win32/vtkMFC/LocalUserOptions.cmake OPTIONAL)
IF (NOT USE_VTK_FILE)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
ENDIF (NOT USE_VTK_FILE)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
ENDIF(NOT VTK_SOURCE_DIR)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
SUBDIRS(
vtkMDI
......
PROJECT (Medical)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(Medical1 Medical1.cxx)
ADD_EXECUTABLE(Medical2 Medical2.cxx)
......
PROJECT (finance)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(finance finance.cxx)
TARGET_LINK_LIBRARIES(finance vtkRendering)
PROJECT (MultiBlock)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(MultiBlock MultiBlock.cxx)
TARGET_LINK_LIBRARIES(MultiBlock vtkRendering vtkIO)
PROJECT (Rendering)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(Cylinder Cylinder.cxx)
TARGET_LINK_LIBRARIES(Cylinder vtkRendering)
......
PROJECT (Step1)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(Cone Cone.cxx)
TARGET_LINK_LIBRARIES(Cone vtkRendering)
PROJECT (Step2)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(Cone2 Cone2.cxx)
TARGET_LINK_LIBRARIES(Cone2 vtkRendering)
PROJECT (Step3)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(Cone3 Cone3.cxx)
TARGET_LINK_LIBRARIES(Cone3 vtkRendering)
PROJECT (Step4)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(Cone4 Cone4.cxx)
TARGET_LINK_LIBRARIES(Cone4 vtkRendering)
PROJECT (Step5)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(Cone5 Cone5.cxx)
TARGET_LINK_LIBRARIES(Cone5 vtkRendering)
PROJECT (Step6)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ADD_EXECUTABLE(Cone6 Cone6.cxx)
TARGET_LINK_LIBRARIES(Cone6 vtkHybrid)
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