cmake configuration to build examples

This commit is contained in:
alemuntoni 2021-03-25 12:43:08 +01:00
parent adb799a0a2
commit fa55a9901c
62 changed files with 1074 additions and 18 deletions

View File

@ -13,6 +13,9 @@ option(ALLOW_SYSTEM_EIGEN "Allow use of system-provided Eigen" ON)
option(VCG_HEADER_ONLY "Use VCG library in header only mode" ON)
option(VCG_BUILD_EXAMPLES "Build a set of examples of the library" OFF)
set (VCG_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR})
set (VCG_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR} PARENT_SCOPE)
# Prefer GLVND
if(POLICY CMP0072)
cmake_policy(SET CMP0072 NEW)
@ -296,4 +299,5 @@ endif()
if(VCG_BUILD_EXAMPLES)
#TODO make the list of samples to build
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/apps)
endif()

View File

@ -1,9 +1,7 @@
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
include_directories(../)
include_directories(../eigenlib)
cmake_minimum_required(VERSION 3.13)
project(VCGApps)
add_subdirectory(sample)
add_subdirectory(metro)
add_subdirectory(tridecimator)

View File

@ -1,2 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project (metro)
add_executable(metro metro.cpp ../../wrap/ply/plylib.cpp)
if (VCG_HEADER_ONLY)
set(SOURCES
metro.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(metro
${SOURCES})
target_link_libraries(
metro
PUBLIC
vcglib
)

View File

@ -0,0 +1,64 @@
cmake_minimum_required(VERSION 3.13)
project(VCGExamples)
set(VCG_EXAMPLE_PROJECTS
aabb_binary_tree
colorspace
polygonmesh_base
polygonmesh_dual
polygonmesh_optimize
polygonmesh_polychord_collapse
polygonmesh_smooth
space_index_2d
space_packer
space_rasterized_packer
trimesh_align_pair
trimesh_allocate
trimesh_attribute
trimesh_attribute_saving
trimesh_ball_pivoting
trimesh_base
trimesh_closest
trimesh_clustering
trimesh_color
trimesh_copy
trimesh_create
trimesh_curvature
trimesh_cylinder_clipping
trimesh_disk_parametrization
trimesh_fitting
trimesh_geodesic
trimesh_harmonic
trimesh_hole
trimesh_implicit_smooth
trimesh_indexing
trimesh_inertia
trimesh_intersection_plane
trimesh_intersection_mesh
trimesh_isosurface
trimesh_join
trimesh_kdtree
trimesh_montecarlo_sampling
trimesh_normal
trimesh_optional
trimesh_pointmatching
trimesh_pointcloud_sampling
trimesh_ray
trimesh_refine
trimesh_remeshing
trimesh_sampling
trimesh_select
trimesh_smooth
trimesh_split_vertex
trimesh_texture
trimesh_texture_clean
trimesh_topology
trimesh_topological_cut
trimesh_voronoi
trimesh_voronoiatlas
trimesh_voronoiclustering
trimesh_voronoisampling)
foreach(VCG_EXAMPLE ${VCG_EXAMPLE_PROJECTS})
add_subdirectory(${VCG_EXAMPLE})
endforeach()

View File

@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.13)
project(aabb_binary_tree)
set(SOURCES
aabb_binary_tree.cpp)
add_executable(aabb_binary_tree
${SOURCES})
target_link_libraries(
aabb_binary_tree
PUBLIC
vcglib
)

View File

