Merge pull request #5063 from maxGimeno/CMake-modernization-maxGimeno

CMake modernization

# Conflicts:
#	CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt
This commit is contained in:
Laurent Rineau 2021-01-22 15:25:54 +01:00
commit ca9febf3b8
98 changed files with 290 additions and 2617 deletions

View File

@ -23,6 +23,8 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
add_compile_definitions(QT_NO_KEYWORDS) add_compile_definitions(QT_NO_KEYWORDS)
include_directories( BEFORE ./ ) include_directories( BEFORE ./ )
# Arrangement package includes
add_definitions(-DQT_NO_KEYWORDS)
option(COMPILE_UTILS_INCREMENTALLY option(COMPILE_UTILS_INCREMENTALLY
"Compile files in Utils directory incrementally, or compile them all as a unit. \ "Compile files in Utils directory incrementally, or compile them all as a unit. \
Incremental compilation will be better for development and consume less \ Incremental compilation will be better for development and consume less \

View File

@ -19,23 +19,6 @@ if(NOT Boost_FOUND)
endif() endif()
find_package(OpenMesh QUIET)
if(OpenMesh_FOUND)
include(UseOpenMesh)
add_definitions(-DCGAL_USE_OPENMESH)
else()
message(STATUS "Examples that use OpenMesh will not be compiled.")
endif()
find_package(METIS)
if(METIS_FOUND)
include_directories(${METIS_INCLUDE_DIRS})
else()
message(STATUS "Examples that use the METIS library will not be compiled.")
endif()
# include for local directory # include for local directory
# include for local package # include for local package
@ -59,12 +42,21 @@ create_single_source_cgal_program("transform_iterator.cpp")
create_single_source_cgal_program("copy_polyhedron.cpp") create_single_source_cgal_program("copy_polyhedron.cpp")
find_package( OpenMesh QUIET )
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} ) target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} )
target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH ) target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH )
else()
message(STATUS "Examples that use OpenMesh will not be compiled.")
endif() endif()
if(METIS_FOUND) find_package( METIS )
create_single_source_cgal_program("polyhedron_partition.cpp") if( METIS_FOUND )
target_link_libraries(polyhedron_partition PRIVATE ${METIS_LIBRARIES}) create_single_source_cgal_program( "polyhedron_partition.cpp" )
if( METIS_FOUND )
target_include_directories( polyhedron_partition PRIVATE ${METIS_INCLUDE_DIRS} )
target_link_libraries( polyhedron_partition PRIVATE ${METIS_LIBRARIES} )
else()
message( STATUS "Examples that use the METIS library will not be compiled." )
endif()
endif() endif()

View File

@ -13,12 +13,10 @@ create_single_source_cgal_program("surface_mesh_dual.cpp")
create_single_source_cgal_program("connected_components.cpp") create_single_source_cgal_program("connected_components.cpp")
find_package(METIS) find_package(METIS)
if( METIS_FOUND )
if(METIS_FOUND) create_single_source_cgal_program( "surface_mesh_partition.cpp" )
include_directories(${METIS_INCLUDE_DIRS}) target_include_directories( surface_mesh_partition PRIVATE ${METIS_INCLUDE_DIRS} )
target_link_libraries( surface_mesh_partition PRIVATE ${METIS_LIBRARIES} )
create_single_source_cgal_program("surface_mesh_partition.cpp")
target_link_libraries(surface_mesh_partition PRIVATE ${METIS_LIBRARIES})
else() else()
message(STATUS "Examples that use the METIS library will not be compiled.") message(STATUS "Examples that use the METIS library will not be compiled.")
endif() endif()

View File

@ -1,39 +0,0 @@
/****************************************************************************
* Core Library Version 1.7, August 2004
* Copyright (c) 1995-2004 Exact Computation Project
* All rights reserved.
*
* This file is part of CGAL (www.cgal.org).
*
* File: BigFloat.cpp
* Synopsis:
* BigFloat numbers with error bounds
*
* EXACTNESS PROPERTY:
* ==================
* For BigFloats that are exact (i.e., error=0),
* addition/subtraction and multiplication return the
* exact result (i.e., error=0). We also introduce the operation
* div2(), which simply divides a BigFloat by 2,
* but this again preserves exactness. Such exactness
* properties are used in our Newton iteration/Sturm Sequences.
*
* Written by
* Chee Yap <yap@cs.nyu.edu>
* Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu>
*
* WWW URL: http://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu
*
* $URL$
* $Id$
* SPDX-License-Identifier: LGPL-3.0-or-later
***************************************************************************/
#ifndef CGAL_HEADER_ONLY
#include <CGAL/CORE/BigFloat.h>
#include <CGAL/CORE/BigFloat_impl.h>
#endif

View File

@ -1,17 +0,0 @@
include(CGAL_SetupCGAL_CoreDependencies)
message("Configuring libCGAL_Core")
if(CGAL_Core_FOUND)
collect_cgal_library(CGAL_Core "")
if(CGAL_HEADER_ONLY)
set(keyword INTERFACE)
else()
set(keyword PUBLIC)
endif()
cgal_setup_cgal_core_dependencies(CGAL_Core ${keyword})
message("libCGAL_Core is configured")
endif()

View File

@ -1,31 +0,0 @@
/****************************************************************************
* Core Library Version 1.7, August 2004
* Copyright (c) 1995-2004 Exact Computation Project
* All rights reserved.
*
* This file is part of CGAL (www.cgal.org).
*
* File: CoreAux.cpp
* Synopsis:
* Auxiliary routines such as ceiling of log_2, etc.
* they are not specific to any Core classes.
*
* Written by
* Chee Yap <yap@cs.nyu.edu>
* Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu>
*
* WWW URL: http://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu
*
* $URL$
* $Id$
* SPDX-License-Identifier: LGPL-3.0-or-later
***************************************************************************/
#ifndef CGAL_HEADER_ONLY
#include <CGAL/CORE/CoreAux.h>
#include <CGAL/CORE/CoreAux_impl.h>
#endif

View File

@ -1,30 +0,0 @@
/****************************************************************************
* Core Library Version 1.7, August 2004
* Copyright (c) 1995-2004 Exact Computation Project
* All rights reserved.
*
* This file is part of CGAL (www.cgal.org).
*
* File: CoreDefs.cpp
* Synopsis:
* Useful parameters for Core Library which users may change
*
* Written by
* Chee Yap <yap@cs.nyu.edu>
* Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu>
*
* WWW URL: http://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu
*
* $URL$
* $Id$
* SPDX-License-Identifier: LGPL-3.0-or-later
***************************************************************************/
#ifndef CGAL_HEADER_ONLY
#include <CGAL/CORE/CoreDefs.h>
#include <CGAL/CORE/CoreDefs_impl.h>
#endif

View File

@ -1,24 +0,0 @@
/****************************************************************************
* Core Library Version 1.7, August 2004
* Copyright (c) 1995-2004 Exact Computation Project
* All rights reserved.
*
* This file is part of CGAL (www.cgal.org).
*
* File: CoreIO.cpp
*
* Written by
* Zilin Du <zilin@cs.nyu.edu>
* Chee Yap <yap@cs.nyu.edu>
*
* WWW URL: http://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu
*
* $URL$
* $Id$
* SPDX-License-Identifier: LGPL-3.0-or-later
***************************************************************************/
#ifndef CGAL_HEADER_ONLY
#include <CGAL/CORE/CoreIO_impl.h>
#endif

View File

@ -1,32 +0,0 @@
/****************************************************************************
* Core Library Version 1.7, August 2004
* Copyright (c) 1995-2004 Exact Computation Project
* All rights reserved.
*
* This file is part of CGAL (www.cgal.org).
*
* File: Expr.cpp
*
* Written by
* Koji Ouchi <ouchi@simulation.nyu.edu>
* Chee Yap <yap@cs.nyu.edu>
* Igor Pechtchanski <pechtcha@cs.nyu.edu>
* Vijay Karamcheti <vijayk@cs.nyu.edu>
* Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu>
* Sylvain Pion <pion@cs.nyu.edu>
*
* WWW URL: http://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu
*
* $URL$
* $Id$
* SPDX-License-Identifier: LGPL-3.0-or-later
***************************************************************************/
#ifndef CGAL_HEADER_ONLY
#include <CGAL/CORE/Expr.h>
#include <CGAL/CORE/Expr_impl.h>
#endif

View File

@ -1,23 +0,0 @@
/****************************************************************************
* Core Library Version 1.7, August 2004
* Copyright (c) 1995-2004 Exact Computation Project
* All rights reserved.
*
* This file is part of CGAL (www.cgal.org).
*
* file: GmpIO.cpp
* Adapted from multi-files under /cxx in GMP's source distribution
*
* Zilin Du, 2003
*
* $URL$
* $Id$
* SPDX-License-Identifier: LGPL-3.0-only
***************************************************************************/
#ifndef CGAL_HEADER_ONLY
#include <CGAL/CORE/Gmp.h>
#include <CGAL/CORE/Gmp_impl.h>
#endif

View File

@ -1,33 +0,0 @@
/****************************************************************************
* Core Library Version 1.7, August 2004
* Copyright (c) 1995-2004 Exact Computation Project
* All rights reserved.
*
* This file is part of CGAL (www.cgal.org).
*
* File: Real.cpp
* Synopsis: The Real class is a superclass for all the number
* systems in the Core Library (int, long, float, double,
* BigInt, BigRat, BigFloat, etc)
*
* Written by
* Koji Ouchi <ouchi@simulation.nyu.edu>
* Chee Yap <yap@cs.nyu.edu>
* Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu>
* Sylvain Pion <pion@cs.nyu.edu>
*
* WWW URL: http://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu
*
* $URL$
* $Id$
* SPDX-License-Identifier: LGPL-3.0-or-later
***************************************************************************/
#ifndef CGAL_HEADER_ONLY
#include <CGAL/CORE/Real.h>
#include <CGAL/CORE/Real_impl.h>
#endif

View File

@ -1,37 +0,0 @@
/****************************************************************************
* Core Library Version 1.7, August 2004
* Copyright (c) 1995-2004 Exact Computation Project
* All rights reserved.
*
* This file is part of CGAL (www.cgal.org).
*
* File: extLong.cpp
* Synopsis:
* The class extLong is basically a wrapper around the machine
* type long. It is an important class to provide several
* additional facilities to detect overflows and undefined values.
* Future development includes extensions to level arithmetic
* (i.e., if a number overflows level i, we will go to level i+1).
* Level i representation of a number n is just i iterations
* of log_2 applied to n.
*
* Written by
* Chee Yap <yap@cs.nyu.edu>
* Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu>
* Sylvain Pion <pion@cs.nyu.edu>
*
* WWW URL: http://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu
*
* $URL$
* $Id$
* SPDX-License-Identifier: LGPL-3.0-or-later
***************************************************************************/
#ifndef CGAL_HEADER_ONLY
#include <CGAL/CORE/extLong.h>
#include <CGAL/CORE/extLong_impl.h>
#endif

View File

