Subject: CGAL users discussion list
List archive
- From: Martin Baeker <>
- To:
- Subject: Re: [cgal-discuss] Setting up cmake
- Date: Thu, 4 Mar 2010 14:46:30 +0100 (CET)
- Organization: Institut fuer Werkstoffe TU Braunschweig
Dear EriC,
thanks for the hint, but as I said this script does not resolve the
dependencies between the files.
Martin.
> Martin Baeker wrote:
> > Dear all,
> >
> > I have a program library based on CGAL3.3. It consists of several
> > C++-Classes, each with its own .hpp and .cpp-file.
> > I am at a loss on how to achieve the same thing with newer versions of
> > CGAL that use cmake. The cgal_create_cmake_script is not sufficient
> > because
> > I need to link to the library from my classes together when building
> > an executable. OTOH, I need correct compilation with all CGAL-stuff as
> > well.
> >
> > Here is a very simple example (not meaningfulin itself) of what I want to
> > do:
> >
> > File Pointclass.H
> >
> > #include <CGAL/Gmpq.h>
> > #include <CGAL/Cartesian.h>
> >
> > typedef CGAL::Cartesian<CGAL::Gmpq> Kernel;
> > typedef Kernel::Point_3 Point;
> >
> > class Mypoint: public Point
> > {
> > public:
> > int index;
> > Mypoint(int in);
> > };
> >
> > File Pointclass.C
> >
> > #include "Pointclass.H"
> >
> > Mypoint::Mypoint(int in)
> > {
> > index = in;
> > }
> >
> > File main.C
> >
> > #include "Pointclass.H"
> >
> > int main()
> > {
> > Mypoint p(1);
> > std::cout << p.index << std::endl;
> > return 0;
> >
> > }
> >
> >
> > So how do I set up cmake so that main can be linked to Pointclass and
> > that the dependence of the two is known?
> >
> > I suppose there is a simple way how to do this, but I'm not able to
> > find it...
> >
> > Thanks for any help,
>
>
> if you switch to CGAL-3.4 (or better upcoming 3.6) there is
>
> cgal_create_cmake_script located in scripts subdir that does the job for
> you,
> i.e., write a proper CMakeLists.txt file.
>
> eriC
>
> >
> > Martin.
> >
> > Priv.-Doz. Dr. Martin Bäker
> > Institut für Werkstoffe
> > Technische Universität Braunschweig
> > Langer Kamp 8
> > 38106 Braunschweig
> > Germany
> > Tel.: 00-49-531-391-3073
> > Fax 00-49-531-391-3058
> > <>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>
>
Priv.-Doz. Dr. Martin Bäker
Institut für Werkstoffe
Technische Universität Braunschweig
Langer Kamp 8
38106 Braunschweig
Germany
Tel.: 00-49-531-391-3073
Fax 00-49-531-391-3058
<>
- [cgal-discuss] Setting up cmake, Martin Baeker, 03/04/2010
- Re: [cgal-discuss] Setting up cmake, Eric Berberich, 03/04/2010
- Re: [cgal-discuss] Setting up cmake, Martin Baeker, 03/04/2010
- Re: [cgal-discuss] Setting up cmake, Eric Berberich, 03/04/2010
- Re: [cgal-discuss] Setting up cmake, Martin Baeker, 03/04/2010
- Re: [cgal-discuss] Setting up cmake, Eric Berberich, 03/04/2010
- Re: [cgal-discuss] Setting up cmake, Martin Baeker, 03/04/2010
- Re: [cgal-discuss] Setting up cmake, Eric Berberich, 03/04/2010
Archive powered by MHonArc 2.6.16.