0

I've built the Ceres package and its dependencies, now I'm trying to use the CGAL library to perform smoothing but I'm getting an error: "area-based smoothing requires ceres library".

How am I to incorporate the Ceres library? The CGAL smoothing example doesn't mention this and does not have any includes from the Ceres library.

I'm using CGAL in header-only mode without compilation, is it necessary to compile CGAL first?

James
  • 339
  • 3
  • 16

1 Answers1

2

In the cmake script of the examples using the smoothing, you can see the following line:

target_compile_definitions( mesh_smoothing_example PRIVATE CGAL_PMP_USE_CERES_SOLVER )

it is equivalent to add #define CGAL_PMP_USE_CERES_SOLVER in your code.

The rational is that if the lib is not found by cmake, the code will be disabled.

I agree that it is not correctly documented. An issue/PR has already been opened to improve the situation.

sloriot
  • 6,070
  • 18
  • 27
  • The new vcpkg for CGAL has since made installs of CGAL including Ceres integration very simple. – James Feb 11 '20 at 21:37
  • @James hi sorry to come back to this one year later. But what is the command for vcpkg to integrate `ceres` into `CGAL`? I'm having trouble finding this information – Jack Apr 13 '21 at 09:33