pfe/CMakeLists.txt

64 lines
1.5 KiB
CMake
Raw Normal View History

2022-01-31 16:55:32 +01:00
cmake_minimum_required(VERSION 3.15)
project(pfe)
set(VTK_COMPONENTS
VTK::CommonCore
VTK::IOCore
VTK::FiltersCore
VTK::CommonColor
VTK::CommonDataModel
VTK::IOLegacy
VTK::IOXML)
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)
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
src/external_points_filter.cc
2022-02-28 23:39:03 +01:00
src/external_points_filter.h
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
src/point_tris_dist.h)
2022-02-17 14:02:20 +01:00
target_link_libraries(pfe PRIVATE ${VTK_COMPONENTS})
if(ENABLE_VIEWER)
target_compile_definitions(pfe PRIVATE ENABLE_VIEWER)
endif()