From 0a150dd3d28b2252d5f0d20057013cf6377a069e Mon Sep 17 00:00:00 2001 From: Oleg Alexandrov Date: Sat, 14 Dec 2019 09:43:19 -0800 Subject: [PATCH] Improve the instructions The compilation instructions have been very confusing. Its first section suggests that no libraries are needed and no CMakeLists is needed. Also the same block of code is repeated three times. I removed the redundant and incorrect first section, made it clear early on how to create a CMakeLists.txt, and that linking to external libraries is necessary. I did not remove any information. --- INSTALL.md | 42 +++++++----------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 8913be934e0..ad26ab28e34 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,41 +1,7 @@ -NOTICE -====== - -Since Version 5.0, CGAL is a header-only library it is not needed -to build and install it. Usage of CGAL should thus simply amount to: - -``` {.bash} -git clone https://github.com/CGAL/cgal.git /path/to/cgal.git -cd /path/to/cgal.git/Triangulation_2/examples/Triangulation_2 -mkdir -p build/debug -cd build/debug -cmake -DCMAKE_BUILD_TYPE=Debug -DCGAL_DIR=/path/to/cgal.git -make -``` - -in the case of the building of an example in debug mode. - -For more information head over to the [CGAL manual](https://doc.cgal.org/latest/Manual/general_intro.html). -Note that this page describes the setting of CGAL as a sources release and, as such, -files are organized in a slightly different way, see the [Layout of the CGAL Git Repository](README.md). - - Building a Program Using CGAL ============================= -To compile a program using CGAL, simply set `CGAL_DIR` to the location -of the directory containing `CGALConfig.cmake` (for example the root -of the extracted source archive or the root of a git checkout). - -Here is an example of how to build in debug the examples from the 3D Triangulations package: - -``` {.bash} - cd /path/to/cgal.git/Triangulation_3/examples/Triangulation_3 - mkdir -p build/debug - cd build/debug - cmake -DCGAL_DIR:PATH=/path/to/cgal.git ../.. - make -``` +Since Version 5.0, CGAL is header-only, hence it does not create a library. It needs however to link to the external libraries GMP and MPRF. If you are trying to build examples or tests that do not already have a `CMakeLists.txt`, you can trigger its creation by calling the script [`cgal_create_cmake_script`](Scripts/scripts/cgal_create_cmake_script) @@ -52,4 +18,10 @@ Here is an example for the examples of the 2D Triangulation package: make ``` +Note that this page describes the setting of CGAL as a sources release and, as such, +files are organized in a slightly different way, see the [Layout of the CGAL Git Repository](README.md). + For more information head over to the [CGAL manual](https://doc.cgal.org/latest/Manual/general_intro.html). + + +