mirror of https://github.com/CGAL/cgal
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.
This commit is contained in:
parent
7412a02b3e
commit
0a150dd3d2
42
INSTALL.md
42
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).
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue