Search code examples
c++qtqt-creatorcgal

How do you include CGAL into a QT project in QT Creator?


I am trying to run some of the sample example code from CGAL as a Qt project, to run in Qt Creator. I expect that I will have to modify the .pro file. How should it be modified to use CGAL libraries?


Solution

  • I'm not familiar with CGAL specifically, but in general, you would need to add the following to your .pro file:

    INCLUDEPATH += /path/to/cgal/headers
    
    LIBS += -Lpath/to/cgal/libraries -lcgal_dll_name
    

    You may also need to add some DEFINES if CGAL requires it, i.e.

    DEFINES += SOME_MACRO_THAT_CGAL_REQUIRES
    

    If you were looking for help on CGAL specifically, please clarify your question and I will delete this answer.