blob: 25a10e724afb972891ab52433a3ce3785f9b1b40 (
plain)
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
|
CONFIG += qt
QT += opengl declarative
TEMPLATE = app
TARGET = qmlogre
macx {
OGREDIR = $$(OGRE_HOME)
isEmpty(OGREDIR) {
error(QmlOgre needs Ogre to be built. Please set the environment variable OGRE_HOME pointing to your Ogre root directory.)
} else {
message(Using Ogre libraries in $$OGREDIR)
INCLUDEPATH += $$OGREDIR/include/OGRE
INCLUDEPATH += $$OGREDIR/include/OGRE/RenderSystems/GL
QMAKE_LFLAGS += -F$$OGREDIR/lib/release
LIBS += -framework Ogre
BOOSTDIR = $$OGREDIR/boost_1_42
!isEmpty(BOOSTDIR) {
INCLUDEPATH += $$BOOSTDIR
# LIBS += -L$$BOOSTDIR/lib -lboost_date_time-xgcc40-mt-1_42 -lboost_thread-xgcc40-mt-1_42
}
DEFINES += OGRE_PLUGIN_VAR=\"$$OGREDIR/lib\"
}
} else:unix {
CONFIG += link_pkgconfig
PKGCONFIG += OGRE
OGRELIBDIR = $$system(pkg-config --libs-only-L OGRE)
isEmpty(OGRELIBDIR) {
OGRELIBDIR = /usr/lib
} else {
OGRELIBDIR = $$replace(OGRELIBDIR, -L,)
}
OGREPLUGINDIR = $$OGRELIBDIR/OGRE
DEFINES += OGRE_PLUGIN_VAR=\"$$OGREPLUGINDIR\"
} else:win32 {
OGREDIR = $$(OGRE_HOME)
isEmpty(OGREDIR) {
error(QmlOgre needs Ogre to be built. Please set the environment variable OGRE_HOME pointing to your Ogre root directory.)
} else {
message(Using Ogre libraries in $$OGREDIR)
INCLUDEPATH += $$OGREDIR/include/OGRE
INCLUDEPATH += $$OGREDIR/include/OGRE/RenderSystems/GL
CONFIG(release, debug|release) {
LIBS += -L$$OGREDIR/lib/release -L$$OGREDIR/lib/release/opt -lOgreMain -lRenderSystem_GL
} else {
LIBS += -L$$OGREDIR/lib/debug -L$$OGREDIR/lib/debug/opt -lOgreMain_d -lRenderSystem_GL_d
}
BOOSTDIR = $$OGREDIR/boost_1_42
!isEmpty(BOOSTDIR) {
INCLUDEPATH += $$BOOSTDIR
CONFIG(release, debug|release) {
LIBS += -L$$BOOSTDIR/lib -llibboost_date_time-vc90-mt-1_42 -llibboost_thread-vc90-mt-1_42
} else {
LIBS += -L$$BOOSTDIR/lib -llibboost_date_time-vc90-mt-gd-1_42 -llibboost_thread-vc90-mt-gd-1_42
}
}
CONFIG(release, debug|release) {
DEFINES += OGRE_PLUGIN_VAR=\\\"$$OGREDIR/bin/release\\\"
} else {
DEFINES += OGRE_PLUGIN_VAR=\\\"$$OGREDIR/bin/debug\\\"
DEFINES += DEBUG_PLUGIN=1
}
}
}
UI_DIR = ./.ui
OBJECTS_DIR = ./.obj
MOC_DIR = ./.moc
SOURCES += main.cpp \
cameranodeobject.cpp \
ogreitem.cpp \
ogrenode.cpp
HEADERS += \
cameranodeobject.h \
ogreitem.h \
ogrenode.h
OTHER_FILES += \
resources/example.qml
|