@ -1,22 +0,0 @@
message("Configuring libCGAL_ImageIO")
collect_cgal_library(CGAL_ImageIO "")
include(CGAL_SetupCGAL_ImageIODependencies)
if(CGAL_HEADER_ONLY)
set(keyword "INTERFACE")
endif()
cgal_setup_cgal_imageio_dependencies(CGAL_ImageIO ${keyword})
if(COMMAND add_config_flag)
set(CGAL_HAS_IMAGEIO TRUE)
add_config_flag(CGAL_HAS_IMAGEIO)
endif()
if(ZLIB_FOUND)
get_dependency_version(ZLIB)
endif()
message("libCGAL_ImageIO is configured")

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// Copyright (c) 2007 Geometrica Project, INRIA Sophia-Antipolis (France)
// Copyright (c) 2008 GeometryFactory, Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO.h>
#include <CGAL/ImageIO_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 INRIA Sophia-Antipolis (France).
// 2008 GeometryFactory, Sophia Antipolis (France)
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Laurent Rineau, Pierre Alliez
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Image_3.h>
#include <CGAL/Image_3_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,15 +0,0 @@
// Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// The files in this directory are part of the ImageIO Library.
// You can redistribute them and/or modify them under the terms of the
// GNU Lesser General Public License as published by the Free Software Foundation;
// either version 3 of the License, or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Author(s) : Olivier Clatz, Herve Delingette et Gregoire Malandain

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/analyze.h>
#include <CGAL/ImageIO/analyze_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/bmp.h>
#include <CGAL/ImageIO/bmp_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/bmpendian.h>
#include <CGAL/ImageIO/bmpendian_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/bmpread.h>
#include <CGAL/ImageIO/bmpread_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/convert.h>
#include <CGAL/ImageIO/convert_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/fgetns.h>
#include <CGAL/ImageIO/fgetns_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/gif.h>
#include <CGAL/ImageIO/gif_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/gis.h>
#include <CGAL/ImageIO/gis_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/inr.h>
#include <CGAL/ImageIO/inr_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/iris.h>
#include <CGAL/ImageIO/iris_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/mincio.h>
#include <CGAL/ImageIO/mincio_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/pnm.h>
#include <CGAL/ImageIO/pnm_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/recbuffer.h>
#include <CGAL/ImageIO/recbuffer_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/recline.h>
#include <CGAL/ImageIO/recline_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
// All rights reserved.
//
// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/ImageIO/reech4x4.h>
#include <CGAL/ImageIO/reech4x4_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -35,67 +35,36 @@ endif()
find_package(IPE 6) find_package(IPE 6)
if(IPE_FOUND) if(IPE_FOUND)
include_directories(BEFORE ${IPE_INCLUDE_DIR}) if (${IPE_VERSION} EQUAL "7")
if(${IPE_VERSION} EQUAL "7")
set(WITH_IPE_7 ON) set(WITH_IPE_7 ON)
elseif(${IPE_VERSION} EQUAL "6") elseif(${IPE_VERSION} EQUAL "6")
set(WITH_IPE_7 OFF) set(WITH_IPE_7 OFF)
else() else()
message( message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 6 and 7 are).")
"-- Error: ${IPE_VERSION} is not a supported version of IPE (only 6 and 7 are)."
)
set(IPE_FOUND FALSE) set(IPE_FOUND FALSE)
endif() endif()
# starting ipe 7.2.1, a compiler with c++11 must be used to compile ipelets
if(${IPE_VERSION} EQUAL "7"
AND ${IPE_MINOR_VERSION_1} GREATER "1"
AND ${IPE_MINOR_VERSION_2} GREATER "0")
message(
STATUS
"Starting from Ipe 7.2.1 a compiler with c++11 support must be used")
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11)
if(has_cpp11 LESS 0)
message(
STATUS
"NOTICE: This demo requires a C++11 compiler and will not be compiled."
)
return()
endif()
# Use C++11 for this directory and its sub-directories.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
endif()
endif() endif()
if(IPE_FOUND AND IPE_VERSION)
if(WITH_IPE_7)
add_definitions(-DCGAL_USE_IPE_7)
endif()
if(IPE_FOUND AND IPE_VERSION)
message("-- Using IPE version ${IPE_VERSION} compatibility.") message("-- Using IPE version ${IPE_VERSION} compatibility.")
#setting installation directory #setting installation directory
get_filename_component(IPE_LIBRARY_DIR ${IPE_LIBRARIES} PATH) get_filename_component(IPE_LIBRARY_DIR ${IPE_LIBRARIES} PATH)
if(IPE_FOUND AND NOT IPELET_INSTALL_DIR) if (IPE_FOUND AND NOT IPELET_INSTALL_DIR)
if(WITH_IPE_7) if (WITH_IPE_7)
remove_leading_zero(IPE_MINOR_VERSION_1) remove_leading_zero(IPE_MINOR_VERSION_1)
remove_leading_zero(IPE_MINOR_VERSION_2) remove_leading_zero(IPE_MINOR_VERSION_2)
set(INSTALL_PATHS set(INSTALL_PATHS "${IPE_LIBRARY_DIR}/ipe/7.${IPE_MINOR_VERSION_1}.${IPE_MINOR_VERSION_2}/ipelets/")
"${IPE_LIBRARY_DIR}/ipe/7.${IPE_MINOR_VERSION_1}.${IPE_MINOR_VERSION_2}/ipelets/" find_path(IPELET_INSTALL_DIR
) NAMES libgoodies.lua goodies.lua
find_path( PATHS ${INSTALL_PATHS}
IPELET_INSTALL_DIR DOC "The folder where ipelets will be installed"
NAMES libgoodies.lua goodies.lua ENV IPELETPATH
PATHS ${INSTALL_PATHS} )
DOC "The folder where ipelets will be installed" ENV IPELETPATH)
else() else()
foreach(VER RANGE 28 40) foreach (VER RANGE 28 40)
string(REPLACE XX ${VER} PATHC string(REPLACE XX ${VER} PATHC "${IPE_LIBRARY_DIR}/ipe/6.0preXX/ipelets/" )
"${IPE_LIBRARY_DIR}/ipe/6.0preXX/ipelets/")
set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC}) set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC})
endforeach() endforeach()
set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC}) set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC})
@ -146,16 +115,20 @@ if(IPE_FOUND AND IPE_VERSION)
foreach(IPELET ${CGAL_IPELETS}) foreach(IPELET ${CGAL_IPELETS})
add_library(CGAL_${IPELET} MODULE ${IPELET}.cpp) add_library(CGAL_${IPELET} MODULE ${IPELET}.cpp)
target_include_directories(CGAL_${IPELET} BEFORE PRIVATE ${IPE_INCLUDE_DIR})
if (WITH_IPE_7)
target_compile_definitions(CGAL_${IPELET} PRIVATE CGAL_USE_IPE_7)
endif()
add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_${IPELET}) add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_${IPELET})
target_link_libraries(CGAL_${IPELET} PRIVATE CGAL::CGAL CGAL::Eigen3_support target_link_libraries(CGAL_${IPELET} PRIVATE CGAL::CGAL CGAL::Eigen3_support
${IPE_LIBRARIES}) ${IPE_LIBRARIES})
if(IPELET_INSTALL_DIR) if(IPELET_INSTALL_DIR)
install(TARGETS CGAL_${IPELET} DESTINATION ${IPELET_INSTALL_DIR}) install(TARGETS CGAL_${IPELET} DESTINATION ${IPELET_INSTALL_DIR})
if(WITH_IPE_7) if (WITH_IPE_7)
install(FILES ./lua/libCGAL_${IPELET}.lua install(FILES ./lua/libCGAL_${IPELET}.lua DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7
DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7
endif() endif()
endif() endif ()
cgal_add_compilation_test(CGAL_${IPELET}) cgal_add_compilation_test(CGAL_${IPELET})
endforeach(IPELET) endforeach(IPELET)
if(CGAL_Core_FOUND) if(CGAL_Core_FOUND)
@ -170,8 +143,5 @@ if(IPE_FOUND AND IPE_VERSION)
cgal_add_compilation_test(simple_triangulation) cgal_add_compilation_test(simple_triangulation)
else() else()
message( message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.")
STATUS
"NOTICE: This program requires the Ipe include files and library, and will not be compiled."
)
endif() endif()

View File

@ -183,9 +183,9 @@ You should place the generated file in the proper directory (and possibly
rename it). Then you can use the checks in the following fashion. rename it). Then you can use the checks in the following fashion.
\code{.cpp} \code{.cpp}
#include <CGAL/optimisation\_assertions.h> #include <CGAL/Optimisation/assertions.h>
void optimisation\_foo( int i) void optimisation_foo( int i)
{ {
CGAL_optimisation_precondition_msg( i == 42, "Only 42 allowed!"); CGAL_optimisation_precondition_msg( i == 42, "Only 42 allowed!");
// ... // ...

View File

@ -23,7 +23,7 @@ supporting <a href="https://isocpp.org/wiki/faq/cpp14">C++14</a> or later.
Older versions of the above listed compilers might work, but no guarantee is provided. Older versions of the above listed compilers might work, but no guarantee is provided.
\section seccmake CMake \section seccmake CMake
<b>Version 3.1 or later</b> <b>Version 3.12 or later</b>
In order to configure and build the \cgal examples, demos, or libraries, In order to configure and build the \cgal examples, demos, or libraries,
you need <a href="https://cmake.org/">CMake</a>, a cross-platform "makefile generator". you need <a href="https://cmake.org/">CMake</a>, a cross-platform "makefile generator".

View File

@ -1,22 +0,0 @@
// Copyright (c) 1999-2004
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri, Herve Bronnimann, Sylvain Pion
#ifndef CGAL_HEADER_ONLY
#include <CGAL/IO/Geomview_stream.h>
#include <CGAL/IO/Geomview_stream_impl.h>
#endif

View File

@ -1,66 +0,0 @@
message("Configuring libCGAL_Qt5")
if(NOT POLICY CMP0070 AND POLICY CMP0053)
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
cmake_policy(SET CMP0053 OLD)
endif()
include(CGAL_SetupCGAL_Qt5Dependencies)
if(CGAL_Qt5_MISSING_DEPS)
message(
STATUS
"libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured."
)
return()
endif()
message(STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'")
if(NOT CGAL_HEADER_ONLY)
collect_cgal_library(
CGAL_Qt5
"${_CGAL_Qt5_MOC_FILES_private};${_CGAL_Qt5_RESOURCE_FILES_private};${_CGAL_Qt5_UI_FILES}"
)
target_include_directories(CGAL_Qt5 PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
else()
collect_cgal_library(CGAL_Qt5 "")
endif()
if(CGAL_HEADER_ONLY)
set(keyword "INTERFACE")
endif()
cgal_setup_cgal_qt5_dependencies(CGAL_Qt5 ${keyword})
if(COMMAND add_config_flag)
set(CGAL_HAS_QT5 TRUE)
add_config_flag(CGAL_HAS_QT5)
endif()
install(
DIRECTORY "../../include/CGAL/Qt/"
DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/Qt"
COMPONENT CGAL_Qt5)
if(CGAL_HEADER_ONLY)
if(EXISTS ${CGAL_MODULES_DIR}/demo/resources)
install(
DIRECTORY "${CGAL_MODULES_DIR}/demo/resources/"
DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/resources"
COMPONENT CGAL_Qt5)
install(
DIRECTORY "${CGAL_MODULES_DIR}/demo/icons/"
DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/icons"
COMPONENT CGAL_Qt5)
else()
install(
DIRECTORY "../../demo/resources/"
DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/resources"
COMPONENT CGAL_Qt5)
install(
DIRECTORY "../../demo/icons/"
DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/icons"
COMPONENT CGAL_Qt5)
endif()
endif()
message("libCGAL_Qt5 is configured")

View File

@ -1,20 +0,0 @@
// Copyright (c) 2008 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri <Andreas.Fabri@geometryfactory.com>
// Laurent Rineau <Laurent.Rineau@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/disable_warnings.h>
#include <CGAL/Qt/DemosMainWindow.h>
#include <CGAL/Qt/DemosMainWindow_impl.h>
#include <CGAL/enable_warnings.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,8 +0,0 @@
# moc files that are compiled directly as cpp files
qt5_wrap_cpp(mocfiles ../../include/CGAL/Qt/GraphicsViewNavigation.h
../../include/CGAL/Qt/DemosMainWindow.h
../../include/CGAL/Qt/GraphicsItem.h
../../include/CGAL/Qt/GraphicsViewInput.h)
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( RESOURCE_FILES ../../demo/resources/CGAL.qrc ../../demo/icons/Input.qrc ../../demo/icons/File.qrc ../../demo/icons/Triangulation_2.qrc)

View File

@ -1,21 +0,0 @@
// Copyright (c) 2008 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri <Andreas.Fabri@geometryfactory.com>
// Laurent Rineau <Laurent.Rineau@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/disable_warnings.h>
#include <CGAL/Qt/GraphicsViewNavigation.h>
#include <CGAL/Qt/GraphicsViewNavigation_impl.h>
#include <CGAL/enable_warnings.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,21 +0,0 @@
// Copyright (c) 2008 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri <Andreas.Fabri@geometryfactory.com>
// Laurent Rineau <Laurent.Rineau@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/disable_warnings.h>
#include <CGAL/Qt/GraphicsViewPolylineInput.h>
#include <CGAL/Qt/GraphicsViewPolylineInput_impl.h>
#include <CGAL/enable_warnings.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/camera.h>
#include <CGAL/Qt/camera_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/constraint.h>
#include <CGAL/Qt/constraint_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,19 +0,0 @@
// Copyright (c) 2008 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri <Andreas.Fabri@geometryfactory.com>
// Laurent Rineau <Laurent.Rineau@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/debug.h>
#include <CGAL/Qt/debug_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/frame.h>
#include <CGAL/Qt/frame_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/keyFrameInterpolator.h>
#include <CGAL/Qt/keyFrameInterpolator_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/manipulatedCameraFrame.h>
#include <CGAL/Qt/manipulatedCameraFrame_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/manipulatedFrame.h>
#include <CGAL/Qt/manipulatedFrame_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/mouseGrabber.h>
#include <CGAL/Qt/mouseGrabber_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/qglviewer.h>
#include <CGAL/Qt/qglviewer_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/quaternion.h>
#include <CGAL/Qt/quaternion_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,20 +0,0 @@
// Copyright (c) 2011 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Laurent Rineau <Laurent.Rineau@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/disable_warnings.h>
#include <CGAL/Qt/resources.h>
#include <CGAL/Qt/resources_impl.h>
#include <CGAL/enable_warnings.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,18 +0,0 @@
// Copyright (c) 2008 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Andreas Fabri <Andreas.Fabri@geometryfactory.com>
// Laurent Rineau <Laurent.Rineau@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/utility.h>
#include <CGAL/Qt/utility_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,17 +0,0 @@
// Copyright (c) 2018 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Author(s) : Maxime Gimeno <maxime.gimeno@geometryfactory.com>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Qt/vec.h>
#include <CGAL/Qt/vec_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -17,21 +17,20 @@ find_package(LEDA QUIET)
# Find Qt5 itself # Find Qt5 itself
find_package(Qt5 QUIET COMPONENTS OpenGL Gui) find_package(Qt5 QUIET COMPONENTS OpenGL Gui)
if(CGAL_Qt5_FOUND if(CGAL_Qt5_FOUND
AND Qt5_FOUND AND Qt5_FOUND
AND (CGAL_Core_FOUND OR LEDA_FOUND)) AND (CGAL_Core_FOUND OR LEDA_FOUND))
include_directories(BEFORE ./ ./include)
# ui files, created with Qt Designer # ui files, created with Qt Designer
qt5_wrap_ui(UIS HDT2.ui) qt5_wrap_ui(UIS HDT2.ui)
qt5_add_resources(RESOURCE_FILES resources/Delaunay_triangulation_2.qrc) qt5_add_resources(RESOURCE_FILES resources/Delaunay_triangulation_2.qrc)
# cpp files # cpp files
add_executable(HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} add_executable ( HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} ${UIS})
${UIS}) target_include_directories(HDT2 PRIVATE ./ ./include)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS HDT2) add_to_cached_list( CGAL_EXECUTABLE_TARGETS HDT2 )
target_link_libraries(HDT2 CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core target_link_libraries ( HDT2 CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core Qt5::Widgets)
Qt5::Widgets)
else() else()
message( message(
STATUS STATUS

View File

@ -11,7 +11,7 @@
#else #else
#include <CGAL/Cartesian.h> #include <CGAL/Cartesian.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <internal/Qt/HyperbolicPainterOstream.h> #include "internal/Qt/HyperbolicPainterOstream.h"
#endif #endif
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>

View File

@ -4,33 +4,18 @@
# ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as # ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as
# ${CMAKE_BINARY_DIR} or ${CMAKE_BINARY_DIR}. # ${CMAKE_BINARY_DIR} or ${CMAKE_BINARY_DIR}.
if(NOT PROJECT_NAME) if(NOT PROJECT_NAME)
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.12...3.18)
project(CGAL CXX C) project(CGAL CXX C)
endif() endif()
if(POLICY CMP0056) # Fix a bug: `try_compile` should use `CMAKE_EXE_LINKER_FLAGS`.
# https://cmake.org/cmake/help/v3.2/policy/CMP0056.html # That variable can contain important flags like
# #
# Fix a bug: `try_compile` should use `CMAKE_EXE_LINKER_FLAGS`. # -static-libstdc++ -static-libgcc
# That variable can contain important flags like #
#
# -static-libstdc++ -static-libgcc
#
cmake_policy(SET CMP0056 NEW)
endif()
# Use GNUInstallDirs to get canonical paths # Use GNUInstallDirs to get canonical paths
include(GNUInstallDirs) include(GNUInstallDirs)
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
#
# -= HEADER ONLY =-
#
#--------------------------------------------------------------------------------------------------
option(CGAL_HEADER_ONLY
"Enable header-only mode of CGAL (no compilation of CGAL libraries)"
TRUE)
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# #
# -= PACKAGE SETUP =- # -= PACKAGE SETUP =-
@ -127,11 +112,6 @@ else(CGAL_BRANCH_BUILD)
# Enable testing with BUILD_TESTING # Enable testing with BUILD_TESTING
option(BUILD_TESTING "Build the testing tree." OFF) option(BUILD_TESTING "Build the testing tree." OFF)
if(BUILD_TESTING AND NOT POLICY CMP0064)
message(
FATAL_ERROR "CGAL support of CTest requires CMake version 3.4 or later.
The variable BUILD_TESTING must be set of OFF.")
endif()
if(BUILD_TESTING) if(BUILD_TESTING)
enable_testing() enable_testing()
endif() endif()
@ -418,9 +398,9 @@ set(CGAL_ImageIO_SOVERSION "14.0.0")
set(CGAL_Qt5_SONAME_VERSION "14") set(CGAL_Qt5_SONAME_VERSION "14")
set(CGAL_Qt5_SOVERSION "14.0.0") set(CGAL_Qt5_SOVERSION "14.0.0")
message(STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}") message( STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}" )
message(STATUS "CGAL_SOVERSION =${CGAL_SOVERSION}") message( STATUS "CGAL_SOVERSION =${CGAL_SOVERSION}" )
set(CGAL_BUILDING_LIBS TRUE)
set(CGAL_VERSION_DIR CGAL-${CGAL_VERSION}) set(CGAL_VERSION_DIR CGAL-${CGAL_VERSION})
set(CGAL_MODULES_REL_DIR cmake/modules) set(CGAL_MODULES_REL_DIR cmake/modules)
@ -579,34 +559,6 @@ endif()
message("== Detect external libraries ==") message("== Detect external libraries ==")
# this is the place to tell which external libs are supporting
# Remarks:
# External libs configured when Qt5 lib of cgal are required
# Coin is used in KDS, but no FindCoin or FindCOIN exists
# There exists FindIPE, FindMKL, but they are only used to support supporting libs
list(
INSERT
CGAL_SUPPORTING_3RD_PARTY_LIBRARIES
0
GMP
MPFR
ZLIB
OpenGL
LEDA
MPFI
RS
RS3
OpenNL
Eigen3
ESBTL
Coin3D
NTL
IPE)
# Where CMake is run several times, to avoid duplicates
list(REMOVE_DUPLICATES CGAL_SUPPORTING_3RD_PARTY_LIBRARIES)
hide_variable(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES)
# set some to have special prefix # set some to have special prefix
macro(set_special_prefix library prefix) macro(set_special_prefix library prefix)
set(SPECIAL_PREFIXES set(SPECIAL_PREFIXES
@ -640,13 +592,8 @@ if(CGAL_DISABLE_GMP)
unset(MPFR_FOUND CACHE) unset(MPFR_FOUND CACHE)
unset(WITH_CGAL_Core) unset(WITH_CGAL_Core)
unset(WITH_CGAL_Core CACHE) unset(WITH_CGAL_Core CACHE)
unset(WITH_GMP)
unset(WITH_GMP CACHE)
unset(CGAL_USE_GMP) unset(CGAL_USE_GMP)
unset(CGAL_USE_GMP CACHE) unset(CGAL_USE_GMP CACHE)
unset(WITH_MPFR)
unset(WITH_MPFR CACHE)
# Nasty trick to make sure <gmp.h> is not used when CGAL_DISABLE_GMP is TRUE # Nasty trick to make sure <gmp.h> is not used when CGAL_DISABLE_GMP is TRUE
file(WRITE "${CMAKE_BINARY_DIR}/include/gmp.h" file(WRITE "${CMAKE_BINARY_DIR}/include/gmp.h"
"#error GMP is disabled by the CMake option CGAL_DISABLE_GMP") "#error GMP is disabled by the CMake option CGAL_DISABLE_GMP")
@ -660,24 +607,6 @@ else()
endif() endif()
hide_variable(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES) hide_variable(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES)
foreach(lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES})
# set standard prefix
if(NOT DEFINED CGAL_EXT_LIB_${lib}_PREFIX)
set(CGAL_EXT_LIB_${lib}_PREFIX ${lib})
endif()
hide_variable(CGAL_EXT_LIB_${lib}_PREFIX)
# add option
list(FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION)
if("${POSITION}" STRGREATER "-1") # if lib is essential
option(WITH_${lib} "Select external library ${lib}" ON)
else()
option(WITH_${lib} "Select external library ${lib}" OFF)
endif()
endforeach()
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# #
# -= DEPENDENCIES =- # -= DEPENDENCIES =-
@ -688,27 +617,16 @@ endforeach()
# The following variables are in the cache just so subdirectories can set them persistently. # The following variables are in the cache just so subdirectories can set them persistently.
# But they are not intended to persist from run to run as normal cache variables. # But they are not intended to persist from run to run as normal cache variables.
# Similar variables are created when a library is detected. # Similar variables are created when a library is detected.
#
cache_set(CGAL_3RD_PARTY_PRECONFIGURED "")
cache_set(CGAL_3RD_PARTY_DEFINITIONS "") cache_set(CGAL_3RD_PARTY_DEFINITIONS "")
cache_set(CGAL_3RD_PARTY_INCLUDE_DIRS "") cache_set(CGAL_3RD_PARTY_INCLUDE_DIRS "")
cache_set(CGAL_3RD_PARTY_LIBRARIES "") cache_set(CGAL_3RD_PARTY_LIBRARIES "")
cache_set(CGAL_3RD_PARTY_LIBRARIES_DIRS "") cache_set(CGAL_3RD_PARTY_LIBRARIES_DIRS "")
# default is on, but some use-cases need to set it to off, e.g., debian packages
option(CGAL_ENABLE_PRECONFIG
"Select to allow to preconfiguration of external libraries" ON)
# additional info: some header files in CGAL add additional code if # additional info: some header files in CGAL add additional code if
# certain optional libs are installed, and some examples/tests rely on # certain optional libs are installed, and some examples/tests rely on
# this; e.g. in MPFI/RS in Algebraic_kernel_d. For these cases CGAL # this; e.g. in MPFI/RS in Algebraic_kernel_d. For these cases CGAL
# and the example/test must be configured with MPFI (just one is not sufficient) # and the example/test must be configured with MPFI (just one is not sufficient)
if(NOT CGAL_HEADER_ONLY)
include(CGAL_SetupDependencies)
endif()
message("== Detect external libraries (DONE) ==\n") message("== Detect external libraries (DONE) ==\n")
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
@ -717,77 +635,6 @@ message("== Detect external libraries (DONE) ==\n")
# #
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
if(NOT CGAL_HEADER_ONLY)
# The variables set are the #defines expected by compiler_config.h
# Note: CMake will not notice when files are added or removed
# but this is probably OK for the installation procedure.
message("== Write compiler_config.h ==")
macro(add_config_flag flag)
if(${flag})
file(APPEND ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h
"#define ${flag} 1\n\n")
else()
file(APPEND ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h
"//#define ${flag} 1\n\n")
endif()
endmacro()
if(NOT CMAKE_CROSSCOMPILING)
file(GLOB all_config_tests "${CGAL_MODULES_DIR}/config/testfiles/*.cpp")
list(SORT all_config_tests)
file(
WRITE ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h
"//\n// compiler_config.h is included by CGAL headers to load the needed compiler settings.\n//\n// DO NOT EDIT compiler_config.h. It is generated by CMake.\n//\n\n"
)
foreach(config_test_cpp ${all_config_tests})
# Test's name is .cpp's base name
get_filename_component(config_test_name ${config_test_cpp} NAME_WE)
# Compile and run ${config_test_cpp}. Exit code is stored in ${config_test_name}.
check_cxx_file_runs(${config_test_cpp} ${config_test_name}
${config_test_name})
if(${config_test_name})
set(${config_test_name} 0)
else()
set(${config_test_name} 1)
endif()
add_config_flag(${config_test_name} ${config_test_name})
endforeach()
endif()
add_config_flag(CGAL_USE_GMP)
add_config_flag(CGAL_USE_MPFR)
add_config_flag(CGAL_USE_GMPXX)
add_config_flag(CGAL_USE_LEDA)
add_config_flag(CGAL_USE_MPFI)
add_config_flag(CGAL_USE_RS)
add_config_flag(CGAL_USE_NTL)
add_config_flag(CGAL_BUILD_SHARED_LIBS)
if(NOT ${WITH_CGAL_Core})
set(CGAL_USE_CORE FALSE)
else()
set(CGAL_USE_CORE ${CGAL_USE_GMP})
endif()
add_config_flag(CGAL_USE_CORE)
# ^^ there is CGAL_USE_CORE and not CGAL_HAS_CORE, as CORE is considered
# as external lib and not as CGAL component (EBEB: 24 Jan 2012)
if(RUNNING_CGAL_AUTO_TEST AND MSVC)
file(APPEND "${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h"
"#include <CGAL/Testsuite/vc_debug_hook.h>\n\n")
endif()
message("== Write compiler_config.h (DONE) ==\n")
endif(NOT CGAL_HEADER_ONLY)
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# #
# -= Installation Setup =- # -= Installation Setup =-
@ -863,18 +710,18 @@ endforeach()
include_directories(${CGAL_INCLUDE_DIRS}) include_directories(${CGAL_INCLUDE_DIRS})
cache_get(CGAL_3RD_PARTY_PRECONFIGURED) cache_get(CGAL_3RD_PARTY_DEFINITIONS )
cache_get(CGAL_3RD_PARTY_INCLUDE_DIRS )
cache_get(CGAL_3RD_PARTY_DEFINITIONS) cache_get(CGAL_3RD_PARTY_LIBRARIES )
cache_get(CGAL_3RD_PARTY_INCLUDE_DIRS)
cache_get(CGAL_3RD_PARTY_LIBRARIES)
cache_get(CGAL_3RD_PARTY_LIBRARIES_DIRS) cache_get(CGAL_3RD_PARTY_LIBRARIES_DIRS)
add_subdirectory(src) install(DIRECTORY "${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/Qt" COMPONENT CGAL_Qt5)
install(DIRECTORY "${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/" DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/resources" COMPONENT CGAL_Qt5)
install(DIRECTORY "${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/" DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/icons" COMPONENT CGAL_Qt5)
# #
# Variables used when WITH_{demos|examples|tests} are TRUE, and # Variables used when WITH_{demos|examples|tests} are TRUE
# CGAL_HEADER_ONLY=ON
# #
set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake)
get_property(CGAL_FOUND GLOBAL PROPERTY CGAL_FOUND) get_property(CGAL_FOUND GLOBAL PROPERTY CGAL_FOUND)
@ -929,15 +776,10 @@ if(CGAL_BRANCH_BUILD AND CGAL_REPORT_DUPLICATE_FILES)
endif() endif()
if(NOT CGAL_HEADER_ONLY) configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary_header_only.cmake.in"
create_cgalconfig_files() "${CMAKE_BINARY_DIR}/CGALConfig.cmake" @ONLY)
else() configure_file("${CGAL_MODULES_DIR}/CGALConfigVersion_binary_header_only.cmake.in"
configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary_header_only.cmake.in" "${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake" @ONLY)
"${CMAKE_BINARY_DIR}/CGALConfig.cmake" @ONLY)
configure_file(
"${CGAL_MODULES_DIR}/CGALConfigVersion_binary_header_only.cmake.in"
"${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake" @ONLY)
endif()
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# #
@ -993,23 +835,17 @@ if(ZLIB_IN_AUXILIARY)
install(DIRECTORY auxiliary/zlib/lib/ DESTINATION ${CGAL_INSTALL_LIB_DIR}) install(DIRECTORY auxiliary/zlib/lib/ DESTINATION ${CGAL_INSTALL_LIB_DIR})
endif() endif()
if(NOT CGAL_HEADER_ONLY) install(FILES
install(FILES ${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake
${CMAKE_BINARY_DIR}/config/CGALConfig.cmake ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigBuildVersion.cmake
DESTINATION ${CGAL_INSTALL_CMAKE_DIR}) ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigVersion.cmake
else() DESTINATION ${CGAL_INSTALL_CMAKE_DIR})
install( if(NOT CGAL_INSTALL_CMAKE_DIR STREQUAL "${CGAL_INSTALL_LIB_DIR}/cmake/CGAL")
FILES ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake configure_file(${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig-installation-dirs.cmake.in
${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigBuildVersion.cmake ${CMAKE_BINARY_DIR}/config/CGALConfig-installation-dirs.cmake)
${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigVersion.cmake install(FILES
${CMAKE_BINARY_DIR}/config/CGALConfig-installation-dirs.cmake
DESTINATION ${CGAL_INSTALL_CMAKE_DIR}) DESTINATION ${CGAL_INSTALL_CMAKE_DIR})
if(NOT CGAL_INSTALL_CMAKE_DIR STREQUAL "${CGAL_INSTALL_LIB_DIR}/cmake/CGAL")
configure_file(
${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig-installation-dirs.cmake.in
${CMAKE_BINARY_DIR}/config/CGALConfig-installation-dirs.cmake)
install(FILES ${CMAKE_BINARY_DIR}/config/CGALConfig-installation-dirs.cmake
DESTINATION ${CGAL_INSTALL_CMAKE_DIR})
endif()
endif() endif()
if(CGAL_INSTALL_MAN_DIR) if(CGAL_INSTALL_MAN_DIR)
@ -1284,89 +1120,65 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.")
-DDOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE} -DDOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE}
"${CMAKE_SOURCE_DIR}/Documentation/doc" "${CMAKE_SOURCE_DIR}/Documentation/doc"
WORKING_DIRECTORY "${DOC_DIR}") WORKING_DIRECTORY "${DOC_DIR}")
execute_process(COMMAND "${CMAKE_COMMAND}" --build . --target "doc" execute_process(
WORKING_DIRECTORY "${DOC_DIR}") COMMAND
"${CMAKE_COMMAND}" --build . --target "doc"
WORKING_DIRECTORY "${DOC_DIR}" )
#Get the list of the documented headers #Get the list of the documented headers
file(GLOB html_files RELATIVE "${DOC_DIR}/doc_output/" "${DOC_DIR}/doc_output/*/*.html")
file(GLOB example_files RELATIVE "${CMAKE_SOURCE_DIR}/" "${CMAKE_SOURCE_DIR}/*/examples/*/*.cpp")
list(SORT example_files)
file( find_program(AWK awk)
GLOB html_files set(awk_arguments [=[{ match($0, /# *include *(&lt;|[<"])(CGAL\/[^>&"]*)([>"]|&gt;)| (CGAL\/[^>&"]*\.h)/,arr); if(arr[2]!="") print arr[2]; if(arr[4]!="") print arr[4] }]=])
RELATIVE "${DOC_DIR}/doc_output/" message("listing headers from html files")
"${DOC_DIR}/doc_output/*/*.html") foreach(f ${html_files})
file( execute_process(COMMAND "${AWK}" "${awk_arguments}" "${DOC_DIR}/doc_output/${f}"
GLOB example_files OUTPUT_VARIABLE tmp_list)
RELATIVE "${CMAKE_SOURCE_DIR}/" if (NOT "${tmp_list}" STREQUAL "")
"${CMAKE_SOURCE_DIR}/*/examples/*/*.cpp") string(REPLACE "\n" ";" tmp_list ${tmp_list})
find_program(AWK awk) LIST( APPEND list_of_documented_headers ${tmp_list})
set(awk_arguments
[=[{ match($0, /# *include *(&lt;|[<"])(CGAL\/[^>&"]*)([>"]|&gt;)| (CGAL\/[^>&"]*\.h)/,arr); if(arr[2]!="") print arr[2]; if(arr[4]!="") print arr[4] }]=]
)
message("listing headers from html files")
foreach(f ${html_files})
execute_process(
COMMAND "${AWK}" "${awk_arguments}" "${DOC_DIR}/doc_output/${f}"
OUTPUT_VARIABLE tmp_list)
if(NOT "${tmp_list}" STREQUAL "")
string(REPLACE "\n" ";" tmp_list ${tmp_list})
list(APPEND list_of_documented_headers ${tmp_list})
endif()
endforeach()
message("listing headers from examples files")
foreach(f ${example_files})
execute_process(
COMMAND "${AWK}" "${awk_arguments}" "${CMAKE_SOURCE_DIR}/${f}"
OUTPUT_VARIABLE tmp_list)
if(NOT "${tmp_list}" STREQUAL "")
string(REPLACE "\n" ";" tmp_list ${tmp_list})
list(APPEND list_of_documented_headers ${tmp_list})
endif()
endforeach()
message("removing duplicates:")
list(REMOVE_DUPLICATES list_of_documented_headers)
message("sorting:")
list(SORT list_of_documented_headers)
#string(REPLACE ";" " \n" list_of_documented_headers "${list_of_documented_headers}")
if(NOT "${list_of_documented_headers}" STREQUAL "")
set(has_list_of_documented_headers TRUE)
else()
set(has_list_of_documented_headers FALSE)
endif() endif()
include( endforeach()
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/list_of_whitelisted_headers.cmake
OPTIONAL message("listing headers from examples files")
RESULT_VARIABLE has_list_of_whitelisted_headers) foreach(f ${example_files})
execute_process(COMMAND "${AWK}" "${awk_arguments}" "${CMAKE_SOURCE_DIR}/${f}"
OUTPUT_VARIABLE tmp_list)
if (NOT "${tmp_list}" STREQUAL "")
string(REPLACE "\n" ";" tmp_list ${tmp_list})
LIST( APPEND list_of_documented_headers ${tmp_list})
endif()
endforeach()
message("removing duplicates:")
list(REMOVE_DUPLICATES list_of_documented_headers)
message("sorting:")
list(SORT list_of_documented_headers)
#string(REPLACE ";" " \n" list_of_documented_headers "${list_of_documented_headers}")
list(SORT list_of_documented_headers)
list(REMOVE_DUPLICATES list_of_documented_headers)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/list_of_whitelisted_headers.cmake
OPTIONAL RESULT_VARIABLE has_list_of_whitelisted_headers)
message("list_of_whitelisted_headers: ${list_of_whitelisted_headers}") message("list_of_whitelisted_headers: ${list_of_whitelisted_headers}")
## Loop on package and headers ## Loop on package and headers
set(check_pkg_target_list) set(check_pkg_target_list)
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
#get build dir for removal from deps #get build dir for removal from deps
get_filename_component(BUILD_DIR ${CMAKE_BINARY_DIR} NAME) get_filename_component(BUILD_DIR ${CMAKE_BINARY_DIR} NAME)
foreach(package ${CGAL_CONFIGURED_PACKAGES_NAMES}) foreach(package ${CGAL_CONFIGURED_PACKAGES_NAMES})
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include)
set(check_pkg_headers_depends "") set(check_pkg_headers_depends "")
if(has_list_of_documented_headers AND POLICY CMP0057) file(GLOB_RECURSE ${package}_HEADERS #don't use a hard coded list because the ones for the documented headers is enough.
# Then recurse2 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include"
file( "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h*")
GLOB_RECURSE ${package}_HEADERS
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h*")
else() # do not recurse
file(
GLOB ${package}_HEADERS
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h*")
endif()
list(SORT ${package}_HEADERS) list(SORT ${package}_HEADERS)
foreach(header ${${package}_HEADERS}) foreach(header ${${package}_HEADERS})
set(skip_hdr FALSE) set(skip_hdr FALSE)
if(POLICY CMP0057) if(NOT header IN_LIST list_of_documented_headers)
if(has_list_of_documented_headers AND NOT header IN_LIST # message(STATUS "Skip non-documented header \"${header}\".")
list_of_documented_headers) set(skip_hdr TRUE)
# message(STATUS "Skip non-documented header \"${header}\".")
set(skip_hdr TRUE)
endif()
endif() endif()
if(NOT VTK_FOUND) if(NOT VTK_FOUND)
string(REGEX MATCH ".*vtk.*" is_a_vtk_header ${header}) string(REGEX MATCH ".*vtk.*" is_a_vtk_header ${header})
@ -1382,12 +1194,10 @@ VTK_FOUND is false.")
LEDA_FOUND is false.") LEDA_FOUND is false.")
set(skip_hdr TRUE) set(skip_hdr TRUE)
endif() endif()
if(POLICY CMP0057) if(has_list_of_whitelisted_headers
if(has_list_of_whitelisted_headers AND header IN_LIST AND header IN_LIST list_of_whitelisted_headers)
list_of_whitelisted_headers) message(STATUS "Skip whitelisted header \"${header}\".")
message(STATUS "Skip whitelisted header \"${header}\".") set(skip_hdr TRUE)
set(skip_hdr TRUE)
endif()
endif() endif()
if(NOT skip_hdr) if(NOT skip_hdr)
list(APPEND list_of_headers_to_test ${header}) list(APPEND list_of_headers_to_test ${header})
@ -1456,7 +1266,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
list(REMOVE_DUPLICATES packages_deps) list(REMOVE_DUPLICATES packages_deps)
endif() endif()
endforeach() # loop on packages endforeach() # loop on packages
#Now check that a cpp file including all documented headers compiles #Now check that a cpp file including all documented headers compiles
file(WRITE ${CGAL_BINARY_DIR}/test_headers.cpp file(WRITE ${CGAL_BINARY_DIR}/test_headers.cpp
"#define BOOST_PARAMETER_MAX_ARITY 12 \n") "#define BOOST_PARAMETER_MAX_ARITY 12 \n")

View File

@ -24,17 +24,6 @@ if( NOT CGAL_COMMON_FILE_INCLUDED )
set( CMAKE_2_6_3_OR_ABOVE FALSE ) set( CMAKE_2_6_3_OR_ABOVE FALSE )
endif() endif()
if ( CGAL_BUILDING_LIBS )
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
set(CGAL_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
if ( BUILD_SHARED_LIBS )
message( STATUS "Building shared libraries" )
else()
message( STATUS "Building static libraries" )
endif()
endif()
if ( WIN32 ) if ( WIN32 )
find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
if(CMAKE_UNAME) if(CMAKE_UNAME)

View File

@ -57,6 +57,12 @@ function(create_single_source_cgal_program firstfile )
set(NO_TESTING TRUE) set(NO_TESTING TRUE)
endif() endif()
if(NOT NO_TESTING)
cgal_add_test(${exe_name})
else()
cgal_add_test(${exe_name} NO_EXECUTION)
endif()
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} )
target_link_libraries(${exe_name} PRIVATE CGAL::CGAL) target_link_libraries(${exe_name} PRIVATE CGAL::CGAL)

View File

@ -290,10 +290,9 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
# To deal with imported targets of Qt5 and Boost, when CGAL # To deal with imported targets of Qt5 and Boost, when CGAL
# targets are themselves imported by another project. # targets are themselves imported by another project.
if(NOT CGAL_BUILDING_LIBS)
if (${component} STREQUAL "Qt5") if (${component} STREQUAL "Qt5")
find_package(Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools QUIET) find_package(Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools QUIET)
endif()
endif() endif()
else(WITH_CGAL_${component}) else(WITH_CGAL_${component})
@ -308,9 +307,8 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
set( vlib "${CGAL_EXT_LIB_${component}_PREFIX}" ) set( vlib "${CGAL_EXT_LIB_${component}_PREFIX}" )
if ( NOT CGAL_IGNORE_PRECONFIGURED_${component} AND ${vlib}_FOUND) if (${vlib}_FOUND)
####message( STATUS "External library ${component} has been preconfigured")
use_lib( ${component} ${${vlib}_USE_FILE}) use_lib( ${component} ${${vlib}_USE_FILE})
else() else()
@ -334,45 +332,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
endmacro() endmacro()
macro( use_essential_libs )
# Comment: This is subject to be changed in the future
# - either more specific (giving precise include_dir- and link-order)
# - or even less specific if order becomes less relevant
# Eric Berberich 2012/06/29
if(NOT CGAL_DISABLE_GMP)
if(RS_FOUND)
use_component( RS )
endif()
if(MPFI_FOUND)
use_component( MPFI )
endif()
if(MPFR_FOUND)
use_component( MPFR )
endif()
if (GMPXX_FOUND)
use_component( GMPXX )
endif()
if(GMP_FOUND)
use_component( GMP )
endif()
endif(NOT CGAL_DISABLE_GMP)
if(LEDA_FOUND)
use_component( LEDA )
endif()
if(NTL_FOUND)
use_component( NTL )
endif()
endmacro()
function( cgal_setup_module_path ) function( cgal_setup_module_path )
# Avoid to modify the modules path twice # Avoid to modify the modules path twice
if(NOT CGAL_MODULE_PATH_IS_SET) if(NOT CGAL_MODULE_PATH_IS_SET)
@ -408,35 +367,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "${SPECIAL_PREFIXES}\n") file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "${SPECIAL_PREFIXES}\n")
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "${SPECIAL_PREFIXES}") file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "${SPECIAL_PREFIXES}")
foreach( lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES} )
list( FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION )
# if lib is essential or preconfiguration for an activated library ...
if ( ("${POSITION}" STRGREATER "-1") OR ( CGAL_ENABLE_PRECONFIG AND WITH_${lib} ))
set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} )
#the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n")
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_FOUND \"${${vlib}_FOUND}\" )\n")
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_USE_FILE \"${${vlib}_USE_FILE}\" )\n")
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_INCLUDE_DIR \"${${vlib}_INCLUDE_DIR}\" )\n")
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_LIBRARIES \"${${vlib}_LIBRARIES}\" )\n")
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_DEFINITIONS \"${${vlib}_DEFINITIONS}\" )\n")
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "endif()\n\n")
#the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n")
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_FOUND \"${${vlib}_FOUND}\")\n")
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_USE_FILE \"${${vlib}_USE_FILE}\" )\n")
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_INCLUDE_DIR \"${${vlib}_INCLUDE_DIR}\" )\n")
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_LIBRARIES \"${${vlib}_LIBRARIES}\" )\n")
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_DEFINITIONS \"${${vlib}_DEFINITIONS}\" )\n")
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "endif()\n\n")
endif()
endforeach()
endmacro() endmacro()
macro ( fetch_env_var VAR ) macro ( fetch_env_var VAR )

