2

I'm a Linux newbie but nevertheless I want to install SFCGAL on OSGeoLive Virtual Machine (this is Ubuntu 14.04.4. LTS trusty). So first of all I had to get the dependencies, e.g. CGAL. Unfortunately there is only CGAL 4.2 available (at least 4.3 required) "in the packages", therefore I had to compile a newer version from source. But now I have CGAL 4.2 AND 4.6 whereas the latter is located in /home/user/src/CGAL-4.6.3/ and I don't know where is 4.2... Thus, as expected, when trying to compile SFCGAL with cmake . && make && sudo make install I get the following error:

CMake Error at cmake/Modules/FindCGAL.cmake:32 (message):
CGAL 4.3 is required (found 4.2 in /usr/include/CGAL/version.h)

I thought about specifying the CGAL_DIR manually, as mentioned at https://oslandia.github.io/SFCGAL/installation.html, but it didn't work (maybe just because I don't know how to specify this correctly).

Can somebody please tell me, how to specify the path of "new" CGAL (whether via cmake or as global variable)? Or maybe is it possible to replace the older CGAL version with the newer one?

1 Answer 1

2

To specify CGAL_DIR variable, there are two solutions:

  • you can either define it in one terminal by a command like

    export CGAL_DIR="${HOME}"/CGAL-4.7

BEFORE to run cmake.

  • or you can define it in cmake by a command like:

    cmake -DCGAL_DIR=$HOME/CGAL-4.7 .

In order to simplify the updating of variable, you can use a graphical tool to run cmake, like

cmake-gui .

then modify the variable in this tools.

1
  • Thank you, it worked. I just wasn't familiar with that "$..." syntax.
    – Muad
    Commented Apr 1, 2016 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.