mirror of https://github.com/CGAL/cgal
Merge pull request #5063 from maxGimeno/CMake-modernization-maxGimeno
CMake modernization # Conflicts: # CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt
This commit is contained in:
commit
ca9febf3b8
|
|
@ -23,6 +23,8 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
|
|||
add_compile_definitions(QT_NO_KEYWORDS)
|
||||
include_directories( BEFORE ./ )
|
||||
|
||||
# Arrangement package includes
|
||||
add_definitions(-DQT_NO_KEYWORDS)
|
||||
option(COMPILE_UTILS_INCREMENTALLY
|
||||
"Compile files in Utils directory incrementally, or compile them all as a unit. \
|
||||
Incremental compilation will be better for development and consume less \
|
||||
|
|
|
|||
|
|
@ -19,23 +19,6 @@ if(NOT Boost_FOUND)
|
|||
|
||||
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 package
|
||||
|
|
@ -59,12 +42,21 @@ create_single_source_cgal_program("transform_iterator.cpp")
|
|||
|
||||
create_single_source_cgal_program("copy_polyhedron.cpp")
|
||||
|
||||
find_package( OpenMesh QUIET )
|
||||
if(OpenMesh_FOUND)
|
||||
target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} )
|
||||
target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH )
|
||||
else()
|
||||
message(STATUS "Examples that use OpenMesh will not be compiled.")
|
||||
endif()
|
||||
|
||||
find_package( METIS )
|
||||
if( METIS_FOUND )
|
||||
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()
|
||||
|
|
|
|||
|
|
@ -13,11 +13,9 @@ create_single_source_cgal_program("surface_mesh_dual.cpp")
|
|||
create_single_source_cgal_program("connected_components.cpp")
|
||||
|
||||
find_package(METIS)
|
||||
|
||||
if( METIS_FOUND )
|
||||
include_directories(${METIS_INCLUDE_DIRS})
|
||||
|
||||
create_single_source_cgal_program( "surface_mesh_partition.cpp" )
|
||||
target_include_directories( surface_mesh_partition PRIVATE ${METIS_INCLUDE_DIRS} )
|
||||
target_link_libraries( surface_mesh_partition PRIVATE ${METIS_LIBRARIES} )
|
||||
else()
|
||||
message(STATUS "Examples that use the METIS library will not be compiled.")
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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()
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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")
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -35,47 +35,18 @@ endif()
|
|||
find_package(IPE 6)
|
||||
|
||||
if(IPE_FOUND)
|
||||
include_directories(BEFORE ${IPE_INCLUDE_DIR})
|
||||
|
||||
if (${IPE_VERSION} EQUAL "7")
|
||||
set(WITH_IPE_7 ON)
|
||||
elseif(${IPE_VERSION} EQUAL "6")
|
||||
set(WITH_IPE_7 OFF)
|
||||
else()
|
||||
message(
|
||||
"-- Error: ${IPE_VERSION} is not a supported version of IPE (only 6 and 7 are)."
|
||||
)
|
||||
message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 6 and 7 are).")
|
||||
set(IPE_FOUND FALSE)
|
||||
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()
|
||||
|
||||
if(IPE_FOUND AND IPE_VERSION)
|
||||
if(WITH_IPE_7)
|
||||
add_definitions(-DCGAL_USE_IPE_7)
|
||||
endif()
|
||||
|
||||
message("-- Using IPE version ${IPE_VERSION} compatibility.")
|
||||
|
||||
#setting installation directory
|
||||
|
|
@ -84,18 +55,16 @@ if(IPE_FOUND AND IPE_VERSION)
|
|||
if (WITH_IPE_7)
|
||||
remove_leading_zero(IPE_MINOR_VERSION_1)
|
||||
remove_leading_zero(IPE_MINOR_VERSION_2)
|
||||
set(INSTALL_PATHS
|
||||
"${IPE_LIBRARY_DIR}/ipe/7.${IPE_MINOR_VERSION_1}.${IPE_MINOR_VERSION_2}/ipelets/"
|
||||
)
|
||||
find_path(
|
||||
IPELET_INSTALL_DIR
|
||||
set(INSTALL_PATHS "${IPE_LIBRARY_DIR}/ipe/7.${IPE_MINOR_VERSION_1}.${IPE_MINOR_VERSION_2}/ipelets/")
|
||||
find_path(IPELET_INSTALL_DIR
|
||||
NAMES libgoodies.lua goodies.lua
|
||||
PATHS ${INSTALL_PATHS}
|
||||
DOC "The folder where ipelets will be installed" ENV IPELETPATH)
|
||||
DOC "The folder where ipelets will be installed"
|
||||
ENV IPELETPATH
|
||||
)
|
||||
else()
|
||||
foreach (VER RANGE 28 40)
|
||||
string(REPLACE XX ${VER} PATHC
|
||||
"${IPE_LIBRARY_DIR}/ipe/6.0preXX/ipelets/")
|
||||
string(REPLACE XX ${VER} PATHC "${IPE_LIBRARY_DIR}/ipe/6.0preXX/ipelets/" )
|
||||
set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC})
|
||||
endforeach()
|
||||
set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC})
|
||||
|
|
@ -146,14 +115,18 @@ if(IPE_FOUND AND IPE_VERSION)
|
|||
|
||||
foreach(IPELET ${CGAL_IPELETS})
|
||||
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})
|
||||
target_link_libraries(CGAL_${IPELET} PRIVATE CGAL::CGAL CGAL::Eigen3_support
|
||||
${IPE_LIBRARIES})
|
||||
if(IPELET_INSTALL_DIR)
|
||||
install(TARGETS CGAL_${IPELET} DESTINATION ${IPELET_INSTALL_DIR})
|
||||
if (WITH_IPE_7)
|
||||
install(FILES ./lua/libCGAL_${IPELET}.lua
|
||||
DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7
|
||||
install(FILES ./lua/libCGAL_${IPELET}.lua DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7
|
||||
endif()
|
||||
endif ()
|
||||
cgal_add_compilation_test(CGAL_${IPELET})
|
||||
|
|
@ -170,8 +143,5 @@ if(IPE_FOUND AND IPE_VERSION)
|
|||
cgal_add_compilation_test(simple_triangulation)
|
||||
|
||||
else()
|
||||
message(
|
||||
STATUS
|
||||
"NOTICE: This program requires the Ipe include files and library, and will not be compiled."
|
||||
)
|
||||
message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
\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!");
|
||||
// ...
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
\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,
|
||||
you need <a href="https://cmake.org/">CMake</a>, a cross-platform "makefile generator".
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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")
|
||||
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -17,21 +17,20 @@ find_package(LEDA QUIET)
|
|||
# Find Qt5 itself
|
||||
find_package(Qt5 QUIET COMPONENTS OpenGL Gui)
|
||||
|
||||
|
||||
if(CGAL_Qt5_FOUND
|
||||
AND Qt5_FOUND
|
||||
AND (CGAL_Core_FOUND OR LEDA_FOUND))
|
||||
include_directories(BEFORE ./ ./include)
|
||||
# ui files, created with Qt Designer
|
||||
qt5_wrap_ui(UIS HDT2.ui)
|
||||
|
||||
qt5_add_resources(RESOURCE_FILES resources/Delaunay_triangulation_2.qrc)
|
||||
|
||||
# cpp files
|
||||
add_executable(HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES}
|
||||
${UIS})
|
||||
add_executable ( HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} ${UIS})
|
||||
target_include_directories(HDT2 PRIVATE ./ ./include)
|
||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS HDT2 )
|
||||
target_link_libraries(HDT2 CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core
|
||||
Qt5::Widgets)
|
||||
target_link_libraries ( HDT2 CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core Qt5::Widgets)
|
||||
else()
|
||||
message(
|
||||
STATUS
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#else
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
|
||||
#include <internal/Qt/HyperbolicPainterOstream.h>
|
||||
#include "internal/Qt/HyperbolicPainterOstream.h"
|
||||
#endif
|
||||
|
||||
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
|
||||
|
|
|
|||
|
|
@ -4,33 +4,18 @@
|
|||
# ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as
|
||||
# ${CMAKE_BINARY_DIR} or ${CMAKE_BINARY_DIR}.
|
||||
if(NOT PROJECT_NAME)
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.12...3.18)
|
||||
project(CGAL CXX C)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0056)
|
||||
# https://cmake.org/cmake/help/v3.2/policy/CMP0056.html
|
||||
#
|
||||
# Fix a bug: `try_compile` should use `CMAKE_EXE_LINKER_FLAGS`.
|
||||
# That variable can contain important flags like
|
||||
#
|
||||
# -static-libstdc++ -static-libgcc
|
||||
#
|
||||
cmake_policy(SET CMP0056 NEW)
|
||||
endif()
|
||||
|
||||
# Use GNUInstallDirs to get canonical paths
|
||||
include(GNUInstallDirs)
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# -= HEADER ONLY =-
|
||||
#
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
option(CGAL_HEADER_ONLY
|
||||
"Enable header-only mode of CGAL (no compilation of CGAL libraries)"
|
||||
TRUE)
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# -= PACKAGE SETUP =-
|
||||
|
|
@ -127,11 +112,6 @@ else(CGAL_BRANCH_BUILD)
|
|||
|
||||
# Enable testing with BUILD_TESTING
|
||||
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)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
|
@ -420,7 +400,7 @@ set(CGAL_Qt5_SOVERSION "14.0.0")
|
|||
|
||||
message( STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}" )
|
||||
message( STATUS "CGAL_SOVERSION =${CGAL_SOVERSION}" )
|
||||
set(CGAL_BUILDING_LIBS TRUE)
|
||||
|
||||
|
||||
set(CGAL_VERSION_DIR CGAL-${CGAL_VERSION})
|
||||
set(CGAL_MODULES_REL_DIR cmake/modules)
|
||||
|
|
@ -579,34 +559,6 @@ endif()
|
|||
|
||||
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
|
||||
macro(set_special_prefix library prefix)
|
||||
set(SPECIAL_PREFIXES
|
||||
|
|
@ -640,13 +592,8 @@ if(CGAL_DISABLE_GMP)
|
|||
unset(MPFR_FOUND CACHE)
|
||||
unset(WITH_CGAL_Core)
|
||||
unset(WITH_CGAL_Core CACHE)
|
||||
unset(WITH_GMP)
|
||||
unset(WITH_GMP CACHE)
|
||||
unset(CGAL_USE_GMP)
|
||||
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
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/include/gmp.h"
|
||||
"#error GMP is disabled by the CMake option CGAL_DISABLE_GMP")
|
||||
|
|
@ -660,24 +607,6 @@ else()
|
|||
endif()
|
||||
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 =-
|
||||
|
|
@ -688,27 +617,16 @@ endforeach()
|
|||
# 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.
|
||||
# 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_INCLUDE_DIRS "")
|
||||
cache_set(CGAL_3RD_PARTY_LIBRARIES "")
|
||||
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
|
||||
# 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
|
||||
# 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")
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
|
|
@ -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 =-
|
||||
|
|
@ -863,18 +710,18 @@ endforeach()
|
|||
|
||||
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_LIBRARIES )
|
||||
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
|
||||
# CGAL_HEADER_ONLY=ON
|
||||
# Variables used when WITH_{demos|examples|tests} are TRUE
|
||||
#
|
||||
set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake)
|
||||
get_property(CGAL_FOUND GLOBAL PROPERTY CGAL_FOUND)
|
||||
|
|
@ -929,15 +776,10 @@ if(CGAL_BRANCH_BUILD AND CGAL_REPORT_DUPLICATE_FILES)
|
|||
|
||||
endif()
|
||||
|
||||
if(NOT CGAL_HEADER_ONLY)
|
||||
create_cgalconfig_files()
|
||||
else()
|
||||
configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary_header_only.cmake.in"
|
||||
"${CMAKE_BINARY_DIR}/CGALConfig.cmake" @ONLY)
|
||||
configure_file(
|
||||
"${CGAL_MODULES_DIR}/CGALConfigVersion_binary_header_only.cmake.in"
|
||||
configure_file("${CGAL_MODULES_DIR}/CGALConfigVersion_binary_header_only.cmake.in"
|
||||
"${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake" @ONLY)
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
#
|
||||
|
|
@ -993,24 +835,18 @@ if(ZLIB_IN_AUXILIARY)
|
|||
install(DIRECTORY auxiliary/zlib/lib/ DESTINATION ${CGAL_INSTALL_LIB_DIR})
|
||||
endif()
|
||||
|
||||
if(NOT CGAL_HEADER_ONLY)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake
|
||||
${CMAKE_BINARY_DIR}/config/CGALConfig.cmake
|
||||
DESTINATION ${CGAL_INSTALL_CMAKE_DIR})
|
||||
else()
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake
|
||||
${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigBuildVersion.cmake
|
||||
${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigVersion.cmake
|
||||
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
|
||||
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
|
||||
install(FILES
|
||||
${CMAKE_BINARY_DIR}/config/CGALConfig-installation-dirs.cmake
|
||||
DESTINATION ${CGAL_INSTALL_CMAKE_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CGAL_INSTALL_MAN_DIR)
|
||||
install(FILES auxiliary/cgal_create_cmake_script.1
|
||||
|
|
@ -1284,41 +1120,35 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.")
|
|||
-DDOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE}
|
||||
"${CMAKE_SOURCE_DIR}/Documentation/doc"
|
||||
WORKING_DIRECTORY "${DOC_DIR}")
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" --build . --target "doc"
|
||||
execute_process(
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" --build . --target "doc"
|
||||
WORKING_DIRECTORY "${DOC_DIR}" )
|
||||
|
||||
#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(
|
||||
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")
|
||||
find_program(AWK awk)
|
||||
set(awk_arguments
|
||||
[=[{ match($0, /# *include *(<|[<"])(CGAL\/[^>&"]*)([>"]|>)| (CGAL\/[^>&"]*\.h)/,arr); if(arr[2]!="") print arr[2]; if(arr[4]!="") print arr[4] }]=]
|
||||
)
|
||||
set(awk_arguments [=[{ match($0, /# *include *(<|[<"])(CGAL\/[^>&"]*)([>"]|>)| (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}"
|
||||
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})
|
||||
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}"
|
||||
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})
|
||||
LIST( APPEND list_of_documented_headers ${tmp_list})
|
||||
endif()
|
||||
endforeach()
|
||||
message("removing duplicates:")
|
||||
|
|
@ -1326,48 +1156,30 @@ You must disable CGAL_ENABLE_CHECK_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()
|
||||
include(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/list_of_whitelisted_headers.cmake
|
||||
OPTIONAL
|
||||
RESULT_VARIABLE has_list_of_whitelisted_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}")
|
||||
## Loop on package and headers
|
||||
set(check_pkg_target_list)
|
||||
if(POLICY CMP0057)
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
endif()
|
||||
#get build dir for removal from deps
|
||||
get_filename_component(BUILD_DIR ${CMAKE_BINARY_DIR} NAME)
|
||||
foreach(package ${CGAL_CONFIGURED_PACKAGES_NAMES})
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include)
|
||||
set(check_pkg_headers_depends "")
|
||||
if(has_list_of_documented_headers AND POLICY CMP0057)
|
||||
# Then recurse2
|
||||
file(
|
||||
GLOB_RECURSE ${package}_HEADERS
|
||||
file(GLOB_RECURSE ${package}_HEADERS #don't use a hard coded list because the ones for the documented headers is enough.
|
||||
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)
|
||||
foreach(header ${${package}_HEADERS})
|
||||
set(skip_hdr FALSE)
|
||||
if(POLICY CMP0057)
|
||||
if(has_list_of_documented_headers AND NOT header IN_LIST
|
||||
list_of_documented_headers)
|
||||
if(NOT header IN_LIST list_of_documented_headers)
|
||||
# message(STATUS "Skip non-documented header \"${header}\".")
|
||||
set(skip_hdr TRUE)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT VTK_FOUND)
|
||||
string(REGEX MATCH ".*vtk.*" is_a_vtk_header ${header})
|
||||
if(is_a_vtk_header)
|
||||
|
|
@ -1382,13 +1194,11 @@ VTK_FOUND is false.")
|
|||
LEDA_FOUND is false.")
|
||||
set(skip_hdr TRUE)
|
||||
endif()
|
||||
if(POLICY CMP0057)
|
||||
if(has_list_of_whitelisted_headers AND header IN_LIST
|
||||
list_of_whitelisted_headers)
|
||||
if(has_list_of_whitelisted_headers
|
||||
AND header IN_LIST list_of_whitelisted_headers)
|
||||
message(STATUS "Skip whitelisted header \"${header}\".")
|
||||
set(skip_hdr TRUE)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT skip_hdr)
|
||||
list(APPEND list_of_headers_to_test ${header})
|
||||
string(REPLACE "/" "__" header2 "${header}")
|
||||
|
|
@ -1456,7 +1266,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
|
|||
list(REMOVE_DUPLICATES packages_deps)
|
||||
endif()
|
||||
endforeach() # loop on packages
|
||||
|
||||
#Now check that a cpp file including all documented headers compiles
|
||||
file(WRITE ${CGAL_BINARY_DIR}/test_headers.cpp
|
||||
"#define BOOST_PARAMETER_MAX_ARITY 12 \n")
|
||||
|
|
|
|||
|
|
@ -24,17 +24,6 @@ if( NOT CGAL_COMMON_FILE_INCLUDED )
|
|||
set( CMAKE_2_6_3_OR_ABOVE FALSE )
|
||||
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 )
|
||||
find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
|
||||
if(CMAKE_UNAME)
|
||||
|
|
|
|||
|
|
@ -57,6 +57,12 @@ function(create_single_source_cgal_program firstfile )
|
|||
set(NO_TESTING TRUE)
|
||||
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} )
|
||||
|
||||
target_link_libraries(${exe_name} PRIVATE CGAL::CGAL)
|
||||
|
|
|
|||
|
|
@ -290,11 +290,10 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
|
||||
# To deal with imported targets of Qt5 and Boost, when CGAL
|
||||
# targets are themselves imported by another project.
|
||||
if(NOT CGAL_BUILDING_LIBS)
|
||||
|
||||
if (${component} STREQUAL "Qt5")
|
||||
find_package(Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools QUIET)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else(WITH_CGAL_${component})
|
||||
|
||||
|
|
@ -308,9 +307,8 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
|
||||
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})
|
||||
|
||||
else()
|
||||
|
|
@ -334,45 +332,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
|
||||
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 )
|
||||
# Avoid to modify the modules path twice
|
||||
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}/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()
|
||||
|
||||
macro ( fetch_env_var VAR )
|
||||
|
|
|
|||
|
|
@ -2,24 +2,6 @@ if(CGAL_Qt5_moc_and_resource_files_included)
|
|||
return()
|
||||
endif()
|
||||
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)
|
||||
if(EXISTS ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/CGAL.qrc)
|
||||
qt5_add_resources (_CGAL_Qt5_RESOURCE_FILES_private
|
||||
|
|
|
|||
|
|
@ -23,11 +23,6 @@
|
|||
# If set, the `LEDA` library will be searched and used to provide
|
||||
# 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)
|
||||
return()
|
||||
endif()
|
||||
|
|
@ -72,56 +67,47 @@ endif()
|
|||
#
|
||||
# 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``
|
||||
# keyword, or ``PUBLIC`` otherwise.
|
||||
# keyword.
|
||||
#
|
||||
function(CGAL_setup_CGAL_dependencies target)
|
||||
if(ARGV1 STREQUAL INTERFACE)
|
||||
set(keyword INTERFACE)
|
||||
else()
|
||||
set(keyword PUBLIC)
|
||||
endif()
|
||||
if(CGAL_DISABLE_GMP)
|
||||
target_compile_definitions(${target} ${keyword} CGAL_DISABLE_GMP=1)
|
||||
target_compile_definitions(${target} INTERFACE CGAL_DISABLE_GMP=1)
|
||||
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_MPFR TRUE CACHE INTERNAL "CGAL library is configured to use MPFR")
|
||||
endif()
|
||||
|
||||
if(WITH_LEDA)
|
||||
use_CGAL_LEDA_support(${target} ${keyword})
|
||||
endif()
|
||||
|
||||
if (NOT CGAL_HEADER_ONLY)
|
||||
target_compile_definitions(${target} ${keyword} CGAL_NOT_HEADER_ONLY=1)
|
||||
use_CGAL_LEDA_support(${target} INTERFACE)
|
||||
endif()
|
||||
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()
|
||||
|
||||
# CGAL now requires C++14. `decltype(auto)` is used as a marker of
|
||||
# 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})
|
||||
target_include_directories(${target} ${keyword}
|
||||
target_include_directories(${target} INTERFACE
|
||||
$<BUILD_INTERFACE:${dir}>)
|
||||
endforeach()
|
||||
target_include_directories(${target} ${keyword}
|
||||
target_include_directories(${target} INTERFACE
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
# Now setup compilation flags
|
||||
if(MSVC)
|
||||
target_compile_options(${target} ${keyword}
|
||||
target_compile_options(${target} INTERFACE
|
||||
"-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS")
|
||||
if(CMAKE_VERSION VERSION_LESS 3.11)
|
||||
target_compile_options(${target} ${keyword}
|
||||
target_compile_options(${target} INTERFACE
|
||||
/fp:strict
|
||||
/fp:except-
|
||||
/wd4503 # Suppress warnings C4503 about "decorated name length exceeded"
|
||||
|
|
@ -129,7 +115,7 @@ function(CGAL_setup_CGAL_dependencies target)
|
|||
)
|
||||
else()
|
||||
# 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:except->
|
||||
$<$<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)
|
||||
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!")
|
||||
target_compile_options(${target} ${keyword} "-DCGAL_DO_NOT_USE_BOOST_MP")
|
||||
target_compile_options(${target} INTERFACE "-DCGAL_DO_NOT_USE_BOOST_MP")
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
message( STATUS "Using Intel Compiler. Adding -fp-model strict" )
|
||||
if(WIN32)
|
||||
target_compile_options(${target} ${keyword} "/fp:strict")
|
||||
target_compile_options(${target} INTERFACE "/fp:strict")
|
||||
else()
|
||||
target_compile_options(${target} ${keyword} "-fp-model" "strict")
|
||||
target_compile_options(${target} INTERFACE "-fp-model" "strict")
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
|
||||
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")
|
||||
target_link_libraries(${target} ${keyword} "-library=stlport4")
|
||||
target_link_libraries(${target} INTERFACE "-library=stlport4")
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
if ( RUNNING_CGAL_AUTO_TEST )
|
||||
target_compile_options(${target} ${keyword} "-Wall")
|
||||
target_compile_options(${target} INTERFACE "-Wall")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3)
|
||||
message( STATUS "Using gcc version 4 or later. Adding -frounding-math" )
|
||||
if(CMAKE_VERSION VERSION_LESS 3.3)
|
||||
target_compile_options(${target} ${keyword} "-frounding-math")
|
||||
target_compile_options(${target} INTERFACE "-frounding-math")
|
||||
else()
|
||||
target_compile_options(${target} ${keyword} "$<$<COMPILE_LANGUAGE:CXX>:-frounding-math>")
|
||||
target_compile_options(${target} INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:-frounding-math>")
|
||||
endif()
|
||||
endif()
|
||||
if ( "${GCC_VERSION}" MATCHES "^4.2" )
|
||||
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()
|
||||
if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha" )
|
||||
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()
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -46,22 +46,16 @@ endif()
|
|||
#
|
||||
# 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``
|
||||
# keyword, or ``PUBLIC`` otherwise.
|
||||
# keyword.
|
||||
#
|
||||
|
||||
function(CGAL_setup_CGAL_Core_dependencies target)
|
||||
if(ARGV1 STREQUAL INTERFACE)
|
||||
set(keyword INTERFACE)
|
||||
else()
|
||||
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 )
|
||||
use_CGAL_GMP_support(CGAL_Core INTERFACE)
|
||||
target_compile_definitions(${target} INTERFACE CGAL_USE_CORE=1)
|
||||
target_link_libraries( CGAL_Core INTERFACE CGAL::CGAL )
|
||||
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -51,22 +51,14 @@ set(CGAL_ImageIO_FOUND TRUE)
|
|||
set_property(GLOBAL PROPERTY CGAL_ImageIO_FOUND TRUE)
|
||||
|
||||
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)
|
||||
target_include_directories( CGAL_ImageIO SYSTEM ${keyword} ${ZLIB_INCLUDE_DIRS})
|
||||
target_link_libraries( CGAL_ImageIO ${keyword} ${ZLIB_LIBRARIES})
|
||||
target_include_directories( CGAL_ImageIO SYSTEM INTERFACE ${ZLIB_INCLUDE_DIRS})
|
||||
target_link_libraries( CGAL_ImageIO INTERFACE ${ZLIB_LIBRARIES})
|
||||
|
||||
target_compile_definitions( CGAL_ImageIO ${keyword} CGAL_USE_ZLIB=1)
|
||||
if(NOT ARGV1 STREQUAL INTERFACE)
|
||||
set_target_properties(CGAL_ImageIO PROPERTIES CGAL_TARGET_USES_ZLIB TRUE)
|
||||
endif()
|
||||
target_compile_definitions( CGAL_ImageIO INTERFACE CGAL_USE_ZLIB=1)
|
||||
else()
|
||||
message( STATUS "NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ if(NOT CGAL_Qt5_MISSING_DEPS)
|
|||
|
||||
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
|
||||
${_CGAL_Qt5_MOC_FILES_private}
|
||||
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h
|
||||
|
|
@ -99,33 +99,26 @@ endif()
|
|||
#
|
||||
# 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``
|
||||
# keyword, or ``PUBLIC`` otherwise.
|
||||
# keyword.
|
||||
#
|
||||
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})
|
||||
target_compile_definitions( ${target} ${keyword} CGAL_FAKE_PUBLIC_RELEASE=1 )
|
||||
target_compile_definitions( ${target} INTERFACE CGAL_FAKE_PUBLIC_RELEASE=1 )
|
||||
endif()
|
||||
target_link_libraries( ${target} ${keyword} CGAL::CGAL)
|
||||
if(CGAL_HEADER_ONLY)
|
||||
target_link_libraries( ${target} ${keyword} CGAL::Qt5_moc_and_resources)
|
||||
endif()
|
||||
target_link_libraries( ${target} ${keyword} Qt5::OpenGL Qt5::Svg Qt5::Xml)
|
||||
target_link_libraries( ${target} INTERFACE CGAL::CGAL)
|
||||
target_link_libraries( ${target} INTERFACE CGAL::Qt5_moc_and_resources)
|
||||
target_link_libraries( ${target} INTERFACE Qt5::OpenGL Qt5::Svg Qt5::Xml)
|
||||
|
||||
# Remove -Wdeprecated-copy, for g++ >= 9.0, because Qt5, as of
|
||||
# version 5.12, has a lot of [-Wdeprecated-copy] warnings.
|
||||
if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
|
||||
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()
|
||||
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -1,77 +1,5 @@
|
|||
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) )
|
||||
message( FATAL_ERROR "CGAL needs for its full functionality both GMP and MPFR.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@ if ( CGAL_CONFIG_LOADED AND NOT CGAL_DONT_OVERRIDE_CMAKE_FLAGS )
|
|||
|
||||
string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER )
|
||||
|
||||
if ( CGAL_BUILD_SHARED_LIBS )
|
||||
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 ${CGAL_BUILD_TYPE_UPPER}" CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER} "${CGAL_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}_INIT}" )
|
||||
|
|
@ -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}}'" )
|
||||
|
||||
if ( CGAL_BUILDING_LIBS )
|
||||
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()
|
||||
|
||||
|
|
|
|||
|
|
@ -46,34 +46,29 @@ endif()
|
|||
# keyword, or ``PUBLIC`` otherwise.
|
||||
|
||||
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)
|
||||
message(FATAL_ERROR "CGAL requires GMP and MPFR.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
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()
|
||||
target_include_directories(${target} SYSTEM ${keyword}
|
||||
target_include_directories(${target} SYSTEM INTERFACE
|
||||
$<BUILD_INTERFACE:${GMP_INCLUDE_DIR}>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
endif()
|
||||
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()
|
||||
target_include_directories(${target} SYSTEM ${keyword}
|
||||
target_include_directories(${target} SYSTEM INTERFACE
|
||||
$<BUILD_INTERFACE:${MPFR_INCLUDE_DIR}>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
endif()
|
||||
if(WITH_GMPXX OR CGAL_WITH_GMPXX)
|
||||
target_include_directories(${target} SYSTEM ${keyword} ${GMPXX_INCLUDE_DIR})
|
||||
target_link_libraries(${target} ${keyword} ${GMPXX_LIBRARIES})
|
||||
target_compile_definitions(${target} ${keyword} CGAL_USE_GMPXX=1)
|
||||
target_include_directories(${target} SYSTEM INTERFACE ${GMPXX_INCLUDE_DIR})
|
||||
target_link_libraries(${target} INTERFACE ${GMPXX_LIBRARIES})
|
||||
target_compile_definitions(${target} INTERFACE CGAL_USE_GMPXX=1)
|
||||
endif()
|
||||
target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
|
||||
target_link_libraries(${target} INTERFACE ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -32,11 +32,6 @@ find_package(LEDA)
|
|||
# keyword, or ``PUBLIC`` otherwise.
|
||||
|
||||
function(use_CGAL_LEDA_support target)
|
||||
if(ARGV1 STREQUAL INTERFACE)
|
||||
set(keyword INTERFACE)
|
||||
else()
|
||||
set(keyword PUBLIC)
|
||||
endif()
|
||||
if(NOT LEDA_FOUND)
|
||||
message(FATAL_ERROR "use_CGAL_LEDA_support is use whereas LEDA_FOUND is false.")
|
||||
return()
|
||||
|
|
@ -45,12 +40,12 @@ function(use_CGAL_LEDA_support target)
|
|||
separate_arguments(LIST_LEDA_DEFINITIONS UNIX_COMMAND "${LEDA_DEFINITIONS} -DCGAL_USE_LEDA")
|
||||
|
||||
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()
|
||||
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()
|
||||
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_link_libraries(${target} ${keyword} ${LEDA_LIBRARIES} ${LEDA_LINKER_FLAGS})
|
||||
target_include_directories(${target} SYSTEM INTERFACE ${LEDA_INCLUDE_DIR})
|
||||
target_link_libraries(${target} INTERFACE ${LEDA_LIBRARIES} ${LEDA_LINKER_FLAGS})
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -30,11 +30,7 @@ if( MPFI_FOUND AND NOT MPFI_SETUP )
|
|||
add_definitions( ${MPFI_DEFINITIONS} "-DCGAL_USE_MPFI" )
|
||||
link_libraries( ${MPFI_LIBRARIES} )
|
||||
else( COMPILED_MPFI_TEST AND MPFI_TEST_RESULT EQUAL 0)
|
||||
if (CGAL_ENABLE_PRECONFIG)
|
||||
message( STATUS "MPFI is incorrectly configured with CGAL" )
|
||||
else()
|
||||
message( STATUS "MPFI is incorrectly configured on this system" )
|
||||
endif()
|
||||
message( STATUS
|
||||
"Output of the failed MPFI test was:\n${MPFI_TEST_COMPILATION_OUTPUT}" )
|
||||
message( STATUS "End of the MPFI test output" )
|
||||
|
|
|
|||
|
|
@ -5,30 +5,10 @@ set(CGAL_add_test_included TRUE)
|
|||
|
||||
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)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
cmake_policy(SET CMP0064 NEW)
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
|
|
@ -94,7 +74,7 @@ function(expand_list_with_globbing list_name)
|
|||
endfunction()
|
||||
|
||||
function(cgal_add_compilation_test exe_name)
|
||||
if(NOT POLICY CMP0064 OR TEST compilation_of__${exe_name})
|
||||
if(TEST compilation_of__${exe_name})
|
||||
return()
|
||||
endif()
|
||||
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>")
|
||||
set_property(TEST "check_build_system"
|
||||
APPEND PROPERTY LABELS "CGAL_build_system")
|
||||
if(POLICY CMP0066) # cmake 3.7 or later
|
||||
set_property(TEST "check_build_system"
|
||||
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()
|
||||
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)
|
||||
# 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)
|
||||
string(FIND "${_binary_dir_abs}" "${_source_dir_abs}" _search_binary_in_source)
|
||||
|
||||
if(_search_binary_in_source EQUAL "-1"
|
||||
AND POLICY CMP0066) # CMake 3.7 or later
|
||||
if(_search_binary_in_source EQUAL "-1")
|
||||
if(NOT TEST ${PROJECT_NAME}_SetupFixture)
|
||||
if(ANDROID)
|
||||
add_test(NAME ${PROJECT_NAME}_SetupFixture
|
||||
|
|
@ -280,7 +255,7 @@ function(cgal_add_test exe_name)
|
|||
set(test_name "execution___of__${exe_name}")
|
||||
endif()
|
||||
# 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()
|
||||
endif()
|
||||
# message("Add test ${test_name}")
|
||||
|
|
|
|||
|
|
@ -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}}'" )
|
||||
|
||||
if ( CGAL_BUILDING_LIBS )
|
||||
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()
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
function(CGAL_setup_target_dependencies target)
|
||||
if(ARGV1 STREQUAL INTERFACE)
|
||||
set(keyword INTERFACE)
|
||||
else()
|
||||
set(keyword PUBLIC)
|
||||
endif()
|
||||
|
||||
if(${target} STREQUAL CGAL)
|
||||
CGAL_setup_CGAL_dependencies(${target} ${keyword})
|
||||
CGAL_setup_CGAL_dependencies(${target})
|
||||
elseif(${target} STREQUAL CGAL_Core)
|
||||
CGAL_setup_CGAL_Core_dependencies(${target} ${keyword})
|
||||
CGAL_setup_CGAL_Core_dependencies(${target})
|
||||
elseif(${target} STREQUAL CGAL_ImageIO)
|
||||
CGAL_setup_CGAL_ImageIO_dependencies(${target} ${keyword})
|
||||
CGAL_setup_CGAL_ImageIO_dependencies(${target})
|
||||
elseif(${target} STREQUAL CGAL_Qt5)
|
||||
CGAL_setup_CGAL_Qt5_dependencies(${target} ${keyword})
|
||||
CGAL_setup_CGAL_Qt5_dependencies(${target})
|
||||
endif()
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ if(NOT USE_CGAL_FILE_INCLUDED)
|
|||
use_component( ${component} )
|
||||
endforeach()
|
||||
|
||||
use_essential_libs()
|
||||
|
||||
include_directories( "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
|
||||
if(TARGET CGAL::CGAL)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.12...3.18)
|
||||
project(CGAL_DEMOS)
|
||||
|
||||
if(CGAL_BRANCH_BUILD)
|
||||
|
|
@ -17,10 +17,8 @@ endif()
|
|||
|
||||
list(SORT list)
|
||||
|
||||
if(NOT CGAL_BUILDING_LIBS)
|
||||
find_package(CGAL REQUIRED)
|
||||
include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
|
||||
endif()
|
||||
|
||||
message("== Generating build files for demos ==")
|
||||
foreach(entry ${list})
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.12...3.18)
|
||||
project(CGAL_EXAMPLES)
|
||||
|
||||
if(CGAL_BRANCH_BUILD)
|
||||
|
|
@ -17,10 +17,8 @@ endif()
|
|||
|
||||
list(SORT list)
|
||||
|
||||
if(NOT CGAL_BUILDING_LIBS)
|
||||
find_package(CGAL REQUIRED)
|
||||
include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
|
||||
endif()
|
||||
|
||||
message("== Generating build files for examples ==")
|
||||
foreach(entry ${list})
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ set(CGAL_LIBRARIES CGAL)
|
|||
|
||||
get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
set(CGAL_HEADER_ONLY TRUE)
|
||||
|
||||
function(cgal_detect_branch_build VAR_NAME)
|
||||
if(IS_DIRECTORY ${CGAL_CONFIG_DIR}/../../../../Installation/package_info/Installation/)
|
||||
set(${VAR_NAME} TRUE PARENT_SCOPE)
|
||||
|
|
@ -81,21 +79,15 @@ include(${CGAL_MODULES_DIR}/CGAL_TweakFindBoost.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})
|
||||
if(NOT comp MATCHES "Core|ImageIO|Qt5")
|
||||
message(FATAL_ERROR "The requested CGAL component ${comp} does not exist!")
|
||||
endif()
|
||||
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()
|
||||
|
||||
set(CGALConfig_all_targets_are_defined TRUE)
|
||||
|
|
@ -138,15 +130,11 @@ include(CGAL_setup_target_dependencies)
|
|||
foreach(cgal_lib ${CGAL_LIBRARIES})
|
||||
set(WITH_${cgal_lib} TRUE)
|
||||
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)
|
||||
else()
|
||||
add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL)
|
||||
endif()
|
||||
if(NOT TARGET CGAL::${cgal_lib})
|
||||
add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib})
|
||||
endif()
|
||||
CGAL_setup_target_dependencies(${cgal_lib} INTERFACE)
|
||||
CGAL_setup_target_dependencies(${cgal_lib})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
@ -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 */
|
||||
|
||||
|
|
@ -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"
|
||||
)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.12...3.18)
|
||||
project(CGAL_TESTS)
|
||||
|
||||
if(CGAL_BRANCH_BUILD)
|
||||
|
|
@ -17,10 +17,8 @@ endif()
|
|||
|
||||
list(SORT list)
|
||||
|
||||
if(NOT CGAL_BUILDING_LIBS)
|
||||
find_package(CGAL REQUIRED)
|
||||
include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
|
||||
endif()
|
||||
|
||||
message("== Generating build files for tests ==")
|
||||
foreach(entry ${list})
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# 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 )
|
||||
|
||||
|
||||
|
|
@ -221,7 +222,7 @@ list(APPEND test_config_lst "test_config_file_3")
|
|||
if(CGAL_Qt5_FOUND)
|
||||
#configure cgal for a non standard install with 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}"
|
||||
WORKING_DIRECTORY "${NON_STANDARD_INSTALL_PREFIX}/non_standard_build_qt5")
|
||||
#install cgal in the non standard place
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
Installation
|
||||
Kernel_23
|
||||
Profiling_tools
|
||||
STL_Extension
|
||||
|
|
@ -1,22 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
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)
|
||||
|
||||
# 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
|
||||
# `Three.h`/`Three.cpp`.
|
||||
target_compile_definitions(demo_framework PRIVATE three_EXPORTS=1)
|
||||
if(CGAL_HEADER_ONLY)
|
||||
target_compile_definitions(demo_framework PRIVATE -DCGAL_USE_Qt5_RESOURCES)
|
||||
endif()
|
||||
|
||||
add_library(scene_basic_objects SHARED Scene_plane_item.cpp
|
||||
Scene_spheres_item.cpp)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -30,7 +30,7 @@ do
|
|||
fi
|
||||
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
|
||||
make -j$(nproc --all) -k check_headers
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ rm -fr demo/[A-Z]*
|
|||
rm -fr examples/[A-Z]*
|
||||
# Somehow -DWITH_CGAL_Core=OFF is not taken into account, hence the CORE files
|
||||
# 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
|
||||
echo " done"
|
||||
echo
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ run_test_on_platform()
|
|||
if [ ! -f "${INIT_FILE}" ]; then
|
||||
echo "error NEED A INIT FILE !"
|
||||
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
|
||||
CMAKE_OPTS="-DCGAL_TEST_SUITE=ON -DCMAKE_VERBOSE_MAKEFILE=ON"
|
||||
if [ -n "${SCRIPTS_DIR}" ]; then
|
||||
|
|
|
|||
|
|
@ -29,12 +29,10 @@
|
|||
#BLAS
|
||||
#LAPACK
|
||||
#OPENNL
|
||||
#QGLViewer (or implied by Qt4?)
|
||||
#ESBTL
|
||||
#NTL
|
||||
|
||||
#Core (implies GMP+GMPXX)
|
||||
#Qt4 (implies QT4)
|
||||
#ImageIO
|
||||
|
||||
#not (yet) supported
|
||||
|
|
@ -44,8 +42,6 @@
|
|||
|
||||
create_cmake_script_with_options()
|
||||
{
|
||||
qt4='n'
|
||||
|
||||
# parse options file
|
||||
if [ -e "$OPTIONS_FILE" ]; then
|
||||
|
||||
|
|
@ -114,9 +110,8 @@ fi
|
|||
if [ ! -z "$CGAL_COMPONENTS" ]; then
|
||||
# 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//[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}
|
||||
|
||||
# external libs
|
||||
|
|
@ -153,11 +148,6 @@ fi
|
|||
for cgal_component in $CGAL_COMPONENTS; do
|
||||
COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'`
|
||||
|
||||
# for qtmoc
|
||||
if [ "$COMPONENT" = "qt4" ]; then
|
||||
qt4='y'
|
||||
fi
|
||||
|
||||
done
|
||||
IFS=$OLDIFS
|
||||
|
||||
|
|
@ -241,31 +231,6 @@ EOF
|
|||
#-------------------------------------------------------------------------
|
||||
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
|
||||
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
cat << 'EOF'
|
||||
|
|
@ -308,22 +273,6 @@ EOF
|
|||
# add a new line
|
||||
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
|
||||
# Create an executable for each cpp that contains a function "main()"
|
||||
BASE=`basename $file .cc`
|
||||
|
|
@ -335,11 +284,7 @@ EOF
|
|||
BASE=`basename $BASE .C`
|
||||
egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ "$qt4" = "y" ]; then
|
||||
echo "create_single_source_cgal_program_qt4( \"$file\" )"
|
||||
else
|
||||
echo "create_single_source_cgal_program( \"$file\" )"
|
||||
fi
|
||||
if [ -n "$ENABLE_CTEST" ]; then
|
||||
if [ -f "$BASE.cin" ] ; then
|
||||
CIN=" < $BASE.cin"
|
||||
|
|
@ -384,73 +329,6 @@ EOF
|
|||
all="$all $file"
|
||||
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
|
||||
echo
|
||||
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 >&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 " -o options_file - file with PACKAGE, DIRECTORY, CGAL_COMPONENT, and BOOST_COMPONENT directives" >&2
|
||||
echo " -v the version" >&2
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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 //
|
||||
|
|
@ -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 //
|
||||
|
|
@ -24,7 +24,6 @@ GENERAL_BUILD_LOGFILE=''
|
|||
PLATFORM_BUILD_LOGFILE=''
|
||||
TEST_REPORT=''
|
||||
RESULT_FILE=''
|
||||
shared_or_static=''
|
||||
|
||||
#print_testresult <platform> <directory>
|
||||
# print result on stdout
|
||||
|
|
@ -67,74 +66,12 @@ print_testresult()
|
|||
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()
|
||||
{
|
||||
grep -e "^-- USING " ${PLATFORM_BUILD_LOGFILE} >> $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()
|
||||
{
|
||||
|
|
@ -271,17 +208,10 @@ echo "CGAL_TEST_PLATFORM ${CGAL_TEST_PLATFORM}" >> "$RESULT_FILE"
|
|||
echo "General installation log file: ${GENERAL_BUILD_LOGFILE}" >> "$RESULT_FILE"
|
||||
echo "Host-specific installation log file: ${PLATFORM_BUILD_LOGFILE}" >> "$RESULT_FILE"
|
||||
|
||||
parse_shared_or_static
|
||||
|
||||
output_main_logs
|
||||
|
||||
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
|
||||
if [ -d "$DIR" ] ; then
|
||||
echo " $DIR ..."
|
||||
|
|
|
|||
Loading…
Reference in New Issue