From 3b1b080330eeccbc17ee2785c1925645e091c4e5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 31 Jan 2019 13:39:44 +0100 Subject: [PATCH] Do for example what we did for test --- .../examples/Periodic_3_mesh_3/CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt index ef572651d9f..4c3efde1ded 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt @@ -5,10 +5,16 @@ project( Periodic_3_mesh_3_Examples ) cmake_minimum_required(VERSION 3.1) -# CGAL and its components -find_package( CGAL QUIET ) +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() -if ( NOT CGAL_FOUND ) +# CGAL and its components +find_package( CGAL QUIET COMPONENTS ImageIO ) + +if ( CGAL_FOUND ) + include( ${CGAL_USE_FILE} ) +else() message(STATUS "This project requires the CGAL library, and will not be compiled.") return() endif()