/
examples.pri
121 lines (99 loc) · 3.45 KB
/
examples.pri
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
QT *= xml opengl widgets gui
CONFIG += qt opengl warn_on thread rtti console embed_manifest_exe no_keywords
# Set path to include and lib files (see doc/compilation.html for details):
# Uncomment and tune these paths according to your configuration.
#INCLUDEPATH *= C:/Users/debunne/Documents/libQGLViewer-VERSION
#LIBS *= -LC:/Users/debunne/Documents/libQGLViewer-VERSION/QGLViewer -lQGLViewer2
# --------------------------------------------------------------------------------------
# The rest of this file sets these paths so that the examples
# can be compiled out of the box
ROOT_DIRECTORY = ../..
contains( _PRO_FILE_PWD_, ".*designerPlugin$" ) {
ROOT_DIRECTORY = ..
}
contains( _PRO_FILE_PWD_, ".*/contribs/.+/.+" ) {
ROOT_DIRECTORY = ../../../..
} else {
contains( _PRO_FILE_PWD_, ".*/contribs/.+" ) {
ROOT_DIRECTORY = ../../..
}
}
INCLUDE_DIR = $${ROOT_DIRECTORY}
LIB_DIR = $${ROOT_DIRECTORY}/QGLViewer
# Include path, taking QGLViewer path prefix into account
INCLUDEPATH *= $${INCLUDE_DIR}
DEPENDPATH *= $${INCLUDE_DIR}
unix {
CONFIG -= debug debug_and_release
CONFIG *= release
isEmpty( QGLVIEWER_STATIC ) {
# The absolute path where the library or framework was found
LIB_DIR_ABSOLUTE_PATH = $$dirname(PWD)/QGLViewer
macx|darwin-g++ {
# Use install_name_tool to set the absolute path of the lib in the executable
exists( $${LIB_DIR_ABSOLUTE_PATH}/QGLViewer.framework ) {
!plugin:QMAKE_POST_LINK=install_name_tool -change QGLViewer.framework/Versions/2/QGLViewer $${LIB_DIR_ABSOLUTE_PATH}/QGLViewer.framework/Versions/2/QGLViewer $${TARGET}.app/Contents/MacOS/$${TARGET} #VERSION_MAJOR
LIBS += -F$${LIB_DIR_ABSOLUTE_PATH} -framework QGLViewer
} else {
!plugin:QMAKE_POST_LINK=install_name_tool -change libQGLViewer.2.dylib $${LIB_DIR_ABSOLUTE_PATH}/libQGLViewer.2.dylib $${TARGET}.app/Contents/MacOS/$${TARGET} #VERSION_MAJOR
LIBS *= -L$${LIB_DIR} -lQGLViewer
}
} else {
isEmpty( NO_QT_VERSION_SUFFIX ) {
equals (QT_MAJOR_VERSION, 4) {
LIB_NAME = QGLViewer-qt4
}
equals (QT_MAJOR_VERSION, 5) {
LIB_NAME = QGLViewer-qt5
}
}
isEmpty(QMAKE_LFLAGS_RPATH) {
!plugin:QMAKE_LFLAGS += -Wl,-rpath,$${LIB_DIR_ABSOLUTE_PATH}
} else {
!plugin:QMAKE_RPATHDIR *= $${LIB_DIR_ABSOLUTE_PATH}
}
LIBS *= -L$${LIB_DIR} -l$${LIB_NAME}
}
} else {
LIBS *= $${LIB_DIR}/libQGLViewer.a
}
# Intermediate files are created in hidden folders
MOC_DIR = .moc
OBJECTS_DIR = .obj
}
macx|darwin-g++ {
# Or whatever exists in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
QMAKE_MAC_SDK = macosx10.15
}
win32 {
# Seems to be needed for Visual Studio with Intel compiler
DEFINES *= WIN32
# Use native OpenGL drivers with Qt5.5
# No longer implicit since the ANGLE driver is now an alternative
LIBS += -lopengl32 -lglu32
isEmpty( QGLVIEWER_STATIC ) {
CONFIG(debug, debug|release) {
LIBS *= -L$${LIB_DIR} -lQGLViewerd2
} else {
LIBS *= -L$${LIB_DIR} -lQGLViewer2
}
} else {
DEFINES *= QGLVIEWER_STATIC
CONFIG(debug, debug|release) {
LIBS *= $${LIB_DIR}/libQGLViewerd2.a
} else {
LIBS *= $${LIB_DIR}/libQGLViewer2.a
}
}
}
# Application icon
macx|darwin-g++ {
ICON = $${ROOT_DIRECTORY}/QGLViewer/qglviewer.icns
}
win32 {
!designer {
exists( $${ROOT_DIRECTORY}/examples/qglviewer.rc ) {
RC_FILE = $${ROOT_DIRECTORY}/examples/qglviewer.rc
}
}
}