View File

@ -2,24 +2,6 @@ if(CGAL_Qt5_moc_and_resource_files_included)
return() return()
endif() endif()
set(CGAL_Qt5_moc_and_resource_files_included TRUE) set(CGAL_Qt5_moc_and_resource_files_included TRUE)
if(NOT CGAL_HEADER_ONLY AND CGAL_BUILDING_LIBS)
qt5_wrap_cpp(_CGAL_Qt5_MOC_FILES_private
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsItem.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewInput.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/camera.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/frame.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/keyFrameInterpolator.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/manipulatedCameraFrame.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/manipulatedFrame.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/qglviewer.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/image_interface.h
TARGET CGAL_Qt5
)
endif()#CGAL_HEADER_ONLY
# qrc files (resources files, that contain icons, at least) # qrc files (resources files, that contain icons, at least)
if(EXISTS ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/CGAL.qrc) if(EXISTS ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/CGAL.qrc)
qt5_add_resources (_CGAL_Qt5_RESOURCE_FILES_private qt5_add_resources (_CGAL_Qt5_RESOURCE_FILES_private

View File

@ -23,11 +23,6 @@
# If set, the `LEDA` library will be searched and used to provide # If set, the `LEDA` library will be searched and used to provide
# the exact number types used by CGAL kernels. # the exact number types used by CGAL kernels.
# #
# .. variable:: CGAL_HEADER_ONLY
#
# Set this variable if you are using the CGAL libraries as
# header-only libraries.
#
if(CGAL_SetupCGALDependencies_included) if(CGAL_SetupCGALDependencies_included)
return() return()
endif() endif()
@ -72,56 +67,47 @@ endif()
# #
# Link the target with the dependencies of CGAL:: # Link the target with the dependencies of CGAL::
# #
# CGAL_setup_CGAL_dependencies( target [INTERFACE] ) # CGAL_setup_CGAL_dependencies( target )
# #
# If the option ``INTERFACE`` is passed, the dependencies are # The dependencies are
# added using :command:`target_link_libraries` with the ``INTERFACE`` # added using :command:`target_link_libraries` with the ``INTERFACE``
# keyword, or ``PUBLIC`` otherwise. # keyword.
# #
function(CGAL_setup_CGAL_dependencies target) function(CGAL_setup_CGAL_dependencies target)
if(ARGV1 STREQUAL INTERFACE)
set(keyword INTERFACE)
else()
set(keyword PUBLIC)
endif()
if(CGAL_DISABLE_GMP) if(CGAL_DISABLE_GMP)
target_compile_definitions(${target} ${keyword} CGAL_DISABLE_GMP=1) target_compile_definitions(${target} INTERFACE CGAL_DISABLE_GMP=1)
else() else()
use_CGAL_GMP_support(${target} ${keyword}) use_CGAL_GMP_support(${target} INTERFACE)
set(CGAL_USE_GMP TRUE CACHE INTERNAL "CGAL library is configured to use GMP") set(CGAL_USE_GMP TRUE CACHE INTERNAL "CGAL library is configured to use GMP")
set(CGAL_USE_MPFR TRUE CACHE INTERNAL "CGAL library is configured to use MPFR") set(CGAL_USE_MPFR TRUE CACHE INTERNAL "CGAL library is configured to use MPFR")
endif() endif()
if(WITH_LEDA) if(WITH_LEDA)
use_CGAL_LEDA_support(${target} ${keyword}) use_CGAL_LEDA_support(${target} INTERFACE)
endif()
if (NOT CGAL_HEADER_ONLY)
target_compile_definitions(${target} ${keyword} CGAL_NOT_HEADER_ONLY=1)
endif() endif()
if (RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) if (RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
target_compile_definitions(${target} ${keyword} CGAL_TEST_SUITE=1) target_compile_definitions(${target} INTERFACE CGAL_TEST_SUITE=1)
endif() endif()
# CGAL now requires C++14. `decltype(auto)` is used as a marker of # CGAL now requires C++14. `decltype(auto)` is used as a marker of
# C++14. # C++14.
target_compile_features(${target} ${keyword} cxx_decltype_auto) target_compile_features(${target} INTERFACE cxx_decltype_auto)
use_CGAL_Boost_support(${target} ${keyword}) use_CGAL_Boost_support(${target} INTERFACE)
foreach(dir ${CGAL_INCLUDE_DIRS}) foreach(dir ${CGAL_INCLUDE_DIRS})
target_include_directories(${target} ${keyword} target_include_directories(${target} INTERFACE
$<BUILD_INTERFACE:${dir}>) $<BUILD_INTERFACE:${dir}>)
endforeach() endforeach()
target_include_directories(${target} ${keyword} target_include_directories(${target} INTERFACE
$<INSTALL_INTERFACE:include>) $<INSTALL_INTERFACE:include>)
# Now setup compilation flags # Now setup compilation flags
if(MSVC) if(MSVC)
target_compile_options(${target} ${keyword} target_compile_options(${target} INTERFACE
"-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS") "-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS")
if(CMAKE_VERSION VERSION_LESS 3.11) if(CMAKE_VERSION VERSION_LESS 3.11)
target_compile_options(${target} ${keyword} target_compile_options(${target} INTERFACE
/fp:strict /fp:strict
/fp:except- /fp:except-
/wd4503 # Suppress warnings C4503 about "decorated name length exceeded" /wd4503 # Suppress warnings C4503 about "decorated name length exceeded"
@ -129,7 +115,7 @@ function(CGAL_setup_CGAL_dependencies target)
) )
else() else()
# The MSVC generator supports `$<COMPILE_LANGUAGE: >` since CMake 3.11. # The MSVC generator supports `$<COMPILE_LANGUAGE: >` since CMake 3.11.
target_compile_options(${target} ${keyword} target_compile_options(${target} INTERFACE
$<$<COMPILE_LANGUAGE:CXX>:/fp:strict> $<$<COMPILE_LANGUAGE:CXX>:/fp:strict>
$<$<COMPILE_LANGUAGE:CXX>:/fp:except-> $<$<COMPILE_LANGUAGE:CXX>:/fp:except->
$<$<COMPILE_LANGUAGE:CXX>:/wd4503> # Suppress warnings C4503 about "decorated name length exceeded" $<$<COMPILE_LANGUAGE:CXX>:/wd4503> # Suppress warnings C4503 about "decorated name length exceeded"
@ -140,39 +126,39 @@ function(CGAL_setup_CGAL_dependencies target)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.3) if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.3)
message(STATUS "Apple Clang version ${CMAKE_CXX_COMPILER_VERSION} compiler detected") message(STATUS "Apple Clang version ${CMAKE_CXX_COMPILER_VERSION} compiler detected")
message(STATUS "Boost MP is turned off for all Apple Clang versions below 11.0.3!") message(STATUS "Boost MP is turned off for all Apple Clang versions below 11.0.3!")
target_compile_options(${target} ${keyword} "-DCGAL_DO_NOT_USE_BOOST_MP") target_compile_options(${target} INTERFACE "-DCGAL_DO_NOT_USE_BOOST_MP")
endif() endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) message( STATUS "Using Intel Compiler. Adding -fp-model strict" )
if(WIN32) if(WIN32)
target_compile_options(${target} ${keyword} "/fp:strict") target_compile_options(${target} INTERFACE "/fp:strict")
else() else()
target_compile_options(${target} ${keyword} "-fp-model" "strict") target_compile_options(${target} INTERFACE "-fp-model" "strict")
endif() endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
message( STATUS "Using SunPro compiler, using STLPort 4." ) message( STATUS "Using SunPro compiler, using STLPort 4." )
target_compile_options(${target} ${keyword} target_compile_options(${target} INTERFACE
"-features=extensions;-library=stlport4;-D_GNU_SOURCE") "-features=extensions;-library=stlport4;-D_GNU_SOURCE")
target_link_libraries(${target} ${keyword} "-library=stlport4") target_link_libraries(${target} INTERFACE "-library=stlport4")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if ( RUNNING_CGAL_AUTO_TEST ) if ( RUNNING_CGAL_AUTO_TEST )
target_compile_options(${target} ${keyword} "-Wall") target_compile_options(${target} INTERFACE "-Wall")
endif() endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3)
message( STATUS "Using gcc version 4 or later. Adding -frounding-math" ) message( STATUS "Using gcc version 4 or later. Adding -frounding-math" )
if(CMAKE_VERSION VERSION_LESS 3.3) if(CMAKE_VERSION VERSION_LESS 3.3)
target_compile_options(${target} ${keyword} "-frounding-math") target_compile_options(${target} INTERFACE "-frounding-math")
else() else()
target_compile_options(${target} ${keyword} "$<$<COMPILE_LANGUAGE:CXX>:-frounding-math>") target_compile_options(${target} INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:-frounding-math>")
endif() endif()
endif() endif()
if ( "${GCC_VERSION}" MATCHES "^4.2" ) if ( "${GCC_VERSION}" MATCHES "^4.2" )
message( STATUS "Using gcc version 4.2. Adding -fno-strict-aliasing" ) message( STATUS "Using gcc version 4.2. Adding -fno-strict-aliasing" )
target_compile_options(${target} ${keyword} "-fno-strict-aliasing" ) target_compile_options(${target} INTERFACE "-fno-strict-aliasing" )
endif() endif()
if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha" ) if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha" )
message( STATUS "Using gcc on alpha. Adding -mieee -mfp-rounding-mode=d" ) message( STATUS "Using gcc on alpha. Adding -mieee -mfp-rounding-mode=d" )
target_compile_options(${target} ${keyword} "-mieee" "-mfp-rounding-mode=d" ) target_compile_options(${target} INTERFACE "-mieee" "-mfp-rounding-mode=d" )
endif() endif()
endif() endif()
endfunction() endfunction()

View File

@ -46,22 +46,16 @@ endif()
# #
# Link the target with the dependencies of `CGAL_Core`:: # Link the target with the dependencies of `CGAL_Core`::
# #
# CGAL_setup_CGAL_Core_dependencies( target [INTERFACE] ) # CGAL_setup_CGAL_Core_dependencies( target)
# #
# If the option ``INTERFACE`` is passed, the dependencies are # The dependencies are
# added using :command:`target_link_libraries` with the ``INTERFACE`` # added using :command:`target_link_libraries` with the ``INTERFACE``
# keyword, or ``PUBLIC`` otherwise. # keyword.
# #
function(CGAL_setup_CGAL_Core_dependencies target) function(CGAL_setup_CGAL_Core_dependencies target)
if(ARGV1 STREQUAL INTERFACE) use_CGAL_GMP_support(CGAL_Core INTERFACE)
set(keyword INTERFACE) target_compile_definitions(${target} INTERFACE CGAL_USE_CORE=1)
else() target_link_libraries( CGAL_Core INTERFACE CGAL::CGAL )
set(keyword PUBLIC)
endif()
use_CGAL_GMP_support(CGAL_Core ${keyword})
target_compile_definitions(${target} ${keyword} CGAL_USE_CORE=1)
target_link_libraries( CGAL_Core ${keyword} CGAL::CGAL )
endfunction() endfunction()

View File

@ -51,22 +51,14 @@ set(CGAL_ImageIO_FOUND TRUE)
set_property(GLOBAL PROPERTY CGAL_ImageIO_FOUND TRUE) set_property(GLOBAL PROPERTY CGAL_ImageIO_FOUND TRUE)
function(CGAL_setup_CGAL_ImageIO_dependencies target) function(CGAL_setup_CGAL_ImageIO_dependencies target)
if(ARGV1 STREQUAL INTERFACE)
set(keyword INTERFACE)
else()
set(keyword PUBLIC)
endif()
target_link_libraries( CGAL_ImageIO ${keyword} CGAL::CGAL) target_link_libraries( CGAL_ImageIO INTERFACE CGAL::CGAL)
if(ZLIB_FOUND) if(ZLIB_FOUND)
target_include_directories( CGAL_ImageIO SYSTEM ${keyword} ${ZLIB_INCLUDE_DIRS}) target_include_directories( CGAL_ImageIO SYSTEM INTERFACE ${ZLIB_INCLUDE_DIRS})
target_link_libraries( CGAL_ImageIO ${keyword} ${ZLIB_LIBRARIES}) target_link_libraries( CGAL_ImageIO INTERFACE ${ZLIB_LIBRARIES})
target_compile_definitions( CGAL_ImageIO ${keyword} CGAL_USE_ZLIB=1) target_compile_definitions( CGAL_ImageIO INTERFACE CGAL_USE_ZLIB=1)
if(NOT ARGV1 STREQUAL INTERFACE)
set_target_properties(CGAL_ImageIO PROPERTIES CGAL_TARGET_USES_ZLIB TRUE)
endif()
else() else()
message( STATUS "NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.") message( STATUS "NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.")
endif() endif()

View File

@ -54,9 +54,9 @@ if(NOT CGAL_Qt5_MISSING_DEPS)
include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Qt5_moc_and_resource_files.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Qt5_moc_and_resource_files.cmake)
if(CGAL_HEADER_ONLY AND (WITH_demos OR WITH_examples OR WITH_tests OR NOT CGAL_BUILDING_LIBS) AND NOT TARGET CGAL_Qt5_moc_and_resources) if(NOT TARGET CGAL_Qt5_moc_and_resources)
add_library(CGAL_Qt5_moc_and_resources STATIC add_library(CGAL_Qt5_moc_and_resources STATIC
${_CGAL_Qt5_MOC_FILES_private} ${_CGAL_Qt5_MOC_FILES_private}
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsItem.h ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsItem.h
@ -99,33 +99,26 @@ endif()
# #
# Link the target with the dependencies of `CGAL_Qt5`:: # Link the target with the dependencies of `CGAL_Qt5`::
# #
# CGAL_setup_CGAL_Qt5_dependencies( target [INTERFACE] ) # CGAL_setup_CGAL_Qt5_dependencies( target )
# #
# If the option ``INTERFACE`` is passed, the dependencies are # The dependencies are
# added using :command:`target_link_libraries` with the ``INTERFACE`` # added using :command:`target_link_libraries` with the ``INTERFACE``
# keyword, or ``PUBLIC`` otherwise. # keyword.
# #
function(CGAL_setup_CGAL_Qt5_dependencies target) function(CGAL_setup_CGAL_Qt5_dependencies target)
if(ARGV1 STREQUAL INTERFACE)
set(keyword INTERFACE)
else()
set(keyword PUBLIC)
endif()
if($ENV{CGAL_FAKE_PUBLIC_RELEASE}) if($ENV{CGAL_FAKE_PUBLIC_RELEASE})
target_compile_definitions( ${target} ${keyword} CGAL_FAKE_PUBLIC_RELEASE=1 ) target_compile_definitions( ${target} INTERFACE CGAL_FAKE_PUBLIC_RELEASE=1 )
endif() endif()
target_link_libraries( ${target} ${keyword} CGAL::CGAL) target_link_libraries( ${target} INTERFACE CGAL::CGAL)
if(CGAL_HEADER_ONLY) target_link_libraries( ${target} INTERFACE CGAL::Qt5_moc_and_resources)
target_link_libraries( ${target} ${keyword} CGAL::Qt5_moc_and_resources) target_link_libraries( ${target} INTERFACE Qt5::OpenGL Qt5::Svg Qt5::Xml)
endif()
target_link_libraries( ${target} ${keyword} Qt5::OpenGL Qt5::Svg Qt5::Xml)
# Remove -Wdeprecated-copy, for g++ >= 9.0, because Qt5, as of # Remove -Wdeprecated-copy, for g++ >= 9.0, because Qt5, as of
# version 5.12, has a lot of [-Wdeprecated-copy] warnings. # version 5.12, has a lot of [-Wdeprecated-copy] warnings.
if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9" ) AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9" )
target_compile_options( ${target} ${keyword} "-Wno-deprecated-copy" "-Wno-cast-function-type" ) target_compile_options( ${target} INTERFACE "-Wno-deprecated-copy" "-Wno-cast-function-type" )
endif() endif()
endfunction() endfunction()

View File

@ -1,77 +1,5 @@
include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake)
message ( STATUS "External libraries supported: ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}")
foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES})
# Part 1: Try to find lib
set (vlib "${CGAL_EXT_LIB_${lib}_PREFIX}")
# Check whether lib is essential or WITH_<lib> is given:
list(FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION)
if ("${POSITION}" STRGREATER "-1" OR WITH_${lib})
# In both cases CGAL_USE_<lib> will be finally set.
#message (STATUS "With ${lib} given or essential: pos=${POSITION}")
if ( CGAL_ENABLE_PRECONFIG )
message (STATUS "Preconfiguring library: ${lib} ...")
else()
message (STATUS "Configuring library: ${lib} ...")
endif()
find_package( ${lib} )
if ( ${vlib}_FOUND )
if ( CGAL_ENABLE_PRECONFIG )
message( STATUS "${lib} has been preconfigured:")
message( STATUS " Use${lib}-file: ${${vlib}_USE_FILE}")
message( STATUS " ${lib} include: ${${vlib}_INCLUDE_DIR}" )
message( STATUS " ${lib} libraries: ${${vlib}_LIBRARIES}" )
message( STATUS " ${lib} definitions: ${${vlib}_DEFINITIONS}" )
else()
message( STATUS "${lib} has been configured")
use_lib( ${vlib} ${${vlib}_USE_FILE})
endif()
# TODO EBEB what about Qt5, zlib etc?
set ( CGAL_USE_${vlib} TRUE )
# Part 2: Add some lib-specific definitions or obtain version
if (${lib} STREQUAL "GMP")
get_dependency_version(GMP)
endif()
if (${lib} STREQUAL "MPFR")
set( MPFR_DEPENDENCY_INCLUDE_DIR ${GMP_INCLUDE_DIR} )
set( MPFR_DEPENDENCY_LIBRARIES ${GMP_LIBRARIES} )
get_dependency_version(MPFR)
endif()
if (${lib} STREQUAL "LEDA")
# special case for LEDA - add a flag
message( STATUS "LEDA cxx flags: ${LEDA_CXX_FLAGS}" )
uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} )
endif()
else()
if ("${POSITION}" STRGREATER "-1") # if lib is essential
message( FATAL_ERROR "CGAL requires ${lib} to be found" )
endif()
endif()
endif()
endforeach()
if( (GMP_FOUND AND NOT MPFR_FOUND) OR (NOT GMP_FOUND AND MPFR_FOUND) ) if( (GMP_FOUND AND NOT MPFR_FOUND) OR (NOT GMP_FOUND AND MPFR_FOUND) )
message( FATAL_ERROR "CGAL needs for its full functionality both GMP and MPFR.") message( FATAL_ERROR "CGAL needs for its full functionality both GMP and MPFR.")
endif() endif()

