-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathQVRViewer.pro
More file actions
101 lines (78 loc) · 2.22 KB
/
QVRViewer.pro
File metadata and controls
101 lines (78 loc) · 2.22 KB
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
#-------------------------------------------------
#
# Project created by QtCreator 2016-09-28T00:52:41
#
#-------------------------------------------------
QT += core gui opengl
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = QVRViewer
TEMPLATE = app
SOURCES += src/main.cpp\
src/mainwindow.cpp \
src/vrview.cpp
HEADERS += src/mainwindow.h \
src/modelformats.h \
src/vrview.h
FORMS += src/mainwindow.ui
# from http://stackoverflow.com/a/10058744
# Copies the given files to the destination directory
defineTest(copyToDestdir) {
files = $$1
for(FILE, files) {
CONFIG( debug, debug|release ) {
DDIR = $${OUT_PWD}/debug
} else {
DDIR = $${OUT_PWD}/release
}
# Replace slashes in paths with backslashes for Windows
win32:FILE ~= s,/,\\,g
win32:DDIR ~= s,/,\\,g
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
}
export(QMAKE_POST_LINK)
}
win32 {
RC_FILE = win32.rc
contains(QT_ARCH, i386) {
message("32 bit build")
LIBS += -L$$PWD/extern/openvr/lib/win32/ \
-lopenvr_api -lopengl32
copyToDestdir($${PWD}/extern/openvr/bin/win32/openvr_api.dll)
} else {
message("64 bit build")
LIBS += -L$$PWD/extern/openvr/lib/win64/ \
-lopenvr_api -lopengl32
copyToDestdir($${PWD}/extern/openvr/bin/win64/openvr_api.dll)
}
}
INCLUDEPATH += $$PWD/extern/openvr/headers $$PWD/extern/glew/include
# from http://stackoverflow.com/a/25193580
isEmpty(TARGET_EXT) {
win32 {
TARGET_CUSTOM_EXT = .exe
}
macx {
TARGET_CUSTOM_EXT = .app
}
} else {
TARGET_CUSTOM_EXT = $${TARGET_EXT}
}
win32 {
DEPLOY_COMMAND = windeployqt
}
macx {
DEPLOY_COMMAND = macdeployqt
}
CONFIG( debug, debug|release ) {
# debug
DEPLOY_TARGET = $$shell_quote($$shell_path($${OUT_PWD}/debug/$${TARGET}$${TARGET_CUSTOM_EXT}))
} else {
# release
DEPLOY_TARGET = $$shell_quote($$shell_path($${OUT_PWD}/release/$${TARGET}$${TARGET_CUSTOM_EXT}))
}
QMAKE_POST_LINK += $${DEPLOY_COMMAND} $${DEPLOY_TARGET} $$escape_expand(\\n\\t)
RESOURCES += \
resources.qrc
DISTFILES += \
win32.rc \
viewer.ico