← Back to team overview

yade-dev team mailing list archive

Re: new CGAL algorithms

 

> CGAL is a debian package you know?
Yes, but in non-free part. 
> Possible solution if we find license conflicts : I can easily split the 
> code into Yade engines using triangulations, and code doing the 
> triangulation that I would remove from Yade (TesselationWrapper class). 
> The Yade part would be compiled only if TesselationWrapper lib is found. 
> There would be only references to TesselationWrapper in Yade, and this 
> is not a CGAL class (one could even write another wrapper based on a 
> different library).
> What do you think of this option?

You don't even have to write wrappers, just use CGAL in plugins that
need it and mark the file YADE_REQUIRE_FEATURE(cgal) (works only for
file in pkg/, not extra). If will be compiled only if cgal is present --
cgal detection logic is even in SConstruct already, but I haven't tested
it since cgal packages want to install non-default boost libs. Just say
scons features=gts,vtk,cgal,log4cxx,python (or whatever you want).

We do it with VTK, GTS etc as well and I think it works well. For every
feature YADE_FEATURE macro is defined, so you can test that in your
files as well (YADE_CGAL in this case), if you want to compile them even
without CGAL.

Vaclav







Follow ups

References