To build CGAL from source on Windows you have to download an installer or tarball or you can clone the current development version of CGAL from GitHub. Below are the installation instructions for the installer.
Please note that the directory layout and build process of the development version on GitHub are different from the release version.
cl.exeto check the version.
The 32-bit and 64-bits binary versions of Boost are available on SourceForge.
The installers install both boost headers and precompiled libraries. Please note that the CGAL project is not responsible for the files provided on this web site. At the moment these lines were written, the latest version was 1.67.
I download and run the file boost_1_67_0-msvc-xx.0-32.exe (where xx = 12 for 2013)
I choose to extract the files to a new directory c:\dev\libboost_1_67_0
You then need to set the following two environment variables to point respectively to the path of the libraries and the headers
You also need to add the path to the Boost dll files in your PATH environment variable:
I add to my PATH environment variable C:\dev\libboost_1_67_0\lib32-msvc-xx.0
I select C:\Qt\Qt5.5.1 so QTDIR is set to C:\Qt\Qt5.5.1
I add C:\Qt\Qt5.5.1\5.5\msvcXXXX_XX\bin to my PATH
To avoid any conflict with another dll with the same name from another folder, add this path as the first in the list.
The procedure for getting Boost is the same as described for the 32-bit version, but all "32" must be replaced by "64".
Run the installer and select the version you want to install (this is only used to download the precompiled GMP and MPFR):
I choose C:\dev\CGAL-4.12 as installation directory
You now need to compile CGAL.
I set C:\dev\CGAL-4.12 for source and C:\dev\CGAL-4.12\build as binaries
Visual Studio xx xxxxfor the 32-bit version and
Visual Studio xx xxxx Win64for the 64-bit version.
Generate. a solution file named
CGAL.slnhas been created in the directory
ALL_BUILDproject both in Debug and Release.
I add to my PATH C:\dev\CGAL-4.12\build\bin
You can choose not to build CGAL libraries, but use it in header-only mode by checking
CGAL_HEADER_ONLY while configuring CGAL with cmake-gui.
Examples do not need Qt 5.
I set it to C:\dev\CGAL-4.12\example\Convex_hull_2
I set it to "C:\dev\CGAL-4.12\build-example\Convex_hull_2"
I open the file C:\dev\CGAL-4.12\build-examples\Convex_hull_2\Convex_hull_2_example.sln with Visual Studio
.execreated in the Debug or Release folder):
I open the C:\dev\CGAL-4.12\build-examples\Convex_hull_2\ch_timing.exe (the window automatically closes if not run from the console).
All demos need Qt 5.
I set it to C:\dev\CGAL-4.12\demo\Triangulation_3
I set it to "C:\dev\CGAL-4.12\build-demo\Triangulation_3"
I open the file C:\dev\CGAL-4.12\build-demo\Triangulation_3\Triangulation_3.sln with Visual Studio
From the desktop, right-click My Computer and click properties (on Vista/Win7 click Advanced system settings on the left side).