@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.13)
project(colorspace)
set(SOURCES
colorspace.cpp)
add_executable(colorspace
${SOURCES})
target_link_libraries(
colorspace
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(polygonmesh_base)
if (VCG_HEADER_ONLY)
set(SOURCES
polygonmesh.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(polygonmesh_base
${SOURCES})
target_link_libraries(
polygonmesh_base
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(polygonmesh_dual)
if (VCG_HEADER_ONLY)
set(SOURCES
polygonmesh_dual.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(polygonmesh_dual
${SOURCES})
target_link_libraries(
polygonmesh_dual
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(polygonmesh_optimize)
if (VCG_HEADER_ONLY)
set(SOURCES
polygonmesh_optimize.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(polygonmesh_optimize
${SOURCES})
target_link_libraries(
polygonmesh_optimize
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(polygonmesh_polychord_collapse)
if (VCG_HEADER_ONLY)
set(SOURCES
polygonmesh_polychord_collapse.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(polygonmesh_polychord_collapse
${SOURCES})
target_link_libraries(
polygonmesh_polychord_collapse
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(polygonmesh_smooth)
if (VCG_HEADER_ONLY)
set(SOURCES
polygonmesh_smooth.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(polygonmesh_smooth
${SOURCES})
target_link_libraries(
polygonmesh_smooth
PUBLIC
vcglib
)

View File

@ -60,4 +60,4 @@ SUBDIRS = \
trimesh_voronoi \
trimesh_voronoiatlas \
trimesh_voronoiclustering \
trimesh_voronoisampling \
trimesh_voronoisampling

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(space_index_2d)
if (VCG_HEADER_ONLY)
set(SOURCES
space_index_2d.cpp)
endif()
add_executable(space_index_2d
${SOURCES})
target_link_libraries(
space_index_2d
PUBLIC
vcglib
)

View File

@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.13)
project(space_packer)
find_package(
Qt5
COMPONENTS OpenGL Svg)
if (TARGET Qt5::OpenGL AND TARGET Qt5::Svg)
if (VCG_HEADER_ONLY)
set(SOURCES
space_packer.cpp
${VCG_INCLUDE_DIRS}/wrap/qt/Outline2ToQImage.cpp
${VCG_INCLUDE_DIRS}/wrap/qt/outline2_rasterizer.cpp)
endif()
add_executable(space_packer
${SOURCES})
target_link_libraries(
space_packer
PUBLIC
vcglib
Qt5::OpenGL
Qt5::Svg
)
else()
message(
STATUS "VCG examples - Skipping space_packer example")
endif()

View File

@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.13)
project(space_rasterized_packer)
find_package(
Qt5
COMPONENTS OpenGL Svg)
if (TARGET Qt5::OpenGL AND TARGET Qt5::Svg)
if (VCG_HEADER_ONLY)
set(SOURCES
space_rasterized_packer.cpp
${VCG_INCLUDE_DIRS}/wrap/qt/Outline2ToQImage.cpp
${VCG_INCLUDE_DIRS}/wrap/qt/outline2_rasterizer.cpp)
endif()
add_executable(space_rasterized_packer
${SOURCES})
target_link_libraries(
space_rasterized_packer
PUBLIC
vcglib
Qt5::OpenGL
Qt5::Svg
)
else()
message(
STATUS "VCG examples - Skipping space_rasterized_packer example")
endif()

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_align_pair)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_align_pair.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_align_pair
${SOURCES})
target_link_libraries(
trimesh_align_pair
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_allocate)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_allocate.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_allocate
${SOURCES})
target_link_libraries(
trimesh_allocate
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_attribute)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_attribute.cpp)
endif()
add_executable(trimesh_attribute
${SOURCES})
target_link_libraries(
trimesh_attribute
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_attribute_saving)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_attribute_saving.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_attribute_saving
${SOURCES})
target_link_libraries(
trimesh_attribute_saving
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_ball_pivoting)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_ball_pivoting.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_ball_pivoting
${SOURCES})
target_link_libraries(
trimesh_ball_pivoting
PUBLIC
vcglib
)

View File

@ -1,8 +1,16 @@
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
project (trimesh_base)
add_executable(trimesh_base trimesh_base.cpp)
include_directories(../../..)
include_directories(../../../eigenlib)
cmake_minimum_required(VERSION 3.13)
project(trimesh_base)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_base.cpp)
endif()
add_executable(trimesh_base
${SOURCES})
target_link_libraries(
trimesh_base
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_closest)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_closest.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_closest
${SOURCES})
target_link_libraries(
trimesh_closest
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_clustering)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_clustering.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_clustering
${SOURCES})
target_link_libraries(
trimesh_clustering
PUBLIC vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_color)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_color.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_color
${SOURCES})
target_link_libraries(
trimesh_color
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_copy)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_copy.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_copy
${SOURCES})
target_link_libraries(
trimesh_copy
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_create)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_create.cpp)
endif()
add_executable(trimesh_create
${SOURCES})
target_link_libraries(
trimesh_create
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_curvature)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_curvature.cpp)
endif()
add_executable(trimesh_curvature
${SOURCES})
target_link_libraries(
trimesh_curvature
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_cylinder_clipping)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_cylinder_clipping.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_cylinder_clipping
${SOURCES})
target_link_libraries(
trimesh_cylinder_clipping
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_disk_parametrization)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_disk_parametrization.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_disk_parametrization
${SOURCES})
target_link_libraries(
trimesh_disk_parametrization
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_fitting)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_fitting.cpp)
endif()
add_executable(trimesh_fitting
${SOURCES})
target_link_libraries(
trimesh_fitting
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_geodesic)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_geodesic.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_geodesic
${SOURCES})
target_link_libraries(
trimesh_geodesic
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_harmonic)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_harmonic.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_harmonic
${SOURCES})
target_link_libraries(
trimesh_harmonic
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_hole)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_hole.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_hole
${SOURCES})
target_link_libraries(
trimesh_hole
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_implicit_smooth)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_implicit_smooth.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_implicit_smooth
${SOURCES})
target_link_libraries(
trimesh_implicit_smooth
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_indexing)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_indexing.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_indexing
${SOURCES})
target_link_libraries(
trimesh_indexing
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_inertia)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_inertia.cpp)
endif()
add_executable(trimesh_inertia
${SOURCES})
target_link_libraries(
trimesh_inertia
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_intersection_mesh)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_intersection_mesh.cpp)
endif()
add_executable(trimesh_intersection_mesh
${SOURCES})
target_link_libraries(
trimesh_intersection_mesh
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_intersection_plane)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_intersection_plane.cpp)
endif()
add_executable(trimesh_intersection_plane
${SOURCES})
target_link_libraries(
trimesh_intersection_plane
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_isosurface)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_isosurface.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_isosurface
${SOURCES})
target_link_libraries(
trimesh_isosurface
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_join)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_join.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_join
${SOURCES})
target_link_libraries(
trimesh_join
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_kdtree)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_kdtree.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_kdtree
${SOURCES})
target_link_libraries(
trimesh_kdtree
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_montecarlo_sampling)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_montecarlo_sampling.cpp)
endif()
add_executable(trimesh_montecarlo_sampling
${SOURCES})
target_link_libraries(
trimesh_montecarlo_sampling
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_normal)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_normal.cpp)
endif()
add_executable(trimesh_normal
${SOURCES})
target_link_libraries(
trimesh_normal
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_optional)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_optional.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_optional
${SOURCES})
target_link_libraries(
trimesh_optional
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_pointcloud_sampling)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_pointcloud_sampling.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_pointcloud_sampling
${SOURCES})
target_link_libraries(
trimesh_pointcloud_sampling
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_pointmatching)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_pointmatching.cpp)
endif()
add_executable(trimesh_pointmatching
${SOURCES})
target_link_libraries(
trimesh_pointmatching
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_ray)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_ray.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_ray
${SOURCES})
target_link_libraries(
trimesh_ray
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_refine)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_refine.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_refine
${SOURCES})
target_link_libraries(
trimesh_refine
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_remeshing)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_remeshing.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_remeshing
${SOURCES})
target_link_libraries(
trimesh_remeshing
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_sampling)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_sampling.cpp)
endif()
add_executable(trimesh_sampling
${SOURCES})
target_link_libraries(
trimesh_sampling
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_select)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_select.cpp)
endif()
add_executable(trimesh_select
${SOURCES})
target_link_libraries(
trimesh_select
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_smooth)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_smooth.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_smooth
${SOURCES})
target_link_libraries(
trimesh_smooth
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_split_vertex)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_split_vertex.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_split_vertex
${SOURCES})
target_link_libraries(
trimesh_split_vertex
PUBLIC
vcglib
)

