Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] add 3rd-party flags to cgal example

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] add 3rd-party flags to cgal example


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] add 3rd-party flags to cgal example
  • Date: Wed, 03 Jul 2013 09:00:30 +0200
  • Organization: GeometryFactory

You can add in your cmake script:

find_library(OpenGL)

Then you can use the following variables:

# OPENGL_FOUND - system has OpenGL
# OPENGL_XMESA_FOUND - system has XMESA
# OPENGL_GLU_FOUND - system has GLU
# OPENGL_INCLUDE_DIR - the GL include directory
# OPENGL_LIBRARIES - Link these to use OpenGL and GLU

On my system FindOpenGL.cmake is in /usr/share/cmake-2.8/Modules

Have you seen this CGAL package:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/GraphicsView/Chapter_main.html

It should help you write a small demo.

Sebastien.

On 07/02/2013 04:45 PM, Raul Gallegos wrote:
Hello,

I am creating an example on CGAL and my code is GL/gl.h and GL/glut.h
libraries, to draw some simple points with opengl.

I want to add the corresponding flags (-lgl -lglu -lglut) to the
compilation of my program but I don't understand make or cmake commands
so I don't know where to put them.

I copied the cgal_create_CMakeLists script to my folder, then run it,
and it created a CMakeLists.txt file, then I run it with cmake . and
finally it gives me the Makefile, which I use to compile my code just
running make.

Thank you.

--
Raul O. Gallegos Hidalgo




Archive powered by MHonArc 2.6.18.

Top of Page