# The LGPL lib3ds library is used to load and display a 3ds scene. # You need to install the lib3ds library (version 1.2) in order to compile this file. # See <a href="http://lib3ds.sourceforge.net/">http://lib3ds.sourceforge.net/</a>. # The current version (Ver 1.2, Dec 2002) of the lib3ds library is flawed and a patched # version is available on the <a href="../rpm.html">libQGLViewer rpm page</a>. # Alternately, you can add the following line in <code>lib3ds/file.h</code> : # extern LIB3DSAPI void lib3ds_file_bounding_box(Lib3dsFile *file, Lib3dsVector min, Lib3dsVector max); # Once this is done, edit <code>3dsViewer.pro</code>, set <code>LIB3DS_IS_INSTALLED</code> to # <code>yes</code> and set <code>INCLUDEPATH</code> and <code>LIBS</code> to the path where you # installed lib3ds. # Press '<b>L</b>' (load) to load a new 3DS scene. TEMPLATE = app TARGET = 3dsViewer CONFIG += qt opengl warn_on release thread # Comment this line and set INCLUDEPATH and LIBS below LIB3DS_IS_INSTALLED = no !contains( LIB3DS_IS_INSTALLED, no ) { # Set these paths according to your configuration # INCLUDEPATH *= /Path/To/3DS/HeaderFiles # unix: LIBS *= -L/Path/To/3DS/library unix: LIBS *= -l3ds # win32:LIBS *= C:\code\lib\lib3ds.lib HEADERS = 3dsViewer.h SOURCES = 3dsViewer.cpp main.cpp } contains( LIB3DS_IS_INSTALLED, no ) { message( 3dsViewer requires the lib3ds library ) message( Read 3dsViewer.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 } }