View File

@ -6,12 +6,12 @@ if ( NOT CGAL_SETUP_FLAGS_INCLUDED )
# override the flags used to build the libraries # override the flags used to build the libraries
# #
set( CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION set( CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION
"Set this to TRUE if you want to define or modify any of CMAKE_*_FLAGS. When this is FALSE, all the CMAKE_*_FLAGS flags are overriden with the values used when building the CGAL libs. For CGAL_*_flags (used for ADDITIONAL flags) , there is no need to set this to TRUE." "Set this to TRUE if you want to define or modify any of CMAKE_*_FLAGS. When this is FALSE, all the CMAKE_*_FLAGS flags are overriden with the values used when building the CGAL libs. For CGAL_*_flags (used for ADDITIONAL flags) , there is no need to set this to TRUE."
) )
option( CGAL_DONT_OVERRIDE_CMAKE_FLAGS option( CGAL_DONT_OVERRIDE_CMAKE_FLAGS
${CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION} ${CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION}
FALSE FALSE
) )
if ( CGAL_CONFIG_LOADED AND NOT CGAL_DONT_OVERRIDE_CMAKE_FLAGS ) if ( CGAL_CONFIG_LOADED AND NOT CGAL_DONT_OVERRIDE_CMAKE_FLAGS )
@ -19,18 +19,14 @@ if ( CGAL_CONFIG_LOADED AND NOT CGAL_DONT_OVERRIDE_CMAKE_FLAGS )
typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE "${CGAL_BUILD_TYPE_INIT}" ) typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE "${CGAL_BUILD_TYPE_INIT}" )
string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER ) string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER )
if ( CGAL_BUILD_SHARED_LIBS ) set( CGAL_LINKER_FLAGS_TYPE MODULE )
set( CGAL_LINKER_FLAGS_TYPE SHARED )
else()
set( CGAL_LINKER_FLAGS_TYPE MODULE )
endif()
typed_cache_set ( STRING "C++ compiler flags for all build types" CMAKE_CXX_FLAGS "${CGAL_CXX_FLAGS_INIT}" ) typed_cache_set ( STRING "C++ compiler flags for all build types" CMAKE_CXX_FLAGS "${CGAL_CXX_FLAGS_INIT}" )
typed_cache_set ( STRING "C++ compiler flags for ${CGAL_BUILD_TYPE_UPPER}" CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER} "${CGAL_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}_INIT}" ) typed_cache_set ( STRING "C++ compiler flags for ${CGAL_BUILD_TYPE_UPPER}" CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER} "${CGAL_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}_INIT}" )
typed_cache_set ( STRING "Linker flags for all build types" CMAKE_EXE_LINKER_FLAGS "${CGAL_${CGAL_LINKER_FLAGS_TYPE}_LINKER_FLAGS_INIT}" ) typed_cache_set ( STRING "Linker flags for all build types" CMAKE_EXE_LINKER_FLAGS "${CGAL_${CGAL_LINKER_FLAGS_TYPE}_LINKER_FLAGS_INIT}" )
typed_cache_set ( STRING "Linker flags for ${CGAL_BUILD_TYPE_UPPER}" CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER} "${CGAL_${CGAL_LINKER_FLAGS_TYPE}_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}_INIT}" ) typed_cache_set ( STRING "Linker flags for ${CGAL_BUILD_TYPE_UPPER}" CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER} "${CGAL_${CGAL_LINKER_FLAGS_TYPE}_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}_INIT}" )
endif() endif()
typed_cache_set( BOOL ${CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION} CGAL_DONT_OVERRIDE_CMAKE_FLAGS TRUE ) typed_cache_set( BOOL ${CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION} CGAL_DONT_OVERRIDE_CMAKE_FLAGS TRUE )
@ -68,15 +64,7 @@ string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER )
message( STATUS "USING CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) message( STATUS "USING CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
if ( CGAL_BUILDING_LIBS ) message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
if ( BUILD_SHARED_LIBS )
message( STATUS "USING LDFLAGS = '${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
else()
message( STATUS "USING LDFLAGS = '${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
endif()
else()
message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
endif()
endif() endif()

View File

@ -46,34 +46,29 @@ endif()
# keyword, or ``PUBLIC`` otherwise. # keyword, or ``PUBLIC`` otherwise.
function(use_CGAL_GMP_support target) function(use_CGAL_GMP_support target)
if(ARGV1 STREQUAL INTERFACE)
set(keyword INTERFACE)
else()
set(keyword PUBLIC)
endif()
if(NOT GMP_FOUND OR NOT MPFR_FOUND) if(NOT GMP_FOUND OR NOT MPFR_FOUND)
message(FATAL_ERROR "CGAL requires GMP and MPFR.") message(FATAL_ERROR "CGAL requires GMP and MPFR.")
return() return()
endif() endif()
if(NOT GMP_INCLUDE_DIR STREQUAL "${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include") if(NOT GMP_INCLUDE_DIR STREQUAL "${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include")
target_include_directories(${target} SYSTEM ${keyword} ${GMP_INCLUDE_DIR}) target_include_directories(${target} SYSTEM INTERFACE ${GMP_INCLUDE_DIR})
else() else()
target_include_directories(${target} SYSTEM ${keyword} target_include_directories(${target} SYSTEM INTERFACE
$<BUILD_INTERFACE:${GMP_INCLUDE_DIR}> $<BUILD_INTERFACE:${GMP_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>) $<INSTALL_INTERFACE:include>)
endif() endif()
if(NOT MPFR_INCLUDE_DIR STREQUAL "${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include") if(NOT MPFR_INCLUDE_DIR STREQUAL "${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include")
target_include_directories(${target} SYSTEM ${keyword} ${MPFR_INCLUDE_DIR}) target_include_directories(${target} SYSTEM INTERFACE ${MPFR_INCLUDE_DIR})
else() else()
target_include_directories(${target} SYSTEM ${keyword} target_include_directories(${target} SYSTEM INTERFACE
$<BUILD_INTERFACE:${MPFR_INCLUDE_DIR}> $<BUILD_INTERFACE:${MPFR_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>) $<INSTALL_INTERFACE:include>)
endif() endif()
if(WITH_GMPXX OR CGAL_WITH_GMPXX) if(WITH_GMPXX OR CGAL_WITH_GMPXX)
target_include_directories(${target} SYSTEM ${keyword} ${GMPXX_INCLUDE_DIR}) target_include_directories(${target} SYSTEM INTERFACE ${GMPXX_INCLUDE_DIR})
target_link_libraries(${target} ${keyword} ${GMPXX_LIBRARIES}) target_link_libraries(${target} INTERFACE ${GMPXX_LIBRARIES})
target_compile_definitions(${target} ${keyword} CGAL_USE_GMPXX=1) target_compile_definitions(${target} INTERFACE CGAL_USE_GMPXX=1)
endif() endif()
target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES} ${GMP_LIBRARIES}) target_link_libraries(${target} INTERFACE ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
endfunction() endfunction()

View File

@ -32,11 +32,6 @@ find_package(LEDA)
# keyword, or ``PUBLIC`` otherwise. # keyword, or ``PUBLIC`` otherwise.
function(use_CGAL_LEDA_support target) function(use_CGAL_LEDA_support target)
if(ARGV1 STREQUAL INTERFACE)
set(keyword INTERFACE)
else()
set(keyword PUBLIC)
endif()
if(NOT LEDA_FOUND) if(NOT LEDA_FOUND)
message(FATAL_ERROR "use_CGAL_LEDA_support is use whereas LEDA_FOUND is false.") message(FATAL_ERROR "use_CGAL_LEDA_support is use whereas LEDA_FOUND is false.")
return() return()
@ -45,12 +40,12 @@ function(use_CGAL_LEDA_support target)
separate_arguments(LIST_LEDA_DEFINITIONS UNIX_COMMAND "${LEDA_DEFINITIONS} -DCGAL_USE_LEDA") separate_arguments(LIST_LEDA_DEFINITIONS UNIX_COMMAND "${LEDA_DEFINITIONS} -DCGAL_USE_LEDA")
if(CMAKE_VERSION VERSION_LESS 3.3) if(CMAKE_VERSION VERSION_LESS 3.3)
target_compile_options(${target} ${keyword} ${LIST_LEDA_CXX_FLAGS}) target_compile_options(${target} INTERFACE ${LIST_LEDA_CXX_FLAGS})
else() else()
target_compile_options(${target} ${keyword} $<$<COMPILE_LANGUAGE:CXX>:${LIST_LEDA_CXX_FLAGS}>) target_compile_options(${target} INTERFACE $<$<COMPILE_LANGUAGE:CXX>:${LIST_LEDA_CXX_FLAGS}>)
endif() endif()
target_compile_options(${target} ${keyword} ${LIST_LEDA_DEFINITIONS}) target_compile_options(${target} INTERFACE ${LIST_LEDA_DEFINITIONS})
target_include_directories(${target} SYSTEM ${keyword} ${LEDA_INCLUDE_DIR}) target_include_directories(${target} SYSTEM INTERFACE ${LEDA_INCLUDE_DIR})
target_link_libraries(${target} ${keyword} ${LEDA_LIBRARIES} ${LEDA_LINKER_FLAGS}) target_link_libraries(${target} INTERFACE ${LEDA_LIBRARIES} ${LEDA_LINKER_FLAGS})
endfunction() endfunction()

View File

@ -3,7 +3,7 @@
if( MPFI_FOUND AND NOT MPFI_SETUP ) if( MPFI_FOUND AND NOT MPFI_SETUP )
if (GMP_FOUND AND MPFR_FOUND) if (GMP_FOUND AND MPFR_FOUND)
message( STATUS "UseMPFI" ) message( STATUS "UseMPFI" )
message( STATUS "MPFI include: ${MPFI_INCLUDE_DIR}" ) message( STATUS "MPFI include: ${MPFI_INCLUDE_DIR}" )
@ -30,11 +30,7 @@ if( MPFI_FOUND AND NOT MPFI_SETUP )
add_definitions( ${MPFI_DEFINITIONS} "-DCGAL_USE_MPFI" ) add_definitions( ${MPFI_DEFINITIONS} "-DCGAL_USE_MPFI" )
link_libraries( ${MPFI_LIBRARIES} ) link_libraries( ${MPFI_LIBRARIES} )
else( COMPILED_MPFI_TEST AND MPFI_TEST_RESULT EQUAL 0) else( COMPILED_MPFI_TEST AND MPFI_TEST_RESULT EQUAL 0)
if (CGAL_ENABLE_PRECONFIG) message( STATUS "MPFI is incorrectly configured on this system" )
message( STATUS "MPFI is incorrectly configured with CGAL" )
else()
message( STATUS "MPFI is incorrectly configured on this system" )
endif()
message( STATUS message( STATUS
"Output of the failed MPFI test was:\n${MPFI_TEST_COMPILATION_OUTPUT}" ) "Output of the failed MPFI test was:\n${MPFI_TEST_COMPILATION_OUTPUT}" )
message( STATUS "End of the MPFI test output" ) message( STATUS "End of the MPFI test output" )

View File

@ -5,30 +5,10 @@ set(CGAL_add_test_included TRUE)
option(BUILD_TESTING "Build the testing tree." OFF) option(BUILD_TESTING "Build the testing tree." OFF)
if(NOT POLICY CMP0064)
# CMake <= 3.3
if(BUILD_TESTING)
message(WARNING
"CGAL CTest support requires CMake 3.4 or later.\n"
"You must either disable BUILD_TESTING or upgrade CMake.")
endif()
# Add a fake function to avoid CMake errors
function(cgal_add_compilation_test)
endfunction()
# Add a fake function to avoid CMake errors
function(cgal_setup_test_properties)
endfunction()
# Then return, to exit the file
return()
endif()
if(BUILD_TESTING) if(BUILD_TESTING)
enable_testing() enable_testing()
endif() endif()
cmake_policy(SET CMP0064 NEW)
include(CMakeParseArguments) include(CMakeParseArguments)
@ -94,7 +74,7 @@ function(expand_list_with_globbing list_name)
endfunction() endfunction()
function(cgal_add_compilation_test exe_name) function(cgal_add_compilation_test exe_name)
if(NOT POLICY CMP0064 OR TEST compilation_of__${exe_name}) if(TEST compilation_of__${exe_name})
return() return()
endif() endif()
add_test(NAME "compilation_of__${exe_name}" add_test(NAME "compilation_of__${exe_name}"
@ -111,15 +91,11 @@ function(cgal_add_compilation_test exe_name)
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system" --config "$<CONFIG>") COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system" --config "$<CONFIG>")
set_property(TEST "check_build_system" set_property(TEST "check_build_system"
APPEND PROPERTY LABELS "CGAL_build_system") APPEND PROPERTY LABELS "CGAL_build_system")
if(POLICY CMP0066) # cmake 3.7 or later set_property(TEST "check_build_system"
set_property(TEST "check_build_system" PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture")
PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture")
endif()
endif()
if(POLICY CMP0066) # cmake 3.7 or later
set_property(TEST "compilation_of__${exe_name}"
APPEND PROPERTY FIXTURES_REQUIRED "check_build_system_SetupFixture")
endif() endif()
set_property(TEST "compilation_of__${exe_name}"
APPEND PROPERTY FIXTURES_REQUIRED "check_build_system_SetupFixture")
if(TARGET CGAL_Qt5_moc_and_resources) # if CGAL_Qt5 was searched, and is header-only if(TARGET CGAL_Qt5_moc_and_resources) # if CGAL_Qt5 was searched, and is header-only
get_property(linked_libraries TARGET "${exe_name}" PROPERTY LINK_LIBRARIES) get_property(linked_libraries TARGET "${exe_name}" PROPERTY LINK_LIBRARIES)
# message(STATUS "${exe_name} depends on ${linked_libraries}") # message(STATUS "${exe_name} depends on ${linked_libraries}")
@ -167,8 +143,7 @@ function(cgal_setup_test_properties test_name)
get_filename_component(_binary_dir_abs ${CMAKE_CURRENT_BINARY_DIR} ABSOLUTE) get_filename_component(_binary_dir_abs ${CMAKE_CURRENT_BINARY_DIR} ABSOLUTE)
string(FIND "${_binary_dir_abs}" "${_source_dir_abs}" _search_binary_in_source) string(FIND "${_binary_dir_abs}" "${_source_dir_abs}" _search_binary_in_source)
if(_search_binary_in_source EQUAL "-1" if(_search_binary_in_source EQUAL "-1")
AND POLICY CMP0066) # CMake 3.7 or later
if(NOT TEST ${PROJECT_NAME}_SetupFixture) if(NOT TEST ${PROJECT_NAME}_SetupFixture)
if(ANDROID) if(ANDROID)
add_test(NAME ${PROJECT_NAME}_SetupFixture add_test(NAME ${PROJECT_NAME}_SetupFixture
@ -280,7 +255,7 @@ function(cgal_add_test exe_name)
set(test_name "execution___of__${exe_name}") set(test_name "execution___of__${exe_name}")
endif() endif()
# message(" test_name: ${test_name}") # message(" test_name: ${test_name}")
if(cgal_add_test_NO_EXECUTION OR NOT POLICY CMP0064 OR TEST ${test_name}) if(cgal_add_test_NO_EXECUTION OR TEST ${test_name})
return() return()
endif() endif()
# message("Add test ${test_name}") # message("Add test ${test_name}")
@ -323,11 +298,11 @@ function(cgal_add_test exe_name)
set(ARGS) set(ARGS)
# message(STATUS "DEBUG test ${exe_name}") # message(STATUS "DEBUG test ${exe_name}")
foreach(CMD_LINE ${CMD_LINES}) foreach(CMD_LINE ${CMD_LINES})
# message(STATUS " command line: ${CMD_LINE}") # message(STATUS " command line: ${CMD_LINE}")
string(REGEX REPLACE "\#.*" "" CMD_LINE "${CMD_LINE}") string(REGEX REPLACE "\#.*" "" CMD_LINE "${CMD_LINE}")
separate_arguments(CMD_LINE_ARGS UNIX_COMMAND ${CMD_LINE}) separate_arguments(CMD_LINE_ARGS UNIX_COMMAND ${CMD_LINE})
# message(STATUS " args: ${CMD_LINE_ARGS}") # message(STATUS " args: ${CMD_LINE_ARGS}")
list(APPEND ARGS ${CMD_LINE_ARGS}) list(APPEND ARGS ${CMD_LINE_ARGS})
endforeach() endforeach()
expand_list_with_globbing(ARGS) expand_list_with_globbing(ARGS)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

View File

@ -10,12 +10,4 @@ string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER )
message( STATUS "USING CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) message( STATUS "USING CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
if ( CGAL_BUILDING_LIBS ) message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
if ( BUILD_SHARED_LIBS )
message( STATUS "USING LDFLAGS = '${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
else()
message( STATUS "USING LDFLAGS = '${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
endif()
else()
message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
endif()

View File

@ -1,17 +1,11 @@
function(CGAL_setup_target_dependencies target) function(CGAL_setup_target_dependencies target)
if(ARGV1 STREQUAL INTERFACE)
set(keyword INTERFACE)
else()
set(keyword PUBLIC)
endif()
if(${target} STREQUAL CGAL) if(${target} STREQUAL CGAL)
CGAL_setup_CGAL_dependencies(${target} ${keyword}) CGAL_setup_CGAL_dependencies(${target})
elseif(${target} STREQUAL CGAL_Core) elseif(${target} STREQUAL CGAL_Core)
CGAL_setup_CGAL_Core_dependencies(${target} ${keyword}) CGAL_setup_CGAL_Core_dependencies(${target})
elseif(${target} STREQUAL CGAL_ImageIO) elseif(${target} STREQUAL CGAL_ImageIO)
CGAL_setup_CGAL_ImageIO_dependencies(${target} ${keyword}) CGAL_setup_CGAL_ImageIO_dependencies(${target})
elseif(${target} STREQUAL CGAL_Qt5) elseif(${target} STREQUAL CGAL_Qt5)
CGAL_setup_CGAL_Qt5_dependencies(${target} ${keyword}) CGAL_setup_CGAL_Qt5_dependencies(${target})
endif() endif()
endfunction() endfunction()

View File

@ -27,8 +27,6 @@ if(NOT USE_CGAL_FILE_INCLUDED)
use_component( ${component} ) use_component( ${component} )
endforeach() endforeach()
use_essential_libs()
include_directories( "${CMAKE_CURRENT_BINARY_DIR}" ) include_directories( "${CMAKE_CURRENT_BINARY_DIR}" )
if(TARGET CGAL::CGAL) if(TARGET CGAL::CGAL)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.12...3.18)
project(CGAL_DEMOS) project(CGAL_DEMOS)
if(CGAL_BRANCH_BUILD) if(CGAL_BRANCH_BUILD)
@ -17,10 +17,8 @@ endif()
list(SORT list) list(SORT list)
if(NOT CGAL_BUILDING_LIBS) find_package(CGAL REQUIRED)
find_package(CGAL REQUIRED) include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
endif()
message("== Generating build files for demos ==") message("== Generating build files for demos ==")
foreach(entry ${list}) foreach(entry ${list})

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.12...3.18)
project(CGAL_EXAMPLES) project(CGAL_EXAMPLES)
if(CGAL_BRANCH_BUILD) if(CGAL_BRANCH_BUILD)
@ -17,10 +17,8 @@ endif()
list(SORT list) list(SORT list)
if(NOT CGAL_BUILDING_LIBS) find_package(CGAL REQUIRED)
find_package(CGAL REQUIRED) include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
endif()
message("== Generating build files for examples ==") message("== Generating build files for examples ==")
foreach(entry ${list}) foreach(entry ${list})

View File

@ -9,8 +9,6 @@ set(CGAL_LIBRARIES CGAL)
get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(CGAL_HEADER_ONLY TRUE)
function(cgal_detect_branch_build VAR_NAME) function(cgal_detect_branch_build VAR_NAME)
if(IS_DIRECTORY ${CGAL_CONFIG_DIR}/../../../../Installation/package_info/Installation/) if(IS_DIRECTORY ${CGAL_CONFIG_DIR}/../../../../Installation/package_info/Installation/)
set(${VAR_NAME} TRUE PARENT_SCOPE) set(${VAR_NAME} TRUE PARENT_SCOPE)
@ -35,10 +33,10 @@ if(BRANCH_BUILD)
foreach(package_dir ${packages_dirs}) foreach(package_dir ${packages_dirs})
set(inc_dir ${package_dir}/include) set(inc_dir ${package_dir}/include)
if(IS_DIRECTORY ${inc_dir} if(IS_DIRECTORY ${inc_dir}
AND IS_DIRECTORY ${package_dir}/package_info) AND IS_DIRECTORY ${package_dir}/package_info)
list(APPEND CGAL_INCLUDE_DIRS ${inc_dir}) list(APPEND CGAL_INCLUDE_DIRS ${inc_dir})
if(EXISTS ${inc_dir}/CGAL/config.h) if(EXISTS ${inc_dir}/CGAL/config.h)
set(CGAL_FOUND TRUE) set(CGAL_FOUND TRUE)
endif() endif()
endif() endif()
endforeach() endforeach()
@ -81,21 +79,15 @@ include(${CGAL_MODULES_DIR}/CGAL_TweakFindBoost.cmake)
set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake)
if(CGAL_BUILDING_LIBS)
foreach(comp ${CGAL_FIND_COMPONENTS})
if(CGAL_${comp}_FOUND)
list(APPEND CGAL_LIBRARIES CGAL_${comp})
endif()
endforeach()
return()
endif()
foreach(comp ${CGAL_FIND_COMPONENTS}) foreach(comp ${CGAL_FIND_COMPONENTS})
if(NOT comp MATCHES "Core|ImageIO|Qt5") if(NOT comp MATCHES "Core|ImageIO|Qt5")
message(FATAL_ERROR "The requested CGAL component ${comp} does not exist!") message(FATAL_ERROR "The requested CGAL component ${comp} does not exist!")
endif() endif()
list(APPEND CGAL_LIBRARIES CGAL_${comp}) if(comp MATCHES "Core" AND CGAL_DISABLE_GMP)
message("CGAL_Core needs GMP and won't be used.")
else()
list(APPEND CGAL_LIBRARIES CGAL_${comp})
endif()
endforeach() endforeach()
set(CGALConfig_all_targets_are_defined TRUE) set(CGALConfig_all_targets_are_defined TRUE)
@ -138,15 +130,11 @@ include(CGAL_setup_target_dependencies)
foreach(cgal_lib ${CGAL_LIBRARIES}) foreach(cgal_lib ${CGAL_LIBRARIES})
set(WITH_${cgal_lib} TRUE) set(WITH_${cgal_lib} TRUE)
if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib}) if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib})
if(CGAL_BUILDING_LIBS OR CMAKE_VERSION VERSION_LESS "3.11") add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL)
add_library(${cgal_lib} INTERFACE)
else()
add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL)
endif()
if(NOT TARGET CGAL::${cgal_lib}) if(NOT TARGET CGAL::${cgal_lib})
add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib}) add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib})
endif() endif()
CGAL_setup_target_dependencies(${cgal_lib} INTERFACE) CGAL_setup_target_dependencies(${cgal_lib})
endif() endif()
endforeach() endforeach()

