From 64c998cfa7480701f78f8f821ffc2b7182896b6f Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Wed, 10 Oct 2012 12:49:18 +0000 Subject: [PATCH] do not compile some example if ImageIO is not configured --- Mesh_3/examples/Mesh_3/CMakeLists.txt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 6c3196201c9..47e6e345298 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -36,16 +36,20 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "mesh_implicit_sphere_variable_size.cpp" ) create_single_source_cgal_program( "mesh_two_implicit_spheres_with_balls.cpp" ) # create_single_source_cgal_program( "mesh_implicit_domains.cpp" "implicit_functions.cpp" ) - if( CGAL_ImageIO_USE_ZLIB ) - create_single_source_cgal_program( "mesh_3D_image.cpp" ) - create_single_source_cgal_program( "mesh_3D_image_variable_size.cpp" ) - else() - message( STATUS "NOTICE: The example mesh_3D_image.cpp needs CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." ) - endif() - create_single_source_cgal_program( "mesh_polyhedral_domain.cpp" ) + create_single_source_cgal_program( "mesh_polyhedral_domain.cpp" ) create_single_source_cgal_program( "mesh_polyhedral_domain_with_features.cpp" ) - create_single_source_cgal_program( "mesh_optimization_example.cpp" ) - create_single_source_cgal_program( "mesh_optimization_lloyd_example.cpp" ) + if( WITH_CGAL_ImageIO ) + create_single_source_cgal_program( "mesh_optimization_example.cpp" ) + create_single_source_cgal_program( "mesh_optimization_lloyd_example.cpp" ) + if( CGAL_ImageIO_USE_ZLIB ) + create_single_source_cgal_program( "mesh_3D_image.cpp" ) + create_single_source_cgal_program( "mesh_3D_image_variable_size.cpp" ) + else() + message( STATUS "NOTICE: The example mesh_3D_image.cpp needs CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." ) + endif() + else() + message( STATUS "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled." ) + endif() # create_single_source_cgal_program( "mesh_polyhedral_implicit_function.cpp" ) # create_single_source_cgal_program( "mesh_polyhedral_surface_tolerance_region.cpp" ) # create_single_source_cgal_program( "mesh_polyhedral_edge_tolerance_region.cpp" )