add a new cmake variable in CGALConfig.cmake, so that one can detect if CGAL_ImageIO is build with ZLIB support. Use that variable in examples/Mesh_3/.

This commit is contained in:
Laurent Rineau 2009-07-23 15:02:02 +00:00
parent dce37b59c6
commit b6f567e260
5 changed files with 9 additions and 1 deletions

View File

@ -38,6 +38,7 @@ if(OPENGL_FOUND)
cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} )
cache_set(CGAL_ImageIO_3RD_PARTY_LIBRARIES ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} ${ZLIB_LIBRARY} )
cache_set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS "-DCGAL_USE_ZLIB")
cache_set(CGAL_ImageIO_USE_ZLIB "ON")
endif(ZLIB_FOUND)
set( CGAL_ImageIO_BASENAME CGAL_ImageIO )

View File

@ -60,6 +60,7 @@ set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS "@CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS@
set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS "@CGAL_ImageIO_3RD_PARTY_DEFINITIONS@" )
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS "@CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS@" )
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" )
set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" )
set(CGAL_PDB_3RD_PARTY_INCLUDE_DIRS "@CGAL_PDB_3RD_PARTY_INCLUDE_DIRS@" )
set(CGAL_PDB_3RD_PARTY_DEFINITIONS "@CGAL_PDB_3RD_PARTY_DEFINITIONS@" )

View File

@ -62,6 +62,7 @@ set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS "@CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS@
set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS "@CGAL_ImageIO_3RD_PARTY_DEFINITIONS@" )
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS "@CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS@" )
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" )
set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" )
set(CGAL_PDB_3RD_PARTY_INCLUDE_DIRS "@CGAL_PDB_3RD_PARTY_INCLUDE_DIRS@" )
set(CGAL_PDB_3RD_PARTY_DEFINITIONS "@CGAL_PDB_3RD_PARTY_DEFINITIONS@" )

View File

@ -60,6 +60,7 @@ set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS "@CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS@
set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS "@CGAL_ImageIO_3RD_PARTY_DEFINITIONS@" )
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS "@CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS@" )
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" )
set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" )
set(CGAL_PDB_3RD_PARTY_INCLUDE_DIRS "@CGAL_PDB_3RD_PARTY_INCLUDE_DIRS@" )
set(CGAL_PDB_3RD_PARTY_DEFINITIONS "@CGAL_PDB_3RD_PARTY_DEFINITIONS@" )

View File

@ -25,7 +25,11 @@ if ( CGAL_FOUND )
# Compilable examples
create_single_source_cgal_program( "mesh_implicit_sphere.cpp" )
# create_single_source_cgal_program( "mesh_implicit_domains.cpp" "implicit_functions.cpp" )
create_single_source_cgal_program( "mesh_3D_image.cpp" )
if( CGAL_ImageIO_USE_ZLIB )
create_single_source_cgal_program( "mesh_3D_image.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_implicit_function.cpp" )
# create_single_source_cgal_program( "mesh_polyhedral_surface_tolerance_region.cpp" )