View File

@ -1,27 +0,0 @@
message("Configuring libCGAL")
collect_cgal_library(CGAL "")
include(CGAL_SetupCGALDependencies)
if(CGAL_HEADER_ONLY)
set(keyword "INTERFACE")
endif()
cgal_setup_cgal_dependencies(CGAL ${keyword})
if(NOT CGAL_HEADER_ONLY)
target_compile_definitions(CGAL INTERFACE CGAL_NOT_HEADER_ONLY=1)
endif()
if(NOT CGAL_DISABLE_GMP)
get_dependency_version(GMP)
get_dependency_version(MPFR)
endif()
message(
STATUS
"USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'"
)
message("libCGAL is configured")

View File

@ -1,68 +0,0 @@
# if defined(UNDER_CE)
# include <winbase.h>
# else
# include <winver.h>
# endif
// The following is set by CMake
#cmakedefine CGAL_BRANCH_BUILD
// The values of the following variable are filled by CMake
#define CGAL_LIB_NAME @LIBRARY_NAME@
#define CGAL_VERSION_MAJOR @CGAL_MAJOR_VERSION@
#define CGAL_VERSION_MINOR @CGAL_MINOR_VERSION@
#define CGAL_VERSION_PATCH @CGAL_BUGFIX_VERSION@
#define CGAL_VERSION_BUILD @CGAL_BUILD_VERSION@
#ifdef _DEBUG
# define CGAL_LIB_FULLNAME "@DEBUG_MANGLED_NAME@.dll"
#else
# define CGAL_LIB_FULLNAME "@RELEASE_MANGLED_NAME@.dll"
#endif
#define CGAL_VER_EMPTY_STR "\0"
#define CGAL_VER_xxstr(s) #s
#define CGAL_VER_xstr(s) CGAL_VER_xxstr(s) CGAL_VER_EMPTY_STR
#define CGAL_VER_str(s) CGAL_VER_xstr(s)
#define CGAL_VER_VERSION CGAL_VERSION_MAJOR,CGAL_VERSION_MINOR,CGAL_VERSION_PATCH,CGAL_VERSION_BUILD
#define CGAL_VER_VERSION_STR CGAL_VER_str(CGAL_VERSION_MAJOR) "." CGAL_VER_str(CGAL_VERSION_MINOR) "." CGAL_VER_str(CGAL_VERSION_PATCH) "." CGAL_VER_str(CGAL_VERSION_BUILD)
#define CGAL_VER_COMPANYNAME_STR "The CGAL Project, https://www.cgal.org/\0"
#define CGAL_VER_FILEDESCRIPTION_STR "@LIBRARY_NAME@ Library\0"
#define CGAL_VER_FILEVERSION_STR CGAL_VER_VERSION_STR
#define CGAL_VER_ORIGINALFILENAME_STR CGAL_LIB_FULLNAME CGAL_VER_EMPTY_STR
#define CGAL_VER_PRODUCTNAME_STR "CGAL\0"
#define CGAL_VER_PRODUCTVERSION_STR CGAL_VER_VERSION_STR
VS_VERSION_INFO VERSIONINFO
FILEVERSION CGAL_VER_VERSION
PRODUCTVERSION CGAL_VER_VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", CGAL_VER_COMPANYNAME_STR
VALUE "FileDescription", CGAL_VER_FILEDESCRIPTION_STR
VALUE "FileVersion", CGAL_VER_FILEVERSION_STR
VALUE "OriginalFilename", CGAL_VER_ORIGINALFILENAME_STR
VALUE "ProductName", CGAL_VER_PRODUCTNAME_STR
VALUE "ProductVersion", CGAL_VER_PRODUCTVERSION_STR
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
/* End of Version info */

