Chris
Chris

Reputation: 31266

Building CGAL correctly

I am building cgal with the following command:

git clone https://github.com/CGAL/cgal.git cgal;
cd cgal;
git checkout releases/CGAL-4.12-branch;
mkdir ../cgal_library;

cd ../cgal_library; cmake ../cgal -DCGAL_LIB=`pwd` -DCGAL_HEADER_ONLY=ON;

I then go into the cgal_library directory, and the only things present in the lib and include directories are:

include/
    CGAL/version.h


// and there is no lib dir, no headers whatsoever

Next, I install without the -DCGAL_HEADER_ONLY=ON flag, and all I get is a couple of images, which I cannot get another library's configure script to recognize as a valid cgal library:

include/
    CGAL/compiler_config.h version.h

lib/
    libCGAL_Core.so     libCGAL_Core.so.13.0.2  libCGAL_ImageIO.so.13          
    libCGAL.so     libCGAL.so.13.0.2
    libCGAL_Core.so.13  libCGAL_ImageIO.so      
    libCGAL_ImageIO.so.13.0.2  libCGAL.so.13     

So all I get are these image files and core objects--very few in number. I read the documentation, and I gather that there should be something in the include folder, and that the lib folder should have things in it, other than a few small object files.

How should I be compiling CGAL?

Upvotes: 0

Views: 423

Answers (1)

mgimeno
mgimeno

Reputation: 726

You specify in the cmake options that you want CGAL in HEADER-ONLY, that is why you don't have any lib. In HEADER-ONLY, you don't have to build CGAL, jsute give the path to the CGAL root directory as CGAL_DIR when building your program. If you want to build CGAL and have libs, make -DCGAL_HEADER_ONLY=OFF.

Upvotes: 1

Related Questions