Setup CGAL in Windows 7: step-by-step tutorial

18 Jul

CGAL (Computational Geometry Algorithms Library) is a useful library for CAD/CAE/CAM users and developers. Below is a step-by-step tutorial on how to install CGAL in your windows system.

  1. Download the CGAL source code here. In this example, I choose Windows platform and Visual C++ as the IDE. If you are a lazy bird, you might try below links directly.
  2. If you download the setup.exe and run it, it is easy to extract it via the wizard:

    image image
    image image
    image image

  3. Now the story just begins, we have to build CGAL from the source, either extracted as shown above using CGAL-4.0.2-Setup.exe or manually unpacked from To build the source for Visual Studio, we need cmake, a cross-platform, open-source build system.You can download CMAKE here or go directly with the direct link of windows version.
  4. Yup, you need install it! Skipped, coz trivial, Smile
  5. Now, open a cmd window and cd to the directory you have installed/extracted CGAL:


    This activates the cmake-gui and takes the current directory “.” as the parameter.

  6. CMake is fired with the highlighted info automatically filled:


  7. Press configure button above, the configuration window pops, select the generator as below, click finish.
  8. It takes a while to configure CMAKE to build CGAL. But wait, you might find some errors pop up: in this case, it complains that Boost library is not found. It is recommended to download the setup installer for Boost 1.4.7, follow the setup wizard, you will be there!


  9. Unpack this boost zip file, and click “Add Entry” and add a “BOOST_ROOT” option and point it to the boost installation folder:



  10. Re-click the configure button. Most likely, you will succeed. In rare cases, after installation of boost 1.4.7, reboot, and then repeat from step 5 on. Now, success!
  11. Press Generate button, and all the Visual Studio 2010 solution/project files are generate!

Before                                                 After

Happy coding!


Posted by on July 18, 2012 in Programming


8 responses to “Setup CGAL in Windows 7: step-by-step tutorial

  1. Leonard Marks

    July 28, 2012 at 2:35 am

    great post

  2. jango_fx

    November 27, 2012 at 11:15 pm

    nice walkthrough. I get an error-message though right after Step 7: “Error in configuration process, project files may be invalid”

    The log says:
    CMake Error: CMake was unable to find a build program corresponding to “Visual Studio 10”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
    CMake Error: Could not find cmake module file:C:/CGAL-4.1/CMakeFiles/CMakeCXXCompiler.cmake
    CMake Error: Could not find cmake module file:C:/CGAL-4.1/CMakeFiles/CMakeCCompiler.cmake
    Configuring incomplete, errors occurred!

    I tried different versions of CGAL, but no matter which generator i choose. it ends up with the same result…

    You don’t happen to have any idea whats wrong there??

  3. AmirKari

    October 13, 2013 at 3:20 am

    Thank you so much. 🙂 Finally, it woks! 🙂

  4. Joel Neums

    June 17, 2015 at 5:17 pm

    You have made my week! I was struggling with this for so long but this way finally worked!

  5. Mantas

    November 17, 2015 at 2:45 am

    I getsame error…

    nice walkthrough. I get an error-message though right after Step 7: “Error in configuration process, project files may be invalid”

    does not work… tryied different configurations, no result

  6. Toan Ho Quoc

    April 18, 2016 at 2:19 am

    Thank you for saving my life 😀 :D.. I stuck with boost library in the whole time.
    Thanks again.

  7. Michał Michalak

    October 20, 2016 at 3:07 am

    Great, after hours (maybe days) of struggling it showed up “configurating done” ;_)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: