File: MLDemos_variables.pri

package info (click to toggle)
mldemos 0.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 32,224 kB
  • ctags: 46,525
  • sloc: cpp: 306,887; ansic: 167,718; ml: 126; sh: 109; makefile: 2
file content (239 lines) | stat: -rw-r--r-- 6,464 bytes parent folder | download
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239

##############################
#                            #
#     MLDemos Variables      #
#                            #
##############################

# PLEASE EDIT THIS PART TO FIT YOUR NEEDS/SETUP
QT += core gui svg opengl

DEPENDPATH += . \
		.. \
		$${MLPATH}/Core \
		$${MLPATH}/_3rdParty
INCLUDEPATH += . \
		$${MLPATH}/Core \
		$${MLPATH}/MLDemos \
		$${MLPATH}/_3rdParty

win32{
    CONFIG(release){
        LIBS += -lQtSvg4 -lQtOpenGL4 -lQtGui4 -lQtCore4
    }else{
        LIBS += -lQtSvgd4 -lQtOpenGLd4 -lQtGuid4 -lQtCored4
    }
}
CONFIG(coreLib){
}else{
    LIBS += -L$$MLPATH -L$$MLPATH/Core -lCore
}
LIBS += -L$$MLPATH/_3rdParty -l3rdParty


########################################
# Location of intermediate build files #
########################################
win32:MLBUILD = C:/tmp/MLDemos/$$NAME
unix:MLBUILD = build

######################
# Optional libraries #
######################
# OpenCV : We currently support 2.1 and upwards (on windows 2.2 upwards).
# You may select which version you have
# or let qmake find it out for you (linux only).

win32{
    CONFIG += opencv22
    OPENCV_VER = 230
}else:macx{
#    CONFIG += opencv21
    CONFIG += opencv22
}else{
    CONFIG += opencv$$system(pkg-config --modversion opencv | cut -d . -f'1,2' | sed -e \'s/\.[2-9]/2/g\' -e \'s/\.1/1/g\')
#   CONFIG += opencv22
#   CONFIG += opencv21
}

# Boost
    CONFIG += boost

############################################
# PATHS for the BOOST and OPENCV libraries #
############################################
# Give here the library and include paths if they are non-standard
# (like /usr/local/[lib|include] for instance).
# For windows, please specifiy it. For linux (macosx?) the libraries
# are autodetected provided you have installed using your package
# manager     CONFIG(opencv21)|CONFIG(opencv22):OPENCV = E:/Dvt/opencv/build/x86/mingw

win32{
    CONFIG(boost):BOOST = E:/DEV/boost_1_47_0
    CONFIG(opencv21)|CONFIG(opencv22):OPENCV = C:/DEV/OpenCV2.3-GCC
}else:macx{
    CONFIG(boost):BOOST = /usr/local/boost
    CONFIG(opencv22|opencv21):OPENCV = /usr/local/opencv
}

# PLEASE EDIT UNTIL HERE TO FIT YOUR NEEDS/SETUP

##########################
# Autoconfiguration part #
##########################

win32{
	DEFINES += WIN32
	CONFIG += WIN32
}else:macx{
    DEFINES += MACX
    CONFIG += MACX
}else:unix{
    CONFIG += link_pkgconfig
}

win32{
	#INCLUDEPATH += C:/DEV/glew-1.9.0/include
	#LIBS += -LC:/DEV/glew-1.9.0/lib
	#LIBS += -lglew32 -lglu32 -lopengl32 -lglut32win
}

# OPENCV
win32:CONFIG(opencv22){
    DEFINES += OPENCV22
    INCLUDEPATH += . "$$OPENCV/include"
    LIBS += -L"$$OPENCV/lib"
    LIBS += -L"$$OPENCV/bin"
#    INCLUDEPATH += . "$$OPENCV/build/include"
#	LIBS += -L"$$OPENCV/build/x86/mingw/lib"
#	LIBS += -L"$$OPENCV/build/x86/mingw/bin"
    LIBS += -lopencv_core$$OPENCV_VER \
        -lopencv_features2d$$OPENCV_VER \
		-lopencv_highgui$$OPENCV_VER \
		-lopencv_imgproc$$OPENCV_VER \
		-lopencv_legacy$$OPENCV_VER \
                -lopencv_ml$$OPENCV_VER
}
macx{
    CONFIG(opencv22){
        DEFINES += OPENCV22
        message("Using opencv22 or later")
        LIBS += -lopencv_core \
                -lopencv_calib3d \
                -lopencv_contrib \
                -lopencv_features2d \
                -lopencv_flann \
                -lopencv_gpu \
                -lopencv_highgui \
                -lopencv_imgproc \
                -lopencv_legacy \
                -lopencv_objdetect \
                -lopencv_video \
                -lopencv_ml

    }
    CONFIG(opencv21) {
        DEFINES += OPENCV21
        message("Using opencv21")
        LIBS += -lcv \
                -lcxcore \
                -lcvaux \
                -lml \
                -lhighgui
    }
}else:unix{
# some issues between qmake and pkgconfig
# invoking pkg-config manually instead
    CONFIG(opencv22){
        PKGCONFIG += opencv
        DEFINES += OPENCV22
        message("Using opencv22 or later")
        LIBS += $$system(pkg-config --libs opencv)
    }
    CONFIG(opencv21) {
	PKGCONFIG += opencv
	DEFINES += OPENCV21
        message("Using opencv21")
        LIBS += $$system(pkg-config --libs opencv)
    }
}

# BOOST
CONFIG(boost){
    DEFINES += WITHBOOST
    message("Using boost libraries")
    macx|win32{
        INCLUDEPATH += "$$BOOST"
    }else:unix{
        #PKGCONFIG += boost # Boost doesn't provide its own pc file yet...
    }
}

###############
# Misc. stuff #
###############

mainApp|coreLib{
}else{
	TARGET = $$qtLibraryTarget($$NAME)
        CONFIG(debug, debug|release):DESTDIR = "$$MLPATH/pluginsDebug"
        CONFIG(release, debug|release):DESTDIR = "$$MLPATH/plugins"
}
CONFIG(debug, debug|release){
	DEFINES += DEBUG
	message("debug mode")
#	QMAKE_CXXFLAGS += -pg
#	QMAKE_LFLAGS += -pg
}else{
	message("release mode")
#	linux-g++:QMAKE_CXXFLAGS += -O2 -march=native -pipe
#        macx-g++:QMAKE_CXXFLAGS += -O2
#        win32-g++:QMAKE_CXXFLAGS += -O2
}

win32{
	CONFIG(Debug, Debug|Release){
        MOC_DIR = $${MLBUILD}/Debug
        UI_DIR = $${MLBUILD}/Debug
        RCC_DIR = $${MLBUILD}/Debug
        OBJECTS_DIR = $${MLBUILD}/Debug
	}else{
        MOC_DIR = $${MLBUILD}/Release
        UI_DIR = $${MLBUILD}/Release
        RCC_DIR = $${MLBUILD}/Release
        OBJECTS_DIR = $${MLBUILD}/Release
	}
}else{
    MOC_DIR = $${MLBUILD}
    UI_DIR = $${MLBUILD}
    RCC_DIR = $${MLBUILD}
    OBJECTS_DIR = $${MLBUILD}
}

#QMAKE_CXXFLAGS += -pg
#QMAKE_CXXFLAGS_DEBUG += -pg
#QMAKE_LFLAGS += -pg
#QMAKE_LFLAGS_DEBUG += -pg


################################
# Turn the bloody warnings off #
################################
win32-g++|macx|unix {
	QMAKE_CXXFLAGS_WARN_ON = ""
	QMAKE_CXXFLAGS += -Wno-all
	#QMAKE_CXXFLAGS += -Wno-endif-labels
	QMAKE_CXXFLAGS += -Wno-unused-variable
	QMAKE_CXXFLAGS += -Wno-unused-parameter
	#QMAKE_CXXFLAGS += -Wno-switch
	QMAKE_CXXFLAGS += -Wtrigraphs
	QMAKE_CXXFLAGS += -Wreturn-type
	QMAKE_CXXFLAGS += -Wnon-virtual-dtor
	#QMAKE_CXXFLAGS += -Woverloaded-virtual
	#QMAKE_CXXFLAGS += -Wunused-variable
	QMAKE_CXXFLAGS += -Wunused-value
	QMAKE_CXXFLAGS += -Wunknown-pragmas
	QMAKE_CXXFLAGS += -Wno-shadow
	#QMAKE_CXXFLAGS += -Wno-deprecated-declarations
	#QMAKE_CXXFLAGS += -Wno-missing-braces
}