From OpenFOAMWiki

1 Introduction

This page aims to collect answers for frequently asked questions how to build CGAL, when using OpenFOAM's own makeCGAL script(s). Feel free to extend this page with more details.

2 Error message: "No rule to make target `/usr/.../', needed by `lib/'"

Known to happen with CGAL 4.
Reason is a library that isn't used by OpenFOAM and it might get built if the CMake build rules that CGAL uses pick up that OpenGL is supported on the current system, but then fails to find the correct library.
The solution is to disable this option from being built at all, by running the following steps:
  1. Go into the ThirdParty folder by running this command:
  2. Use the following command to disable this option:
    sed -e 's/\(Release\)/\1 -DWITH_CGAL_ImageIO=OFF/' makeCGAL
  3. Now it's possible to proceed with the installation instructions.