I am trying to compile a cgal demo called AABB_tree. I am not very good with Cmake so I have tried-
- created a QtWidget project in QtCreator in D:\CC++\Qt\demo with qmake.
- deleted the default generated files(mainwindow.h, mainwindow.ui, etc....)
- Added the given demo files in my project and copied the Resources folder to demo directory.
- copied the necessary third party libraries to demo directory.
- After that my demo
looks like this
My .pro files contains
QT += core gui opengl svg
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++14
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
INCLUDEPATH += boost_1_80_0 \
gmp_x64-windows-static\include \
mpfr_x64-windows-static\include \
CGAL-5.5\include
SOURCES += \
main.cpp \
MainWindow.cpp \
Scene.cpp \
Viewer.cpp \
benchmarks.cpp
LIBS += -LD:\CC++\Qt\demo\gmp_x64-windows-static\lib -lgmp \
-LD:\CC++\Qt\demo\mpfr_x64-windows-static\lib -lmpfr
HEADERS += \
Color_ramp.h \
MainWindow.h \
Refiner.h \
Scene.h \
Viewer.h \
types.h
FORMS += \
MainWindow.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
AABB_demo.qrc
The main file contains
#include "MainWindow.h"
#include <QApplication>
#include <CGAL/Qt/resources.h>
#include <QMimeData>
#include <CGAL/Qt/init_ogl_context.h>
int main(int argc, char **argv)
{
CGAL::Qt::init_ogl_context(4,3);
QApplication app(argc, argv);
app.setOrganizationDomain("inria.fr");
app.setOrganizationName("INRIA");
app.setApplicationName("AABB tree demo");
// Import resources from libCGALQt (Qt5).
CGAL_QT_INIT_RESOURCES;
MainWindow mainWindow;
mainWindow.show();
QStringList args = app.arguments();
args.removeAt(0);
if(!args.empty() && args[0] == "--use-meta")
{
mainWindow.setAddKeyFrameKeyboardModifiers(::Qt::MetaModifier);
args.removeAt(0);
}
Q_FOREACH(QString filename, args)
mainWindow.open(filename);
return app.exec();
}
#include "Scene.cpp"
#include "Scene_moc.cpp"
#include "benchmarks.cpp"
#include "Viewer.cpp"
#include "Viewer_moc.cpp"
#include "MainWindow.cpp"
#include "MainWindow_moc.cpp"
The
is that the demo does not include the following source files
- Scene_moc.cpp
- Viewer_moc.cpp
- MainWindow_moc.cpp
- ui_ImageInterface.h
Is it on the user to construct those files? Is there any complete demo or example available?