forked from NCCA/NGL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUseNGL.pri
77 lines (63 loc) · 2.18 KB
/
UseNGL.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
#This file is included in any project that requires NGL it will be searched for
#in the default $(HOME)/NGL/ directory if this can't be found the environment variable $NGLDIR will be searched for and this will be used.
CONFIG+=c++11
macx:CONFIG-=app_bundle
# as I want to support 4.8 and 5 this will set a flag for some of the mac stuff
# mainly in the types.h file for the setMacVisual which is native in Qt5
isEqual(QT_MAJOR_VERSION, 5) {
cache()
DEFINES +=QT5BUILD
}
NGLPATH=$$(NGLDIR)
isEmpty(NGLPATH){ # note brace must be here
NGLBASE=$$(HOME)/NGL
}
else{ # note brace must be here
NGLBASE=$$(NGLDIR)
}
message($${NGLBASE})
# use this to suppress some warning from boost
unix*:QMAKE_CXXFLAGS_WARN_ON += "-Wno-unused-parameter"
# basic compiler flags (not all appropriate for all platforms)
QMAKE_CXXFLAGS+= -msse -msse2 -msse3
macx:QMAKE_CXXFLAGS+= -arch x86_64
macx:INCLUDEPATH+=/usr/local/include/
linux-g++:QMAKE_CXXFLAGS += -march=native
linux-g++-64:QMAKE_CXXFLAGS += -march=native
# define the _DEBUG flag for the graphics lib
DEFINES +=NGL_DEBUG
OTHER_FILES+=sceneSetup.vrscene
QMAKE_RPATHDIR+=L$${NGLBASE}/lib
unix:LIBS += -L/usr/local/lib
# add the ngl lib note the { } for the environment variable QMake variable's value at time qmake is run
unix:LIBS += -L$${NGLBASE}/lib -l NGL
# now if we are under unix and not on a Mac (i.e. linux)
linux-*{
linux-*:QMAKE_CXXFLAGS += -march=native
LIBS+=-ltiff
}
DEPENDPATH+=include
# if we are on a mac define DARWIN
macx:message("Building for macOS Sierra using sdk 10.12 if this is not found")
macx:message("Modify UseNGL.pri and modify QMAKE_MACK_SDK to macosx10.11 Mac El-Capitain")
macx:QMAKE_MAC_SDK = macosx10.12
# this is where to look for includes
INCLUDEPATH += $${NGLBASE}/include/
win32: {
PRE_TARGETDEPS+=C:/NGL/lib/NGL.lib
INCLUDEPATH+=-I c:/boost
DEFINES+=GL42
DEFINES += WIN32
DEFINES+=_WIN32
DEFINES+=_USE_MATH_DEFINES
LIBS+= -lopengl32
LIBS += -LC:/NGL/lib/ -lNGL
DEFINES+=NO_DLL
}
ios {
message("IOS BUILD")
DEFINES+=USINGIOS_
INCLUDEPATH+=/usr/local/include
LIBS += -L$${NGLBASE}/lib -lNGLIOS
}
QMAKE_RPATHDIR+=$${NGLBASE}/lib