Installing CGAL and related programs on Windows operating system
This page explains how to install CGAL 4.9 with Boost 1.59.0 and Qt5 5.7.1 on Windows 8 using Visual Studio 12 (2013) generating 64 bit binaries. The same procedure should apply to earlier versions of Windows.
Note that during the entire setup you need Internet connection!
Note that the installation requires significant disk space. Make sure to free enough disk space before the installation.
Instructions on adding Environment Variables in Windows are at the end.
IMPORTANT: make sure that you install everything in 64-bit.
- Visual Studio 12 Professional (recommended) or Express.
Professional - Students can get a free version from https://www.dreamspark.com
- Boost 1.59.0: http://www.boost.org/doc/libs/1_59_0/more/getting_started/windows.html
- CMake 3.7.1: cmake-3.7.1-win64-x64.msi
- CGAL 4.9.0 - https://gforge.inria.fr/frs/download.php/32993/CGAL-4.9-Setup.exe
- Qt5 5.7.1 - http://download.qt.io/official_releases/qt/5.7/5.7.1/qt-opensource-windows-x86-msvc2013_64-5.7.1.exe
In parentheses are the paths on my computer.
- If you use the offline version, choose to install Visual C++.
- Accept the license terms.
- You may select a custom installation (instead of full) and select only Visual C++ (unselect other features).
- You don't need to install "SQL Server" & "Silverlight Runtime" although you may.
- There is a chance that it is recommended to reboot now.
- Open a command-line terminal, such as 'cmd'.
- Make the compiler known by running the following batch file:
c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat
- Download the boost archive, unpack it to a target directory of
your choice (e.g., C:\boost\boost_1_55_0), and change directory to
- Then, build the static, shared, single and multi threaded boost libraries:
.\b2 link=static,shared threading=single,multi variant=debug,release
- Make sure the subdirectory stage\lib\ has been populated with the compiled libraries (both .lib and .dll files).
- -Agree to the license.
- Check "Add CMake to the system PATH for all users".
- Check "create desktop icon".
- Next, Next, Next.
- Agree to the license.
- Next, Next, Next, Install.
- Add QTDIR variable with the value C:\Qt\5.7.1 to the environment variables (if it's not already there).
- Add <QT>\bin to the system PATH. (C:\Qt\5.7.1\bin)
- install the addin (Is it still necessary in VC 12?)
- CGAL installation will need to connect to the internet for GMP and MPFR.
- Be amazed by the splash screen.
- Agree to the license.
- Just choose the default: with GMP and MPFR, and with examples and demos.
- 64-bit (for me).
- In the "Setting Environment Variables" screen, choose all users and make sure that CGAL_DIR is checked.
- Add <CGAL_DIR >\auxiliary\gmp\lib to the system PATH. (C:\Program Files\CGAL-4.9\auxiliary\gmp\lib)
- Open CMake - cmake-gui (on the Desktop) - if you are using win7 make sure you open the program in administrator mode - right click on the icon and click on "run as administrator".
- For both "Where is the source code" and "Where to build the binaries" specify the CGAL Installation folder (C:\Program Files\CGAL-4.9)
- Click Configure.
- Choose "Visual Studio 12 2013" and click "Finish"
- Click Generate
- A solution named CGAL was created in the directory.
- Compile ALL_BUILD project both in Debug and Release (ignore the compilation error in CGAL_imageIO).
- All CGAL libraries should be under the lib directory.
- Open CMake (cmake-gui, can be found on the desktop) - (for win7 users, use "Run as admin")
- Choose "Where is the source code:" to be the Triangulation_2 demo directory under the CGAL installation. Namely, <CGAL>/demo/Triangulation_2 (C:\Program Files\CGAL-4.9/demo/Triangulation_2).
- Choose "Where to build the binaries:" to the same directory.
- Click Configure
- Click Generate
- Go to the directory (C:\Program Files\CGAL-4.9) and open the solution and compile. Run the Delaunay_triangulation project for check (in debug and release)
- Right-click on the selected project and select "Properties".
Setting up PATH variable or other Environment variables on windows systems
- From the desktop, right-click My Computer and click properties.
- (on Vista/Win7/Win8 click Advanced system settings on the left side)
- In the System Properties window, click on the Advanced tab.
- In the Advanced section, click the Environment Variables button.
in the Environment Variables window, highlight the path variable in the
Systems Variable section and click edit. Add or modify the path lines
with the paths you wish the computer to access. Each different directory
is separated with a semicolon as shown below.