2022-01-31 16:55:32 +01:00
|
|
|
cmake_minimum_required(VERSION 3.15)
|
|
|
|
|
|
|
|
project(pfe)
|
|
|
|
|
2022-02-23 14:00:48 +01:00
|
|
|
set(VTK_COMPONENTS
|
|
|
|
VTK::CommonCore
|
|
|
|
VTK::IOCore
|
|
|
|
VTK::FiltersCore
|
|
|
|
VTK::CommonColor
|
|
|
|
VTK::CommonDataModel
|
|
|
|
VTK::IOLegacy
|
2022-03-07 23:09:59 +01:00
|
|
|
VTK::IOGeometry
|
|
|
|
VTK::IOXML
|
2022-03-08 16:28:26 +01:00
|
|
|
VTK::FiltersModeling
|
2022-03-14 14:30:11 +01:00
|
|
|
VTK::FiltersPoints
|
2022-03-08 16:28:26 +01:00
|
|
|
VTK::vtksys)
|
2022-02-23 14:00:48 +01:00
|
|
|
set(ENABLE_VIEWER OFF CACHE BOOL "Enable the 3D viewer, depends on Qt.")
|
|
|
|
if(ENABLE_VIEWER)
|
|
|
|
list(APPEND VTK_COMPONENTS
|
|
|
|
VTK::RenderingCore
|
|
|
|
VTK::ViewsCore
|
|
|
|
VTK::GUISupportQt
|
|
|
|
VTK::RenderingQt
|
|
|
|
VTK::ViewsQt
|
|
|
|
VTK::RenderingVolume
|
|
|
|
VTK::RenderingVolumeOpenGL2)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(USE_SYSTEM_VTK NO CACHE BOOL
|
|
|
|
"Use the version of vtk installed in the system instead of downloading and compiling it ourselves.")
|
|
|
|
if(USE_SYSTEM_VTK)
|
|
|
|
list(TRANSFORM VTK_COMPONENTS REPLACE "VTK::" ""
|
|
|
|
OUTPUT_VARIABLE VTK_PACKAGE_COMPONENTS)
|
|
|
|
message("VTK_COMPONENTS: ${VTK_COMPONENTS}")
|
|
|
|
message("VTK_PACKAGE_COMPONENTS: ${VTK_PACKAGE_COMPONENTS}")
|
|
|
|
find_package(VTK COMPONENTS ${VTK_PACKAGE_COMPONENTS})
|
|
|
|
else()
|
|
|
|
add_subdirectory(external/vtk)
|
|
|
|
endif()
|
2022-01-31 16:55:32 +01:00
|
|
|
|
|
|
|
add_executable(pfe)
|
|
|
|
|
2022-02-15 12:55:12 +01:00
|
|
|
target_compile_features(pfe PRIVATE cxx_std_17)
|
|
|
|
|
2022-02-17 14:02:20 +01:00
|
|
|
target_sources(pfe PRIVATE
|
|
|
|
src/main.cc
|
|
|
|
src/angles_filter.cc
|
2022-02-17 17:30:04 +01:00
|
|
|
src/angles_filter.h
|
|
|
|
src/aspect_ratio_filter.cc
|
2022-02-19 12:06:39 +01:00
|
|
|
src/aspect_ratio_filter.h
|
|
|
|
src/dihedral_angles_filter.cc
|
2022-02-23 13:01:50 +01:00
|
|
|
src/dihedral_angles_filter.h
|
2022-03-04 11:03:17 +01:00
|
|
|
src/surface_points_filter.cc
|
|
|
|
src/surface_points_filter.h
|
2022-02-28 23:39:03 +01:00
|
|
|
src/kd_tree.cc
|
|
|
|
src/kd_tree.h
|
|
|
|
src/mesh_fit_filter.cc
|
2022-03-01 19:29:44 +01:00
|
|
|
src/mesh_fit_filter.h
|
|
|
|
src/point_tris_dist.cc
|
2022-03-02 17:00:40 +01:00
|
|
|
src/point_tris_dist.h
|
2022-03-04 11:03:17 +01:00
|
|
|
src/project_surface_points_on_poly.cc
|
2022-03-07 23:09:59 +01:00
|
|
|
src/project_surface_points_on_poly.h
|
|
|
|
src/remove_external_cells_filter.cc
|
|
|
|
src/remove_external_cells_filter.h)
|
2022-02-17 14:02:20 +01:00
|
|
|
|
2022-02-23 14:00:48 +01:00
|
|
|
target_link_libraries(pfe PRIVATE ${VTK_COMPONENTS})
|
|
|
|
|
|
|
|
if(ENABLE_VIEWER)
|
|
|
|
target_compile_definitions(pfe PRIVATE ENABLE_VIEWER)
|
|
|
|
endif()
|