Commit 733ef2dd authored by Andrew Maclean's avatar Andrew Maclean

Allow the examples to specify what modules to use.

This approach demonstrates good programming practice by only
linking to the needed modules.
It also removed the need to set CMP0020 to NEW in all cases
except those examples that link to Qt.

The include(${VTK_USE_FILE}) has been removed from the
top-level CMakeLists.txt file as it is unnecessary.

The solution presented here will work with the Examples built
as a stand-alone folder or within the VTK tree or with the
individual examples.

They have been tested on Linux, Windows VS2012 Express,
Mac OS-X 10.9 using Qt5.1.1.

Change-Id: I0572a395b2ebc6630db8c1407f410a584f668a85
Signed-off-by: Andrew Maclean's avatarAndrew Maclean <andrew.amaclean@gmail.com>
parent 9594464d
......@@ -2,32 +2,23 @@ cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
PROJECT (AMR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
if(NOT VTK_SOURCE_DIR)
message(ERROR "Cannot build AMR examples without VTK_SOURCE_DIR")
message(ERROR " Cannot build AMR examples without VTK_SOURCE_DIR")
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkFiltersAMR
vtkFiltersCore
vtkFiltersExtraction
vtkFiltersGeneral
vtkFiltersGeometry
vtkFiltersSources
vtkIOXML
vtkRenderingCore
vtkRenderingOpenGL
vtkTestingCore
find_package(VTK COMPONENTS
vtkCommonCore
vtkFiltersAMR
vtkFiltersExtraction
vtkFiltersGeometry
vtkFiltersSources
vtkIOLegacy
vtkIOXML
vtkInteractionStyle
vtkRenderingOpenGL
vtkTestingCore
)
include(${VTK_USE_FILE})
endif()
include_directories(
${VTK_SOURCE_DIR}/Testing/Core
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (LabeledMesh)
if(NOT VTK_BINARY_DIR)
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkFiltersCore
vtkFiltersGeneral
vtkFiltersSources
vtkRenderingCore
vtkRenderingLabel
vtkRenderingOpenGL
vtkRenderingFreeTypeOpenGL
)
include (${VTK_USE_FILE})
endif()
set(Libraries ${VTK_LIBRARIES})
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkFiltersSources
vtkInteractionStyle
vtkRenderingLabel
vtkRenderingOpenGL
)
include(${VTK_USE_FILE})
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${PROJECT_NAME}.cxx)
target_link_libraries(${PROJECT_NAME} ${Libraries})
target_link_libraries(${PROJECT_NAME} ${VTK_LIBRARIES})
......@@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 2.8)
# Find and load VTK settings.
if(NOT VTK_BINARY_DIR)
find_package(VTK 6.0 REQUIRED NO_MODULE)
# find_package(VTK 6.1 REQUIRED NO_MODULE)
find_package(VTK vtkCommonCore)
include(${VTK_USE_FILE})
endif()
......
......@@ -10,20 +10,18 @@ else()
find_package(VTK REQUIRED)
endif()
include(${VTK_USE_FILE})
if (NOT vtkRenderingCore_LOADED)
message(STATUS "vtkRenderingCore not found. No examples will be built")
else()
add_subdirectory(AMR/Cxx)
add_subdirectory(Annotation/Cxx/LabeledMesh)
add_subdirectory(MultiBlock/Cxx)
add_subdirectory(DataManipulation/Cxx)
add_subdirectory(LIC/Cxx)
add_subdirectory(ImageProcessing/Cxx)
add_subdirectory(IO/Cxx)
add_subdirectory(LIC/Cxx)
add_subdirectory(Medical/Cxx)
add_subdirectory(Modelling/Cxx)
add_subdirectory(MultiBlock/Cxx)
add_subdirectory(Rendering/Cxx)
add_subdirectory(Tutorial/Step1/Cxx)
add_subdirectory(Tutorial/Step2/Cxx)
......@@ -34,10 +32,17 @@ else()
add_subdirectory(VisualizationAlgorithms/Cxx)
add_subdirectory(VolumeRendering/Cxx)
add_subdirectory(Widgets/Cxx)
add_subdirectory(Build/vtkLocal)
# This may have been already built as part of the VTK build.
# If so we cannot create the target "vtkLocalExample" because
# an imported target of the same name already exists in the
# VTK build.
if(NOT vtkLocalExample_LOADED)
add_subdirectory(Build/vtkLocal)
endif()
if(TARGET vtkGUISupportQt)
add_subdirectory(GUI/Qt)
endif()
# add_subdirectory(Build/vtkMy)
# add_subdirectory(GUI/Motif)
# IF(VTK_USE_PARALLEL)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (DataManipulation)
if(NOT VTK_BINARY_DIR)
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkFiltersCore
vtkFiltersGeometry
vtkRenderingCore
vtkRenderingOpenGL
vtkInteractionStyle
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkFiltersGeometry
vtkInteractionStyle
vtkRenderingOpenGL
)
include(${VTK_USE_FILE})
endif()
add_executable(Arrays MACOSX_BUNDLE Arrays.cxx)
add_executable(Cube MACOSX_BUNDLE Cube.cxx)
......
add_subdirectory(ImageViewer)
add_subdirectory(SimpleView)
add_subdirectory(Events)
add_subdirectory(FourPaneViewer)
add_subdirectory(ImageViewer)
add_subdirectory(SimpleView)
if(TARGET vtkGUISupportQtOpenGL)
add_subdirectory(GraphicsView)
......
......@@ -2,40 +2,21 @@ project(QtEvents)
cmake_minimum_required(VERSION 2.8)
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK)
if(NOT VTK_DIR)
message(FATAL_ERROR "Please set VTK_DIR.")
endif()
include(${VTK_USE_FILE})
endif()
find_package(VTK COMPONENTS
vtkCommonCore
vtkFiltersSources
vtkGUISupportQt
)
include(${VTK_USE_FILE})
if("${VTK_QT_VERSION}" STREQUAL "")
message(FATAL_ERROR "VTK was not built with Qt")
endif()
if(VTK_QT_VERSION VERSION_GREATER "4")
# We have ui files, this will bring in the macro: qt5_wrap_ui
find_package(QT5Widgets REQUIRED QUIET)
else()
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
# Use what VTK built with
set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")
set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")
endif()
set( Srcs main.cxx GUI4.cxx )
set( Hdrs GUI4.h )
......@@ -54,19 +35,23 @@ include_directories(
set(CMAKE_AUTOMOC ON)
if(VTK_QT_VERSION VERSION_GREATER "4")
find_package(Qt5Widgets)
qt5_wrap_ui(UI_Srcs ${UIs})
add_executable(qtevents
MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs})
qt5_use_modules(qtevents Core Gui Widgets)
target_link_libraries(qtevents ${VTK_LIBRARIES})
else()
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
# Use what VTK built with
set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")
set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")
qt4_wrap_ui(UI_Srcs ${UIs})
add_executable(qtevents MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs})
target_link_libraries(qtevents
${QT_LIBRARIES}
${VTK_LIBRARIES}
......
......@@ -2,39 +2,24 @@ project(QtVTKRenderWindows)
cmake_minimum_required(VERSION 2.6)
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK)
if(NOT VTK_DIR)
message(FATAL_ERROR "Please set VTK_DIR.")
endif()
include(${VTK_USE_FILE})
endif()
find_package(VTK COMPONENTS
vtkCommonCore
vtkFiltersSources
vtkGUISupportQt
vtkIOImage
vtkInteractionImage
)
include(${VTK_USE_FILE})
if("${VTK_QT_VERSION}" STREQUAL "")
message(FATAL_ERROR "VTK was not built with Qt")
endif()
if(VTK_QT_VERSION VERSION_GREATER "4")
# We have ui files, this will bring in the macro: qt5_wrap_ui
find_package(QT5Widgets REQUIRED QUIET)
else()
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
# Use what VTK built with
set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")
set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")
endif()
# Set your files and resources here
set( Srcs QtVTKRenderWindowsApp.cxx QtVTKRenderWindows.cxx)
......@@ -53,22 +38,22 @@ include_directories(
set(CMAKE_AUTOMOC ON)
if(VTK_QT_VERSION VERSION_GREATER "4")
find_package(Qt5Widgets REQUIRED QUIET)
qt5_wrap_ui(UI_Srcs ${UIs})
# CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped.
add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs})
qt5_use_modules(QtVTKRenderWindows Core Gui Widgets)
target_link_libraries(QtVTKRenderWindows ${VTK_LIBRARIES})
else()
include_directories(
${QT_INCLUDE_DIR}
)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
# Use what VTK built with
set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")
set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")
qt4_wrap_ui(UI_Srcs ${UIs})
add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs})
target_link_libraries(QtVTKRenderWindows ${QT_LIBRARIES} ${VTK_LIBRARIES})
endif()
......@@ -2,35 +2,26 @@ project( GraphicsView )
cmake_minimum_required(VERSION 2.8.8)
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
find_package(OpenGL)
if(NOT VTK_BINARY_DIR)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
endif()
find_package(VTK COMPONENTS
vtkCommonCore
vtkGUISupportQt
vtkGUISupportQtOpenGL
vtkIOInfovis
vtkRenderingFreeTypeOpenGL
vtkViewsInfovis
)
include(${VTK_USE_FILE})
if("${VTK_QT_VERSION}" STREQUAL "")
message(FATAL_ERROR "VTK was not built with Qt")
endif()
if(VTK_QT_VERSION VERSION_GREATER "4")
find_package(Qt5WebKitWidgets REQUIRED QUIET)
else()
find_package(Qt4 REQUIRED)
set(QT_USE_QTOPENGL 1)
set(QT_USE_QTWEBKIT 1)
include(${QT_USE_FILE})
endif()
set( Srcs
main.cpp
OpenGLScene.cpp
......@@ -62,16 +53,20 @@ set( QRCs
set(CMAKE_AUTOMOC ON)
if(VTK_QT_VERSION VERSION_GREATER "4")
find_package(Qt5WebKitWidgets REQUIRED QUIET)
qt5_add_resources(QRC_Srcs ${QRCs} )
add_executable(qtgraphicsview MACOSX_BUNDLE
${Srcs} ${Hdrs} ${MOC_Hdrs} ${QRC_Srcs})
qt5_use_modules(qtgraphicsview Core Gui Widgets
WebKit WebKitWidgets OpenGL OpenGLExtensions)
target_link_libraries(qtgraphicsview ${VTK_LIBRARIES})
else()
find_package(Qt4 REQUIRED)
set(QT_USE_QTOPENGL 1)
set(QT_USE_QTWEBKIT 1)
include(${QT_USE_FILE})
if (NOT QT_QTWEBKIT_FOUND OR QT_VERSION_MINOR LESS 6)
message(STATUS "VTK isn't configured to use QtOpenGL, QtWebKit wasn't found, or Qt 4.6 wasn't found. GraphicsView example is disabled.")
else()
......@@ -79,7 +74,6 @@ else()
qt4_wrap_cpp(MOC_Srcs ${MOC_Hdrs})
add_executable(qtgraphicsview ${Srcs} ${Hdrs} ${MOC_Hdrs} ${QRC_Srcs})
target_link_libraries(qtgraphicsview ${QT_LIBRARIES} ${VTK_LIBRARIES})
endif()
endif()
......@@ -2,29 +2,31 @@ project(QtImageViewer)
cmake_minimum_required(VERSION 2.8)
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK)
if(NOT VTK_DIR)
message(FATAL_ERROR "Please set VTK_DIR.")
endif()
include(${VTK_USE_FILE})
endif()
find_package(VTK COMPONENTS
vtkGUISupportQt
vtkIOImage
vtkInteractionImage
vtkRenderingOpenGL
vtkTestingCore
)
include(${VTK_USE_FILE})
if("${VTK_QT_VERSION}" STREQUAL "")
message(FATAL_ERROR "VTK was not built with Qt")
endif()
set( Srcs main.cxx )
if(VTK_QT_VERSION VERSION_GREATER "4")
find_package(Qt5Core REQUIRED QUIET)
add_executable(qtimageviewer ${Srcs})
qt5_use_modules(qtimageviewer Core Gui Widgets)
target_link_libraries(qtimageviewer ${VTK_LIBRARIES})
else()
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
......@@ -32,22 +34,8 @@ else()
set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")
set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")
endif()
set( Srcs main.cxx )
include_directories(${QT_INCLUDE_DIR})
if(VTK_QT_VERSION VERSION_GREATER "4")
add_executable(qtimageviewer ${Srcs})
qt5_use_modules(qtimageviewer Core Gui Widgets)
target_link_libraries(qtimageviewer ${VTK_LIBRARIES})
else()
include_directories(
${QT_INCLUDE_DIR}
)
add_executable(qtimageviewer ${Srcs})
target_link_libraries(qtimageviewer ${QT_LIBRARIES} ${VTK_LIBRARIES})
endif()
......@@ -2,39 +2,24 @@ project(SimpleView)
cmake_minimum_required(VERSION 2.8)
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK)
if(NOT VTK_DIR)
message(FATAL_ERROR "Please set VTK_DIR.")
endif()
include(${VTK_USE_FILE})
endif()
find_package(VTK COMPONENTS
vtkCommonCore
vtkFiltersCore
vtkInfovisCore
vtkInteractionStyle
vtkRenderingFreeTypeOpenGL
vtkViewsQt
)
include(${VTK_USE_FILE})
if("${VTK_QT_VERSION}" STREQUAL "")
message(FATAL_ERROR "VTK was not built with Qt")
endif()
if(VTK_QT_VERSION VERSION_GREATER "4")
# We have ui files, this will bring in the macro: qt5_wrap_ui
find_package(QT5Widgets REQUIRED QUIET)
else()
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
# Use what VTK built with
set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")
set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")
endif()
# Use the include path and library for Qt that is used by VTK.
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
......@@ -53,6 +38,16 @@ set( UIs SimpleView.ui )
set( QRCs Icons/icons.qrc )
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# The rest should just work (sure...)
if(VTK_QT_VERSION VERSION_GREATER "4")
# We have ui files, this will bring in the macro: qt5_wrap_ui
find_package(Qt5Widgets REQUIRED QUIET)
qt5_wrap_ui(UI_Srcs ${UIs})
qt5_add_resources(QRC_Srcs ${QRCs} )
source_group("Resources" FILES
${UIs}
${QRCs}
......@@ -66,21 +61,17 @@ set( QRCs Icons/icons.qrc )
${QRC_Srcs}
)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# The rest should just work (sure...)
if(VTK_QT_VERSION VERSION_GREATER "4")
qt5_wrap_ui(UI_Srcs ${UIs})
qt5_add_resources(QRC_Srcs ${QRCs} )
add_executable(SimpleView MACOSX_BUNDLE
${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${QRC_Srcs})
qt5_use_modules(SimpleView Core Gui Widgets)
target_link_libraries(SimpleView ${VTK_LIBRARIES})
else()
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
# Use what VTK built with
set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")
set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")
qt4_wrap_ui(UI_Srcs ${UIs})
qt4_wrap_cpp(MOC_Srcs ${MOC_Hdrs} )
qt4_add_resources(QRC_Srcs ${QRCs})
......@@ -101,7 +92,6 @@ else()
add_executable(SimpleView MACOSX_BUNDLE
${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${QRC_Srcs})
target_link_libraries(SimpleView
${QT_LIBRARIES}
${VTK_LIBRARIES}
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (IO)
if(NOT VTK_BINARY_DIR)
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkIOGeometry
vtkIOXML
vtkRenderingOpenGL
)
include(${VTK_USE_FILE})
endif()
find_package(VTK COMPONENTS
vtkCommonCore
vtkIOLegacy
vtkIOXML
vtkTestingRendering
vtksys
)
include(${VTK_USE_FILE})
add_executable(DumpXMLFile MACOSX_BUNDLE DumpXMLFile.cxx)
target_link_libraries(DumpXMLFile ${VTK_LIBRARIES})
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT(ImageProcessing)
if(NOT VTK_BINARY_DIR)
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkCommonMath
vtkIOImage
vtkImagingCore
vtkInteractionStyle
vtkRenderingCore
vtkRenderingOpenGL
)
find_package(VTK COMPONENTS
vtkIOImage
vtkImagingCore
vtkInteractionStyle
vtkRenderingOpenGL
vtkTestingRendering
)
include(${VTK_USE_FILE})
endif()
add_executable(ImageSlicing MACOSX_BUNDLE ImageSlicing.cxx)
target_link_libraries(ImageSlicing ${VTK_LIBRARIES})
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT(LIC)
if(NOT VTK_SOURCE_DIR)
message(ERROR "Cannot build LIC examples without VTK_SOURCE_DIR")
message(ERROR " Cannot build LIC examples without VTK_SOURCE_DIR")
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
endif()
find_package(VTK COMPONENTS
vtkFiltersExtraction
vtkFiltersGeometry
vtkIOImage
vtkInteractionStyle
vtkRenderingLIC
vtkTestingRendering
vtksys
)
include(${VTK_USE_FILE})
# these demos are simply repackaged ctests
# by #include'ing the test implementation
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Medical)
if(NOT VTK_BINARY_DIR)
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkCommonTransforms
vtkFiltersCore
vtkFiltersGeneral
vtkFiltersGeometry
vtkFiltersModeling
vtkIOImage
vtkIOXML
vtkImagingCore
vtkImagingStatistics
vtkRenderingCore
vtkRenderingOpenGL
vtkRenderingVolume
vtkRenderingVolumeOpenGL
vtkInteractionStyle
)
include(${VTK_USE_FILE})
endif()
find_package(VTK COMPONENTS
vtkFiltersGeometry
vtkFiltersModeling
vtkIOImage
vtkIOXML
vtkImagingStatistics
vtkInteractionStyle
vtkRenderingVolumeOpenGL
vtkTestingRendering
vtksys
)
include(${VTK_USE_FILE})
add_executable(Medical1 MACOSX_BUNDLE Medical1.cxx)
add_executable(Medical2 MACOSX_BUNDLE Medical2.cxx)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Modelling)
if(NOT VTK_BINARY_DIR)
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkFiltersCore
vtkFiltersGeneral
vtkIOXML
vtkImagingHybrid
vtkRenderingCore
vtkRenderingOpenGL
vtkInteractionStyle
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkFiltersGeneral
vtkIOXML
vtkImagingHybrid
vtkInteractionStyle
vtkRenderingOpenGL