Commit bbf009a4 authored by Ben Boeckel's avatar Ben Boeckel

Examples/AMR: update to the new module system

parent ec59dd1e
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (AMR)
if(NOT VTK_SOURCE_DIR)
message(ERROR " Cannot build AMR examples without VTK_SOURCE_DIR")
endif()
find_package(VTK COMPONENTS
vtkCommonCore
vtkFiltersAMR
vtkFiltersExtraction
vtkFiltersGeometry
vtkFiltersSources
vtkIOLegacy
vtkIOXML
vtkInteractionStyle
vtkRenderingOpenGL2
vtkTestingCore
)
include(${VTK_USE_FILE})
include_directories(
${VTK_SOURCE_DIR}/Testing/Core
)
project(AMR)
find_package(VTK
COMPONENTS
CommonDataModel
FiltersExtraction
FiltersGeometry
FiltersSources
IOLegacy
IOXML
RenderingCore
TestingCore)
if (NOT VTK_FOUND)
message("Skipping example: ${VTK_NOT_FOUND_MESSAGE}")
return ()
endif ()
## Add HierarchicalBoxPipeline executable
add_executable(HierarchicalBoxPipeline MACOSX_BUNDLE HierarchicalBoxPipeline.cxx)
target_link_libraries(HierarchicalBoxPipeline ${VTK_LIBRARIES})
add_executable(HierarchicalBoxPipeline MACOSX_BUNDLE
HierarchicalBoxPipeline.cxx)
target_link_libraries(HierarchicalBoxPipeline
PRIVATE
${VTK_LIBRARIES})
## Add AMR examples
add_executable( Generate3DAMRDataSetWithPulse MACOSX_BUNDLE Generate3DAMRDataSetWithPulse.cxx)
target_link_libraries( Generate3DAMRDataSetWithPulse ${VTK_LIBRARIES})
add_executable( Generate2DAMRDataSetWithPulse MACOSX_BUNDLE Generate2DAMRDataSetWithPulse.cxx)
target_link_libraries(Generate2DAMRDataSetWithPulse ${VTK_LIBRARIES})
add_executable(Generate3DAMRDataSetWithPulse MACOSX_BUNDLE
Generate3DAMRDataSetWithPulse.cxx)
target_link_libraries(Generate3DAMRDataSetWithPulse
PRIVATE
${VTK_LIBRARIES})
add_executable(Generate2DAMRDataSetWithPulse MACOSX_BUNDLE
Generate2DAMRDataSetWithPulse.cxx)
target_link_libraries(Generate2DAMRDataSetWithPulse
PRIVATE
${VTK_LIBRARIES})
vtk_module_autoinit(
TARGETS HierarchicalBoxPipeline
Generate3DAMRDataSetWithPulse
Generate2DAMRDataSetWithPulse
MODULES ${VTK_LIBRARIES})
......@@ -23,6 +23,13 @@ else ()
endmacro ()
endif ()
if (ANDROID)
elseif (APPLE_IOS)
else ()
add_example(AMR/Cxx)
endif ()
if (FALSE)
if (ANDROID)
add_subdirectory(Android)
elseif (APPLE_IOS)
......@@ -33,7 +40,6 @@ else()
else()
if (vtkTestingCore_LOADED)
if (NOT VTK_RENDERING_BACKEND STREQUAL "None")
add_subdirectory(AMR/Cxx)
add_subdirectory(ImageProcessing/Cxx)
add_subdirectory(Medical/Cxx)
add_subdirectory(Modelling/Cxx)
......@@ -97,3 +103,4 @@ else()
# ENDIF()
# ENDIF()
endif()
endif ()
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