# The X3D Toolkit library is used to load and display a x3d scene. # You need to install the X3D library in order to compile this file. # See the <a="http://www-artis.imag.fr/Members/Yannick.Legoc">Yannick Le Goc web site</a> # (or <a="http://www-imagis.imag.fr/Membres/Yannick.Legoc/X3D/index.html">this page</a>). # Once this is done, edit <code>x3dViewer.pro</code>, set <code>LIBX3D_IS_INSTALLED</code> to # <code>yes</code> and set <code>INCLUDEPATH</code> and <code>LIBS</code> to the path where you # installed libX3D. # Press <b>L</b> (load) to load a new 3DS scene. TEMPLATE = app TARGET = x3dViewer CONFIG *= qt opengl warn_on release thread # Comment this line and set INCLUDEPATH and LIBS below LIBX3D_IS_INSTALLED = no !contains( LIBX3D_IS_INSTALLED, no ) { # Set these paths according to your configuration # INCLUDEPATH *= /Path/To/X3D/HeaderFiles # unix: LIBS *= -L/Path/To/X3D/library unix: LIBS *= -lX3DTK # win32:LIBS *= C:\code\lib\libx3d.lib HEADERS = x3dViewer.h SOURCES = x3dViewer.cpp main.cpp } contains( LIBX3D_IS_INSTALLED, no ) { message( x3dViewer requires the x3d library ) message( Read x3dViewer.pro for details ) QMAKE_LINK = echo } ## Windows Qt 2.3 users should uncomment the next 2 lines and remove ## all the remaining lines. ## See doc/download.html page for details on include and lib paths. #DEFINES *= QT_DLL QT_THREAD_SUPPORT #LIBS *= QGLViewer.lib # Unix : same INCLUDE_DIR and LIB_DIR parameters than for the make install unix { isEmpty( PREFIX ) { PREFIX=/usr/local } isEmpty( LIB_DIR ) { LIB_DIR = $$PREFIX/lib } isEmpty( INCLUDE_DIR ) { INCLUDE_DIR = $$PREFIX/include } INCLUDE_PATH = $$INCLUDE_DIR !exists( $$INCLUDE_DIR/QGLViewer/qglviewer.h ) { message( Unable to find QGLViewer/qglviewer.h in $$INCLUDE_PATH ) message( Use qmake INCLUDE_DIR~Path/To/QGLViewer/HeaderFiles ) error( Replace the ~ by the "equals" character in the above line ) } macx { LIB_NAME = libQGLViewer.*.dylib } else { LIB_NAME = libQGLViewer.so.* } !exists( $$LIB_DIR/$$LIB_NAME ) { message( Unable to find $$LIB_NAME in $$LIB_DIR ) message( You should run qmake LIB_DIR~Path/To/QGLViewer/Lib ) error( Replace the ~ by the "equals" character in the above line ) } # Path was correctly detected INCLUDEPATH *= $$INCLUDE_PATH DEPENDPATH *= $$INCLUDE_PATH LIBS *= -L$$LIB_DIR -lQGLViewer macx { LIBS *= -lobjc CONFIG -= thread } } # Windows configuration. # See doc/download.html page for details on include and lib paths. win32 { # Various compilation flags QMAKE_CXXFLAGS = -TP -G6 -W1 -GR -GX -Zi # Optimise for speed, and expand any suitable inlines QMAKE_CXXFLAGS_RELEASE = -O2 -Ob2 # Use the Qt DLL version DEFINES *= QT_DLL QT_THREAD_SUPPORT win32-msvc.net { LIBS *= libQGLViewer135 } else { LIBS *= QGLViewer.lib } }