View File

@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_texture)
find_package(
Qt5
COMPONENTS OpenGL Svg)
if (TARGET Qt5::OpenGL AND TARGET Qt5::Svg)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_texture.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp
${VCG_INCLUDE_DIRS}/wrap/qt/Outline2ToQImage.cpp
${VCG_INCLUDE_DIRS}/wrap/qt/outline2_rasterizer.cpp)
endif()
add_executable(trimesh_texture
${SOURCES})
target_link_libraries(
trimesh_texture
PUBLIC
vcglib
Qt5::OpenGL
Qt5::Svg
)
else()
message(
STATUS "VCG examples - Skipping trimesh_texture example")
endif()

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_texture_clean)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_texture_clean.cpp)
endif()
add_executable(trimesh_texture_clean
${SOURCES})
target_link_libraries(
trimesh_texture_clean
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_topological_cut)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_topological_cut.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_topological_cut
${SOURCES})
target_link_libraries(
trimesh_topological_cut
PUBLIC
vcglib
)

View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_topology)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_topology.cpp)
endif()
add_executable(trimesh_topology
${SOURCES})
target_link_libraries(
trimesh_topology
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_voronoi)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_voronoi.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_voronoi
${SOURCES})
target_link_libraries(
trimesh_voronoi
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_voronoiatlas)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_voronoiatlas.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_voronoiatlas
${SOURCES})
target_link_libraries(
trimesh_voronoiatlas
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_voronoiclustering)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_voronoiclustering.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_voronoiclustering
${SOURCES})
target_link_libraries(
trimesh_voronoiclustering
PUBLIC
vcglib
)

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_voronoisampling)
if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_voronoisampling.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(trimesh_voronoisampling
${SOURCES})
target_link_libraries(
trimesh_voronoisampling
PUBLIC
vcglib
)

View File

@ -1,2 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project (tridecimator)
add_executable(tridecimator tridecimator.cpp ../../wrap/ply/plylib.cpp)
if (VCG_HEADER_ONLY)
set(SOURCES
tridecimator.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()
add_executable(tridecimator
${SOURCES})
target_link_libraries(
tridecimator
PUBLIC
vcglib
)