View File

@ -1,276 +0,0 @@
function(collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
if(NOT CGAL_HEADER_ONLY)
# IMPORTANT: First delete all_files.cpp
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp)
endif()
# THEN collect *.cpp
foreach(package ${CGAL_CONFIGURED_PACKAGES})
file(GLOB CGAL_LIBRARY_SOURCE_FILES_TMP
${package}/src/${LIBRARY_NAME}/*.cpp)
list(SORT CGAL_LIBRARY_SOURCE_FILES_TMP)
foreach(file ${CGAL_LIBRARY_SOURCE_FILES_TMP})
if(NOT ${file} MATCHES "/qrc_.*")
list(APPEND CGAL_LIBRARY_SOURCE_FILES ${file})
endif()
endforeach()
endforeach()
foreach(source ${CGAL_LIBRARY_SOURCE_FILES})
# It may happen that a file all_files.cpp had been created in-source by
# a previous in-source build. We certainly do not want to include that
# file in the new all_files.cpp because .cpp files would be included
# twice, and that breaks the one-definition rule (ODR).
if(NOT source MATCHES ".*/all_files.cpp")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp
"\#include \"${source}\"\n")
endif()
endforeach()
endif()
if(CGAL_BUILD_SHARED_LIBS)
set(CGAL_LIB_PREFIX "")
else()
set(CGAL_LIB_PREFIX "lib")
endif()
set(RELEASE_MANGLED_NAME
"${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-${CGAL_FULL_VERSION}"
)
set(DEBUG_MANGLED_NAME
"${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-gd-${CGAL_FULL_VERSION}"
)
if(CGAL_BUILD_SHARED_LIBS AND WIN32)
configure_file(${CGAL_INSTALLATION_PACKAGE_DIR}/src/CGAL_libs_verinfo.rc.in
${LIBRARY_NAME}_verinfo.rc @ONLY)
set(rc_file ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_verinfo.rc)
else()
set(rc_file)
endif()
if(NOT CGAL_HEADER_ONLY)
add_library(${LIBRARY_NAME} ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp
${rc_file} ${ADDITIONAL_FILES})
# add_library (${LIBRARY_NAME} ${CGAL_LIBRARY_SOURCE_FILES} ${rc_file} ${ADDITIONAL_FILES}) # builing not creating temporary all_files.cpp
if(${LIBRARY_NAME}_SOVERSION AND ${LIBRARY_NAME}_SONAME_VERSION)
set_target_properties(
${LIBRARY_NAME}
PROPERTIES VERSION "${${LIBRARY_NAME}_SOVERSION}"
SOVERSION "${${LIBRARY_NAME}_SONAME_VERSION}")
elseif(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
set_target_properties(
${LIBRARY_NAME} PROPERTIES VERSION "${CGAL_SOVERSION}"
SOVERSION "${CGAL_SONAME_VERSION}")
endif()
else()
if(${LIBRARY_NAME}_LIB_DEPENDS)
# Fix a bug when CGAL is configured first without `CGAL_HEADER_ONLY`
# and then `CGAL_HEADER_ONLY` is set without cleaning the cache.
unset(${LIBRARY_NAME}_LIB_DEPENDS CACHE)
endif()
add_library(${LIBRARY_NAME} INTERFACE)
endif()
# Add an alias with the prefix `CGAL::`, so that consumer
# CMakeLists.txt can be the target like if it was an imported
# target.
add_library(CGAL::${LIBRARY_NAME} ALIAS ${LIBRARY_NAME})
if(NOT TARGET ALL_CGAL_TARGETS)
add_custom_target(ALL_CGAL_TARGETS)
endif()
add_dependencies(ALL_CGAL_TARGETS ${LIBRARY_NAME})
if(CGAL_AUTO_LINK_ENABLED)
if(NOT CGAL_HEADER_ONLY)
set_target_properties(
${LIBRARY_NAME}
PROPERTIES OUTPUT_NAME_DEBUG "${DEBUG_MANGLED_NAME}"
OUTPUT_NAME_RELEASE "${RELEASE_MANGLED_NAME}"
OUTPUT_NAME_MINSIZEREL "${RELEASE_MANGLED_NAME}"
OUTPUT_NAME_RELWITHDEBINFO "${RELEASE_MANGLED_NAME}")
if(HAS_CFG_INTDIR)
add_custom_command(
TARGET ${LIBRARY_NAME}
POST_BUILD
COMMAND if exist \"$(TargetDir)$(TargetName).dll\" copy /Y
\"$(TargetDir)$(TargetName).dll\" \"$(TargetDir)..\")
add_custom_command(
TARGET ${LIBRARY_NAME}
POST_BUILD
COMMAND if exist \"$(TargetDir)$(TargetName).pdb\" copy /Y
\"$(TargetDir)$(TargetName).pdb\" \"$(TargetDir)..\")
add_custom_command(
TARGET ${LIBRARY_NAME}
POST_BUILD
COMMAND
if exist
\"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" copy
/Y \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\"
\"$(SolutionDir)lib\")
endif()
endif()
endif()
if(NOT CGAL_HEADER_ONLY)
install(
TARGETS ${LIBRARY_NAME}
EXPORT ${LIBRARY_NAME}Exports
RUNTIME DESTINATION "${CGAL_INSTALL_BIN_DIR}"
LIBRARY DESTINATION "${CGAL_INSTALL_LIB_DIR}"
ARCHIVE DESTINATION "${CGAL_INSTALL_LIB_DIR}")
install(
EXPORT ${LIBRARY_NAME}Exports
DESTINATION "${CGAL_INSTALL_CMAKE_DIR}"
NAMESPACE CGAL::)
# We have to call configure_file twice to force double expansion of variables.
configure_file("${CGAL_MODULES_DIR}/CGALLibConfig.cmake.in"
"${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY)
configure_file("${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake"
"${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake"
DESTINATION ${CGAL_INSTALL_CMAKE_DIR})
endif()
endfunction()
function(configure_component DIR COMPONENT)
set(enabled_by_default ON)
option(WITH_${COMPONENT} "Enable CGAL component ${COMPONENT}"
${enabled_by_default})
if(WITH_${COMPONENT})
add_subdirectory(${DIR} ${COMPONENT})
endif()
endfunction()
# Output directory of libraries (.so, .dylib, non-static .lib)
set(CGAL_LIBRARIES_DIR ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CGAL_LIBRARIES_DIR})
# Output directory of static libraries (.a, static .lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CGAL_LIBRARIES_DIR})
# For output directory of DLLs (.dll files)
set(CGAL_RUNTIME_DIR ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CGAL_RUNTIME_DIR})
## Prevent use of intermediate directory with MSVC, because we use name
## mangling
#foreach(Conf_type ${CMAKE_CONFIGURATION_TYPES})
# # Conf_type is Debug, Release, DebWithDebInfo...
# string(TOUPPER ${Conf_type} CONF_TYPE)
# # CONF_TYPE is DEBUG, RELEASE, DEBWITHDEBINFO
# set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
#endforeach()
# TODO: Seems useless, because it is called again in ../CMakeLists.txt
# Should probably be removed. -- Laurent Rineau, 2014/07/22
if(NOT CGAL_HEADER_ONLY)
create_cgalconfig_files()
endif()
set(CGAL_DIR ${CMAKE_BINARY_DIR})
add_subdirectory(CGAL)
# search libs
set(CGAL_CONFIGURED_LIBRARIES "")
foreach(package ${CGAL_CONFIGURED_PACKAGES})
file(GLOB CONFIGURED_LIBS_IN_PACKAGE ${package}/src/CGAL_*/CMakeLists.txt)
list(SORT CONFIGURED_LIBS_IN_PACKAGE)
foreach(libconfigfile ${CONFIGURED_LIBS_IN_PACKAGE})
get_filename_component(CGAL_CONFIGURED_LIBRARY_NAME ${libconfigfile} PATH)
get_filename_component(CGAL_CONFIGURED_LIBRARY_NAME
${CGAL_CONFIGURED_LIBRARY_NAME} NAME)
if(NOT ${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL")
message(
STATUS
"Sources for CGAL component library '${CGAL_CONFIGURED_LIBRARY_NAME}' detected"
)
list(APPEND CGAL_CONFIGURED_LIBRARIES ${CGAL_CONFIGURED_LIBRARY_NAME})
#message(STATUS "Library config detected: ${CGAL_CONFIGURED_LIBRARIES}")
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_LIBRARY "")
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS "")
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS "")
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES "")
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS "")
if(${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL_Core")
if(NOT CGAL_NO_CORE)
configure_component(${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME}
${CGAL_CONFIGURED_LIBRARY_NAME})
else(NOT CGAL_NO_CORE)
message(
STATUS
"CGAL_Core is not being configured (missing GMP, or 64bit architecture)."
)
endif(NOT CGAL_NO_CORE)
else()
configure_component(${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME}
${CGAL_CONFIGURED_LIBRARY_NAME})
endif()
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_LIBRARY)
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS)
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS)
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES)
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS)
else()
list(APPEND CGAL_CONFIGURED_LIBRARIES CGAL)
endif()
endforeach()
endforeach()
if(NOT CGAL_CONFIGURED_LIBRARIES)
message(
FATAL_ERROR
"No component library in configured packages found. Please fix package-file."
)
endif()
list(REMOVE_DUPLICATES CGAL_CONFIGURED_LIBRARIES)
list(SORT CGAL_CONFIGURED_LIBRARIES)
cache_set(CGAL_CONFIGURED_LIBRARIES "${CGAL_CONFIGURED_LIBRARIES}")
# CGAL_CONFIGURED_LIBRARIES is a virtually useless variable, because
# we do not know if those components actually created a target. It
# might seem bad that we hardcode the target names here, but they have
# always been hardcoded in the CGALConfig files, so we do not make it
# any worse. We can also not use export(EXPORT) since that is only
# available in newer CMake versions.
set(CGAL_ACTUAL_CONFIGURED_LIBRARIES "")
macro(CGAL_add_if_target TARGET)
if(TARGET ${TARGET})
list(APPEND CGAL_ACTUAL_CONFIGURED_LIBRARIES ${TARGET})
endif()
endmacro()
cgal_add_if_target(CGAL)
cgal_add_if_target(CGAL_Core)
cgal_add_if_target(CGAL_ImageIO)
cgal_add_if_target(CGAL_Qt5)
cache_set(CGAL_ACTUAL_CONFIGURED_LIBRARIES
"${CGAL_ACTUAL_CONFIGURED_LIBRARIES}")
if(NOT CGAL_HEADER_ONLY)
export(
TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES}
NAMESPACE CGAL::
FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake")
endif()
message(
STATUS
"Sources for CGAL component libraries '${CGAL_CONFIGURED_LIBRARIES}' detected"
)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.12...3.18)
project(CGAL_TESTS) project(CGAL_TESTS)
if(CGAL_BRANCH_BUILD) if(CGAL_BRANCH_BUILD)
@ -17,10 +17,8 @@ endif()
list(SORT list) list(SORT list)
if(NOT CGAL_BUILDING_LIBS) find_package(CGAL REQUIRED)
find_package(CGAL REQUIRED) include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
endif()
message("== Generating build files for tests ==") message("== Generating build files for tests ==")
foreach(entry ${list}) foreach(entry ${list})

