config.h
1 /****************************************************************************
2 
3  Copyright (C) 2002-2008 Gilles Debunne. All rights reserved.
4 
5  This file is part of the QGLViewer library version 2.3.10.
6 
7  http://www.libqglviewer.com - contact@libqglviewer.com
8 
9  This file may be used under the terms of the GNU General Public License
10  versions 2.0 or 3.0 as published by the Free Software Foundation and
11  appearing in the LICENSE file included in the packaging of this file.
12  In addition, as a special exception, Gilles Debunne gives you certain
13  additional rights, described in the file GPL_EXCEPTION in this package.
14 
15  libQGLViewer uses dual licensing. Commercial/proprietary software must
16  purchase a libQGLViewer Commercial License.
17 
18  This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
19  WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 
21 *****************************************************************************/
22 
24 // libQGLViewer configuration file //
25 // Modify these settings according to your local configuration //
27 
28 #ifndef QGLVIEWER_CONFIG_H
29 #define QGLVIEWER_CONFIG_H
30 
31 #define QGLVIEWER_VERSION 0x02030A
32 
33 // Needed for Qt < 4 (?)
34 #ifndef QT_CLEAN_NAMESPACE
35 # define QT_CLEAN_NAMESPACE
36 #endif
37 
38 // Get QT_VERSION and other Qt flags
39 // Cannot use <QtCore/qglobal.h> for backward compatibility
40 #include <qglobal.h>
41 
42 #if QT_VERSION < 0x030000
43 # ifdef _OS_WIN32_
44 # define Q_OS_WIN32
45 # endif
46 #endif
47 
48 // Win 32 DLL export macros
49 #ifdef Q_OS_WIN32
50 # ifndef M_PI
51 # define M_PI 3.14159265358979323846f
52 # endif
53 # ifndef QGLVIEWER_STATIC
54 # ifdef CREATE_QGLVIEWER_DLL
55 # if QT_VERSION >= 0x040500
56 # define QGLVIEWER_EXPORT Q_DECL_EXPORT
57 # else
58 # define QGLVIEWER_EXPORT __declspec(dllexport)
59 # endif
60 # else
61 # if QT_VERSION >= 0x040500
62 # define QGLVIEWER_EXPORT Q_DECL_IMPORT
63 # else
64 # define QGLVIEWER_EXPORT __declspec(dllimport)
65 # endif
66 # endif
67 # endif
68 # ifndef __MINGW32__
69 # pragma warning( disable : 4251 ) // DLL interface, needed with Visual 6
70 # pragma warning( disable : 4786 ) // identifier truncated to 255 in browser information (Visual 6).
71 # endif
72 #endif // Q_OS_WIN32
73 
74 // For other architectures, this macro is empty
75 #ifndef QGLVIEWER_EXPORT
76 # define QGLVIEWER_EXPORT
77 #endif
78 
79 // OpenGL includes - Included here and hence shared by all the files that need OpenGL headers.
80 #if QT_VERSION >= 0x040000
81 # include <QGLWidget>
82 #else
83 # include <qgl.h>
84 #endif
85 
86 // Old Qt versions require GLUT for text rendering
87 #define QGLVIEWER_QT_VERSION_WITHOUT_GLUT 0x030100
88 #if QT_VERSION < QGLVIEWER_QT_VERSION_WITHOUT_GLUT
89 # ifdef Q_OS_MAC
90 # include <GLUT/glut.h>
91 # else
92 # ifdef Q_OS_WIN32
93 # include <glut.h>
94 # else
95 # include <GL/glut.h>
96 # endif
97 # endif
98 #endif
99 
100 // Container classes interfaces changed a lot in Qt.
101 // Compatibility patches are all grouped here.
102 #if QT_VERSION >= 0x040000
103 # include <QList>
104 # include <QVector>
105 #else
106 # define qMax(a,b) QMAX(a,b)
107 # include <qptrlist.h>
108 # include <qvaluevector.h>
109 #endif
110 
111 // Support for the no_keywords CONFIG option on previous Qt versions
112 #if QT_VERSION < 0x040400
113 # define Q_SLOTS slots
114 # define Q_SIGNALS signals
115 # define Q_EMIT emit
116 #endif
117 
118 // These instructions are needed sinc QT 4.8 no longer depends on glu, so we
119 // have to include it here explicitly
120 # ifdef Q_OS_MAC
121 # include <GLUT/glut.h>
122 # else
123 # include <GL/glu.h>
124 # endif
125 
126 // For deprecated methods
127 // #define __WHERE__ "In file "<<__FILE__<<", line "<<__LINE__<<": "
128 // #define orientationAxisAngle(x,y,z,a) { std::cout << __WHERE__ << "getOrientationAxisAngle()." << std::endl; exit(0); }
129 
130 // Patch for gcc version <= 2.95. Seems to no longer be needed with recent Qt versions.
131 // Uncomment these lines if you have error message dealing with operator << on QStrings
132 // #if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ < 3) && (__GNUC_MINOR__ < 96)
133 // # include <iostream>
134 // # include <qstring.h>
135 // std::ostream& operator<<(std::ostream& out, const QString& str)
136 // { out << str.latin1(); return out; }
137 // #endif
138 
139 #endif // QGLVIEWER_CONFIG_H