View File

@ -1,7 +1,8 @@
# Created by the script cgal_create_cmake_script # Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application. # This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.11...3.15) cmake_minimum_required(VERSION 3.12...3.18)
project( Installation_Tests ) project( Installation_Tests )
@ -221,7 +222,7 @@ list(APPEND test_config_lst "test_config_file_3")
if(CGAL_Qt5_FOUND) if(CGAL_Qt5_FOUND)
#configure cgal for a non standard install with qt5 #configure cgal for a non standard install with qt5
add_test(NAME config_non_standard_cgal_qt5 add_test(NAME config_non_standard_cgal_qt5
COMMAND ${CMAKE_COMMAND} ${GENERATOR} ${INIT_FILE} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${NON_STANDARD_INSTALL_PREFIX}/non_standard_install_qt5 -DCGAL_INSTALL_LIB_DIR=lib -DWITH_CGAL_Qt5=ON COMMAND ${CMAKE_COMMAND} ${GENERATOR} ${INIT_FILE} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${NON_STANDARD_INSTALL_PREFIX}/non_standard_install_qt5 -DCGAL_INSTALL_LIB_DIR=lib
"${CGAL_SOURCE_DIR}" "${CGAL_SOURCE_DIR}"
WORKING_DIRECTORY "${NON_STANDARD_INSTALL_PREFIX}/non_standard_build_qt5") WORKING_DIRECTORY "${NON_STANDARD_INSTALL_PREFIX}/non_standard_build_qt5")
#install cgal in the non standard place #install cgal in the non standard place

View File

@ -1,23 +0,0 @@
// Copyright (c) 1999
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri, Stefan Schirra
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Origin.h>
#include <CGAL/Origin_impl.h>
#include <CGAL/aff_transformation_tags.h>
#include <CGAL/aff_transformation_tags_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,23 +0,0 @@
// Copyright (c) 1999-2004
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Sylvain Pion
#ifndef CGAL_HEADER_ONLY
#include <CGAL/basic.h>
#include <CGAL/FPU.h>
#include <CGAL/Interval_arithmetic_impl.h>
#endif

View File

@ -1,18 +0,0 @@
// Copyright (c) 2008 GeometryFactory (France)
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Laurent Rineau
#ifndef CGAL_HEADER_ONLY
#include <CGAL/FPU.h>
#include <CGAL/test_FPU_rounding_mode_impl.h>
#endif

View File

@ -0,0 +1,4 @@
Installation
Kernel_23
Profiling_tools
STL_Extension

View File

@ -1,22 +1,5 @@
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.1...3.20)
project(Polyhedron_Demo) project( Polyhedron_Demo )
if(NOT POLICY CMP0070 AND POLICY CMP0053)
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
cmake_policy(SET CMP0053 OLD)
endif()
if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()
if(POLICY CMP0072)
# About the use of OpenGL
cmake_policy(SET CMP0072 NEW)
endif()
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
include(FeatureSummary) include(FeatureSummary)
# Find includes in corresponding build directories # Find includes in corresponding build directories
@ -247,9 +230,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
# CMake). That is to deal with the visibility of symbols of # CMake). That is to deal with the visibility of symbols of
# `Three.h`/`Three.cpp`. # `Three.h`/`Three.cpp`.
target_compile_definitions(demo_framework PRIVATE three_EXPORTS=1) target_compile_definitions(demo_framework PRIVATE three_EXPORTS=1)
if(CGAL_HEADER_ONLY) target_compile_definitions(demo_framework PRIVATE -DCGAL_USE_Qt5_RESOURCES)
target_compile_definitions(demo_framework PRIVATE -DCGAL_USE_Qt5_RESOURCES)
endif()
add_library(scene_basic_objects SHARED Scene_plane_item.cpp add_library(scene_basic_objects SHARED Scene_plane_item.cpp
Scene_spheres_item.cpp) Scene_spheres_item.cpp)

View File

@ -1,29 +0,0 @@
// Copyright (c) 1997
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Lutz Kettner <kettner@inf.ethz.ch>
// Matthias Baesken <baesken@informatik.uni-halle.de>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Real_timer.h>
#include <CGAL/Real_timer_impl.h>
namespace CGAL {
bool Real_timer::m_failed = false;
} //namespace CGAL
#endif // CGAL_HEADER_ONLY

View File

@ -1,29 +0,0 @@
// Copyright (c) 1997
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Lutz Kettner <kettner@inf.ethz.ch>
// Matthias Baesken <baesken@informatik.uni-halle.de>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Timer.h>
#include <CGAL/Timer_impl.h>
namespace CGAL {
bool Timer::m_failed = false;
} //namespace CGAL
#endif // CGAL_HEADER_ONLY

View File

@ -1,28 +0,0 @@
// Copyright (c) 1997-2001
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Sven Schönherr <sven@inf.ethz.ch>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/Random.h>
#include <CGAL/Random_impl.h>
namespace CGAL {
Random default_random;
} //namespace CGAL
#endif

View File

@ -1,22 +0,0 @@
// Copyright (c) 1997
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Geert-Jan Giezeman and Sven Schönherr
#ifndef CGAL_HEADER_ONLY
#include <CGAL/assertions.h>
#include <CGAL/assertions_impl.h>
#endif // CGAL_HEADER_ONLY

View File

@ -30,7 +30,7 @@ do
fi fi
done done
cmake -DCGAL_HEADER_ONLY=FALSE -DCGAL_BUILD_THREE_DOC=TRUE -DCGAL_ENABLE_CHECK_HEADERS=TRUE -DDOXYGEN_EXECUTABLE="$DOX_PATH" -DCGAL_COPY_DEPENDENCIES=TRUE -DCMAKE_CXX_FLAGS="-std=c++1y" .. cmake -DCGAL_ENABLE_CHECK_HEADERS=TRUE -DDOXYGEN_EXECUTABLE="$DOX_PATH" -DCGAL_COPY_DEPENDENCIES=TRUE -DCMAKE_CXX_FLAGS="-std=c++1y" ..
if [ -n "$DO_CHECK_HEADERS" ]; then if [ -n "$DO_CHECK_HEADERS" ]; then
make -j$(nproc --all) -k check_headers make -j$(nproc --all) -k check_headers
fi fi

View File

@ -70,7 +70,7 @@ rm -fr demo/[A-Z]*
rm -fr examples/[A-Z]* rm -fr examples/[A-Z]*
# Somehow -DWITH_CGAL_Core=OFF is not taken into account, hence the CORE files # Somehow -DWITH_CGAL_Core=OFF is not taken into account, hence the CORE files
# are listed in the exceptions file. # are listed in the exceptions file.
cmake . -DBUILD_SHARED_LIBS=TRUE -DWITH_CGAL_Qt5=OFF -DWITH_CGAL_Core=OFF cmake .
make | grep -C 10 "No such file" || true make | grep -C 10 "No such file" || true
echo " done" echo " done"
echo echo

View File

@ -262,14 +262,14 @@ run_test_on_platform()
if [ ! -f "${INIT_FILE}" ]; then if [ ! -f "${INIT_FILE}" ]; then
echo "error NEED A INIT FILE !" echo "error NEED A INIT FILE !"
fi fi
cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR>installation.log 2>&1 cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF $CGAL_DIR>installation.log 2>&1
rm CMakeCache.txt rm CMakeCache.txt
CMAKE_OPTS="-DCGAL_TEST_SUITE=ON -DCMAKE_VERBOSE_MAKEFILE=ON" CMAKE_OPTS="-DCGAL_TEST_SUITE=ON -DCMAKE_VERBOSE_MAKEFILE=ON"
if [ -n "${SCRIPTS_DIR}" ]; then if [ -n "${SCRIPTS_DIR}" ]; then
CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON" CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON"
fi fi
if [ -z "${SHOW_PROGRESS}" ]; then if [ -z "${SHOW_PROGRESS}" ]; then
cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR >package_installation.log 2>&1 cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR >package_installation.log 2>&1
else else
cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log
fi fi

View File

@ -29,12 +29,10 @@
#BLAS #BLAS
#LAPACK #LAPACK
#OPENNL #OPENNL
#QGLViewer (or implied by Qt4?)
#ESBTL #ESBTL
#NTL #NTL
#Core (implies GMP+GMPXX) #Core (implies GMP+GMPXX)
#Qt4 (implies QT4)
#ImageIO #ImageIO
#not (yet) supported #not (yet) supported
@ -44,21 +42,19 @@
create_cmake_script_with_options() create_cmake_script_with_options()
{ {
qt4='n'
# parse options file # parse options file
if [ -e "$OPTIONS_FILE" ]; then if [ -e "$OPTIONS_FILE" ]; then
OLDIFS="$IFS" OLDIFS="$IFS"
IFS=$'\n' IFS=$'\n'
for LINE in `cat $OPTIONS_FILE`; do for LINE in `cat $OPTIONS_FILE`; do
# CGAL components # CGAL components
if [ -z "$CGAL_COMPONENTS_GIVEN" ]; then # read file only if not given! if [ -z "$CGAL_COMPONENTS_GIVEN" ]; then # read file only if not given!
next_cgal_component=`echo $LINE | grep -v "#" | grep CGAL_COMPONENT` next_cgal_component=`echo $LINE | grep -v "#" | grep CGAL_COMPONENT`
if [ ! -z "$next_cgal_component" ]; then if [ ! -z "$next_cgal_component" ]; then
next_cgal_component=${next_cgal_component/CGAL_COMPONENT /} next_cgal_component=${next_cgal_component/CGAL_COMPONENT /}
if [ -z "$CGAL_COMPONENTS" ]; then if [ -z "$CGAL_COMPONENTS" ]; then
CGAL_COMPONENTS=$next_cgal_component CGAL_COMPONENTS=$next_cgal_component
else else
CGAL_COMPONENTS=$CGAL_COMPONENTS":"$next_cgal_component CGAL_COMPONENTS=$CGAL_COMPONENTS":"$next_cgal_component
@ -114,11 +110,10 @@ fi
if [ ! -z "$CGAL_COMPONENTS" ]; then if [ ! -z "$CGAL_COMPONENTS" ]; then
# ensure capitalization # ensure capitalization
# CGAL: Core, Qt4, PDB, ImageIO # CGAL: Core, PDB, ImageIO
CGAL_COMPONENTS=${CGAL_COMPONENTS//[c|C][o|O][r|R][e|E]/Core} CGAL_COMPONENTS=${CGAL_COMPONENTS//[c|C][o|O][r|R][e|E]/Core}
CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]4/Qt4}
CGAL_COMPONENTS=${CGAL_COMPONENTS//[i|I][m|M][a|A][g|G][e|E][i|I][o|O]/ImageIO} CGAL_COMPONENTS=${CGAL_COMPONENTS//[i|I][m|M][a|A][g|G][e|E][i|I][o|O]/ImageIO}
# external libs # external libs
CGAL_COMPONENTS=${CGAL_COMPONENTS//[g|G][m|M][p|P]/GMP} CGAL_COMPONENTS=${CGAL_COMPONENTS//[g|G][m|M][p|P]/GMP}
@ -153,11 +148,6 @@ fi
for cgal_component in $CGAL_COMPONENTS; do for cgal_component in $CGAL_COMPONENTS; do
COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'` COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'`
# for qtmoc
if [ "$COMPONENT" = "qt4" ]; then
qt4='y'
fi
done done
IFS=$OLDIFS IFS=$OLDIFS
@ -241,31 +231,6 @@ EOF
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
fi fi
# Qt4
if [ "$qt4" = "y" ]; then
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
cat << 'EOF'
# Qt4
set( QT_USE_QTXML true )
set( QT_USE_QTMAIN true )
set( QT_USE_QTSCRIPT true )
set( QT_USE_QTOPENGL true )
find_package(Qt4)
if ( NOT QT_FOUND )
message(STATUS "This project requires the Qt4 library, and will not be compiled.")
return()
endif()
EOF
#-------------------------------------------------------------------------
fi #qt4
if [ ! -z "$BOOST_COMPONENTS" ]; then if [ ! -z "$BOOST_COMPONENTS" ]; then
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
cat << 'EOF' cat << 'EOF'
@ -308,22 +273,6 @@ EOF
# add a new line # add a new line
echo echo
# Qt4
if [ "$qt4" = "y" ]; then
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
cat << 'EOF'
if ( CGAL_Qt4_FOUND AND QT_FOUND )
include( ${QT_USE_FILE} )
include_directories( ${QT_INCLUDE_DIR} )
endif()
EOF
#-----------------------------------------------------------------------
fi # qt4
for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do
# Create an executable for each cpp that contains a function "main()" # Create an executable for each cpp that contains a function "main()"
BASE=`basename $file .cc` BASE=`basename $file .cc`
@ -335,12 +284,8 @@ EOF
BASE=`basename $BASE .C` BASE=`basename $BASE .C`
egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1 egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
if [ "$qt4" = "y" ]; then echo "create_single_source_cgal_program( \"$file\" )"
echo "create_single_source_cgal_program_qt4( \"$file\" )" if [ -n "$ENABLE_CTEST" ]; then
else
echo "create_single_source_cgal_program( \"$file\" )"
fi
if [ -n "$ENABLE_CTEST" ]; then
if [ -f "$BASE.cin" ] ; then if [ -f "$BASE.cin" ] ; then
CIN=" < $BASE.cin" CIN=" < $BASE.cin"
else else
@ -384,73 +329,6 @@ EOF
all="$all $file" all="$all $file"
done done
# Qt4
if [ "$qt4" = "y" ]; then
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
cat << 'EOF'
if ( CGAL_Qt4_FOUND AND QT_FOUND )
include( ${QT_USE_FILE} )
include_directories( ${QT_INCLUDE_DIR} )
EOF
#-----------------------------------------------------------------------
echo " # UI files (Qt Designer files)"
for file in `ls *.ui 2> /dev/null | sort`; do
echo " qt4_wrap_ui( DT_UI_FILES $file )"
done
echo
echo " # qrc files (resources files, that contain icons, at least)"
for file in `ls *.qrc 2> /dev/null | sort`; do
echo " qt4_add_resources ( DT_RESOURCE_FILES ./$file )"
done
echo
MOC_FILES=""
echo " # use the Qt MOC preprocessor on classes that derives from QObject"
for file in `ls include/*.h 2> /dev/null | sort`; do
BASE=`basename $file .h`
egrep 'Q_OBJECT' $file >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo " qt4_generate_moc( include/${BASE}.h ${BASE}.moc )"
MOC_FILES="${BASE}.moc $MOC_FILES"
fi
done
for file in `ls *.h 2> /dev/null | sort`; do
BASE=`basename $file .h`
egrep 'Q_OBJECT' $file >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo " qt4_generate_moc( ${BASE}.h ${BASE}.moc )"
MOC_FILES="${BASE}.moc $MOC_FILES"
fi
done
for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do
BASE=`basename $file .cc`
BASE=`basename $BASE .cp`
BASE=`basename $BASE .cxx`
BASE=`basename $BASE .cpp`
BASE=`basename $BASE .CPP`
BASE=`basename $BASE .c++`
BASE=`basename $BASE .C`
egrep 'Q_OBJECT' $file >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo " qt4_generate_moc( ${BASE}.cpp ${BASE}.moc )"
MOC_FILES="${BASE}.moc $MOC_FILES"
fi
done
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
cat << 'EOF'
endif()
EOF
#-----------------------------------------------------------------------
all="${all} ${MOC_FILES} \${DT_UI_FILES} \${DT_RESOURCE_FILES}"
fi # qt4
# no 'cat' here, as variable substitution required # no 'cat' here, as variable substitution required
echo echo
echo "add_executable( ${target_name} ${all} )" echo "add_executable( ${target_name} ${all} )"
@ -480,7 +358,7 @@ usage()
echo "Usage: `basename $0` [-s source] [-c cgal-component1:cgal-component2:...] [-b boost-component1:boost-component2:...] [-p] [-o options_file='`pwd`/cgal_cmake_options:$HOME/.cgal_cmake_options_rc'] [-v] [-h]" >&2 echo "Usage: `basename $0` [-s source] [-c cgal-component1:cgal-component2:...] [-b boost-component1:boost-component2:...] [-p] [-o options_file='`pwd`/cgal_cmake_options:$HOME/.cgal_cmake_options_rc'] [-v] [-h]" >&2
echo >&2 echo >&2
echo " -s source If this parameter is given the script will create one single executable for 'source' with all source files; otherwise it creates one executable for each main'ed source." >&2 echo " -s source If this parameter is given the script will create one single executable for 'source' with all source files; otherwise it creates one executable for each main'ed source." >&2
echo " cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO','Qt4' ('benchmark', 'symbolic')." >&2 echo " cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO' ('benchmark', 'symbolic')." >&2
echo " boost_componentX - must be a valid boost component, like 'filesystem', 'program_options'." >&2 echo " boost_componentX - must be a valid boost component, like 'filesystem', 'program_options'." >&2
echo " -o options_file - file with PACKAGE, DIRECTORY, CGAL_COMPONENT, and BOOST_COMPONENT directives" >&2 echo " -o options_file - file with PACKAGE, DIRECTORY, CGAL_COMPONENT, and BOOST_COMPONENT directives" >&2
echo " -v the version" >&2 echo " -v the version" >&2

View File

@ -1,21 +0,0 @@
// Copyright (c) 1997
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri, Hervé Brönnimann
#ifndef CGAL_HEADER_ONLY
#include <CGAL/IO/Color.h>
#endif // CGAL_HEADER_ONLY

View File

@ -1,24 +0,0 @@
// Copyright (c) 1997
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Lutz Kettner <kettner@mpi-sb.mpg.de>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/IO/OFF/File_header_OFF.h>
#include <CGAL/IO/OFF/File_header_OFF_impl.h>
#endif // CGAL_HEADER_ONLY
// EOF //

View File

@ -1,24 +0,0 @@
// Copyright (c) 1997
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Lutz Kettner <kettner@mpi-sb.mpg.de>
#ifndef CGAL_HEADER_ONLY
#include <CGAL/IO/OFF/File_header_extended_OFF.h>
#include <CGAL/IO/OFF/File_header_extended_OFF_impl.h>
#endif // CGAL_HEADER_ONLY
// EOF //

View File

@ -9,8 +9,8 @@
if [ -z "${CGAL_TEST_PLATFORM}" ]; then if [ -z "${CGAL_TEST_PLATFORM}" ]; then
CGAL_TEST_PLATFORM=`dirname $PWD` CGAL_TEST_PLATFORM=`dirname $PWD`
echo "CGAL_TEST_PLATFORM not in the environment, setting it to ${CGAL_TEST_PLATFORM}" echo "CGAL_TEST_PLATFORM not in the environment, setting it to ${CGAL_TEST_PLATFORM}"
fi fi
@ -24,7 +24,6 @@ GENERAL_BUILD_LOGFILE=''
PLATFORM_BUILD_LOGFILE='' PLATFORM_BUILD_LOGFILE=''
TEST_REPORT='' TEST_REPORT=''
RESULT_FILE='' RESULT_FILE=''
shared_or_static=''
#print_testresult <platform> <directory> #print_testresult <platform> <directory>
# print result on stdout # print result on stdout
@ -53,12 +52,12 @@ print_testresult()
then then
RESULT="w" RESULT="w"
else else
if grep -E -q 'NOTICE: .*(need|require|incompatible).*and.*will not be' CompilerOutput_$1 if grep -E -q 'NOTICE: .*(need|require|incompatible).*and.*will not be' CompilerOutput_$1
then then
RESULT="r" RESULT="r"
else else
RESULT="y" RESULT="y"
fi fi
fi fi
fi fi
TIMING=`awk '/^ # Running time: / {print $4}' < ErrorOutput_$1` TIMING=`awk '/^ # Running time: / {print $4}' < ErrorOutput_$1`
@ -67,81 +66,19 @@ print_testresult()
echo "$2 $RESULT" echo "$2 $RESULT"
} }
parse_shared_or_static()
{
if [ -f "${PLATFORM_BUILD_LOGFILE}" ] ; then
if grep "Building shared libraries" ${PLATFORM_BUILD_LOGFILE} >/dev/null 2>&1; then
shared_or_static='shared'
else
shared_or_static='static'
fi
else
shared_or_static='shared'
fi
}
parse_flags_and_third_party_choices() parse_flags_and_third_party_choices()
{ {
grep -e "^-- USING " ${PLATFORM_BUILD_LOGFILE} >> $RESULT_FILE grep -e "^-- USING " ${PLATFORM_BUILD_LOGFILE} >> $RESULT_FILE
echo "------------" >> $RESULT_FILE echo "------------" >> $RESULT_FILE
} }
parse_lib_building_results()
{
libname=$1
target=$2
if [ ! -e "${libname}_${shared_or_static}" ]; then
mkdir "${libname}_${shared_or_static}"
fi
y_or_no='n'
configured=''
if [ -f "${PLATFORM_BUILD_LOGFILE}" ]; then
if grep -q "Built target ${target}" ${PLATFORM_BUILD_LOGFILE} ; then
y_or_no='y'
fi
marker_beg=`grep -e "${target}.dir/depend$" ${PLATFORM_BUILD_LOGFILE} | head -1`
if [ -n "${marker_beg}" ]; then
configured='y'
if [ ! "$target" = "CGAL" ]; then
cat ${PLATFORM_BUILD_LOGFILE} | sed -n "\|${marker_beg}|,\|depend$| p" >> ${libname}_${shared_or_static}/$TEST_REPORT
fi
# Test if there is a warning in the build log.
if [ "$y_or_no" = "y" ]; then
# See the comment line 38.
if grep -i -E -q '(^|[^a-zA-Z_,:-])warning' ${libname}_${shared_or_static}/$TEST_REPORT ; then
y_or_no='w'
fi
fi
fi
fi
if [ -z "${configured}" ] ; then
y_or_no='r'
echo "Not configured!" >> ${libname}_${shared_or_static}/$TEST_REPORT
fi
echo ${libname}_${shared_or_static} $y_or_no >> $RESULT_FILE
}
output_main_logs() output_main_logs()
{ {
[ -e Installation ] || mkdir "Installation" [ -e Installation ] || mkdir "Installation"
INSTALLATION_TEST_REPORT="Installation/$TEST_REPORT" INSTALLATION_TEST_REPORT="Installation/$TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
echo " General Build Log " >> "$INSTALLATION_TEST_REPORT" echo " General Build Log " >> "$INSTALLATION_TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
@ -149,9 +86,9 @@ output_main_logs()
if [ -f "${GENERAL_BUILD_LOGFILE}" ] ; then if [ -f "${GENERAL_BUILD_LOGFILE}" ] ; then
cat "${GENERAL_BUILD_LOGFILE}" >> "$INSTALLATION_TEST_REPORT" cat "${GENERAL_BUILD_LOGFILE}" >> "$INSTALLATION_TEST_REPORT"
else else
echo "Not found!" >> "$INSTALLATION_TEST_REPORT" echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
fi fi
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
echo " Platform-specific Build Log " >> "$INSTALLATION_TEST_REPORT" echo " Platform-specific Build Log " >> "$INSTALLATION_TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
@ -159,9 +96,9 @@ output_main_logs()
if [ -f "${PLATFORM_BUILD_LOGFILE}" ] ; then if [ -f "${PLATFORM_BUILD_LOGFILE}" ] ; then
cat "${PLATFORM_BUILD_LOGFILE}" >> "$INSTALLATION_TEST_REPORT" cat "${PLATFORM_BUILD_LOGFILE}" >> "$INSTALLATION_TEST_REPORT"
else else
echo "Not found!" >> "$INSTALLATION_TEST_REPORT" echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
fi fi
if [ -f "$HOME/.autocgal_with_cmake_rc" ] ; then if [ -f "$HOME/.autocgal_with_cmake_rc" ] ; then
echo "" >> "$INSTALLATION_TEST_REPORT" echo "" >> "$INSTALLATION_TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
@ -179,7 +116,7 @@ output_main_logs()
cat "$HOME/.autocgalrc" >> "$INSTALLATION_TEST_REPORT" cat "$HOME/.autocgalrc" >> "$INSTALLATION_TEST_REPORT"
fi fi
fi fi
if [ -f "../setup" ] ; then if [ -f "../setup" ] ; then
echo "" >> "$INSTALLATION_TEST_REPORT" echo "" >> "$INSTALLATION_TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
@ -188,8 +125,8 @@ output_main_logs()
echo "" >> "$INSTALLATION_TEST_REPORT" echo "" >> "$INSTALLATION_TEST_REPORT"
cat "../setup" >> "$INSTALLATION_TEST_REPORT" cat "../setup" >> "$INSTALLATION_TEST_REPORT"
fi fi
echo "" >> "$INSTALLATION_TEST_REPORT" echo "" >> "$INSTALLATION_TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
echo " CMakeCache.txt" >> "$INSTALLATION_TEST_REPORT" echo " CMakeCache.txt" >> "$INSTALLATION_TEST_REPORT"
@ -198,9 +135,9 @@ output_main_logs()
if [ -f "../CMakeCache.txt" ] ; then if [ -f "../CMakeCache.txt" ] ; then
cat "../CMakeCache.txt" >> "$INSTALLATION_TEST_REPORT" cat "../CMakeCache.txt" >> "$INSTALLATION_TEST_REPORT"
else else
echo "Not found!" >> "$INSTALLATION_TEST_REPORT" echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
fi fi
echo "" >> "$INSTALLATION_TEST_REPORT" echo "" >> "$INSTALLATION_TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
echo " include/CGAL/compiler_config.h" >> "$INSTALLATION_TEST_REPORT" echo " include/CGAL/compiler_config.h" >> "$INSTALLATION_TEST_REPORT"
@ -209,9 +146,9 @@ output_main_logs()
if [ -f "../include/CGAL/compiler_config.h" ] ; then if [ -f "../include/CGAL/compiler_config.h" ] ; then
cat "../include/CGAL/compiler_config.h" >> "$INSTALLATION_TEST_REPORT" cat "../include/CGAL/compiler_config.h" >> "$INSTALLATION_TEST_REPORT"
else else
echo "Not found!" >> "$INSTALLATION_TEST_REPORT" echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
fi fi
echo "" >> "$INSTALLATION_TEST_REPORT" echo "" >> "$INSTALLATION_TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
echo " CGALConfig.cmake" >> "$INSTALLATION_TEST_REPORT" echo " CGALConfig.cmake" >> "$INSTALLATION_TEST_REPORT"
@ -220,9 +157,9 @@ output_main_logs()
if [ -f "../CGALConfig.cmake" ] ; then if [ -f "../CGALConfig.cmake" ] ; then
cat "../CGALConfig.cmake" >> "$INSTALLATION_TEST_REPORT" cat "../CGALConfig.cmake" >> "$INSTALLATION_TEST_REPORT"
else else
echo "Not found!" >> "$INSTALLATION_TEST_REPORT" echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
fi fi
echo "" >> "$INSTALLATION_TEST_REPORT" echo "" >> "$INSTALLATION_TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
echo " CMakeError.log" >> "$INSTALLATION_TEST_REPORT" echo " CMakeError.log" >> "$INSTALLATION_TEST_REPORT"
@ -231,9 +168,9 @@ output_main_logs()
if [ -f "../CMakeFiles/CMakeError.log" ] ; then if [ -f "../CMakeFiles/CMakeError.log" ] ; then
cat "../CMakeFiles/CMakeError.log" >> "$INSTALLATION_TEST_REPORT" cat "../CMakeFiles/CMakeError.log" >> "$INSTALLATION_TEST_REPORT"
else else
echo "Not found!" >> "$INSTALLATION_TEST_REPORT" echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
fi fi
echo "" >> "$INSTALLATION_TEST_REPORT" echo "" >> "$INSTALLATION_TEST_REPORT"
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
echo " CMakeOutput.log" >> "$INSTALLATION_TEST_REPORT" echo " CMakeOutput.log" >> "$INSTALLATION_TEST_REPORT"
@ -242,9 +179,9 @@ output_main_logs()
if [ -f "../CMakeFiles/CMakeOutput.log" ] ; then if [ -f "../CMakeFiles/CMakeOutput.log" ] ; then
cat "../CMakeFiles/CMakeOutput.log" >> "$INSTALLATION_TEST_REPORT" cat "../CMakeFiles/CMakeOutput.log" >> "$INSTALLATION_TEST_REPORT"
else else
echo "Not found!" >> "$INSTALLATION_TEST_REPORT" echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
fi fi
} }
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
@ -271,17 +208,10 @@ echo "CGAL_TEST_PLATFORM ${CGAL_TEST_PLATFORM}" >> "$RESULT_FILE"
echo "General installation log file: ${GENERAL_BUILD_LOGFILE}" >> "$RESULT_FILE" echo "General installation log file: ${GENERAL_BUILD_LOGFILE}" >> "$RESULT_FILE"
echo "Host-specific installation log file: ${PLATFORM_BUILD_LOGFILE}" >> "$RESULT_FILE" echo "Host-specific installation log file: ${PLATFORM_BUILD_LOGFILE}" >> "$RESULT_FILE"
parse_shared_or_static output_main_logs
output_main_logs
parse_flags_and_third_party_choices parse_flags_and_third_party_choices
parse_lib_building_results "libCGAL" "CGAL"
parse_lib_building_results "libCGALCore" "CGAL_Core"
parse_lib_building_results "libCGALimageIO" "CGAL_ImageIO"
parse_lib_building_results "libCGALQt5" "CGAL_Qt5"
for DIR in $TEST_DIRECTORIES ; do for DIR in $TEST_DIRECTORIES ; do
if [ -d "$DIR" ] ; then if [ -d "$DIR" ] ; then
echo " $DIR ..." echo " $DIR ..."