|
| 1 | +################################################################# |
| 2 | +# |
| 3 | +# QMAKE Project File for openModeller Gui |
| 4 | +# |
| 5 | +# Tim Sutton 2005 |
| 6 | +# |
| 7 | +################################################################# |
| 8 | +message(******************** settings.pro ***********************) |
| 9 | + |
| 10 | +################################################################# |
| 11 | +# |
| 12 | +# all platforms - change these settings as you need them |
| 13 | +# |
| 14 | +################################################################# |
| 15 | + |
| 16 | +unix:WORKDIR=$$system(pwd) |
| 17 | +win32:WORKDIR=c:/temp/ |
| 18 | +message(Building in $${WORKDIR}) |
| 19 | +QGIS_APP_NAME=omgui1 |
| 20 | +QGIS_LOCALPLUGIN=true |
| 21 | +QGIS_WEBSERVICESPLUGIN=false #disabled until renato gets it fully implemented |
| 22 | +QGIS_DUMMYPLUGIN=false |
| 23 | +#wether to try to build the witty web toolkit fast cgi module |
| 24 | +QGIS_WITTY=false |
| 25 | +#whether to build unit tests |
| 26 | +QGIS_TESTS=false |
| 27 | +#whether to build console only applications |
| 28 | +QGIS_CONSOLE=false |
| 29 | +#whether to build the qt designer plugin |
| 30 | +QGIS_DESIGNER=false |
| 31 | +#whether to show experimental features to the user (set to true to hide |
| 32 | +#experimental features when making a release |
| 33 | +QGIS_ALLOW_EXPERIMENTAL=true |
| 34 | +#whether to use to qgis mapping component |
| 35 | +#at the moment it only builds on linux :-( |
| 36 | +QGIS_USE_QGIS=true |
| 37 | +#linux-g++:QGIS_USE_QGIS=true |
| 38 | +#below is needed for winows - cant seemt to get ver_maj just by setting VERSION |
| 39 | +unix:VER_MAJ = 1 |
| 40 | +unix:VERSION = 1.0.0 |
| 41 | + |
| 42 | +################################################################# |
| 43 | +# Should not need to change below this point!!!! # |
| 44 | +################################################################# |
| 45 | + |
| 46 | + |
| 47 | +################################################################# |
| 48 | +## |
| 49 | +## General compilation settings and defines |
| 50 | +## |
| 51 | +################################################################# |
| 52 | +CONFIG += warn_off |
| 53 | +#create both debug and relase makefiles |
| 54 | +CONFIG += debug_and_release |
| 55 | +#build both release and debug targets when make is run |
| 56 | +CONFIG += build_all |
| 57 | +LANGUAGE = C++ |
| 58 | +CONFIG += exceptions |
| 59 | +# Require that there are no undefined symbols in any libs! |
| 60 | +QMAKE_LFLAGS_SHLIB *= --no-undefined |
| 61 | + |
| 62 | +QGSSVNVERSION="version0.8pre2" |
| 63 | +################################################################# |
| 64 | +## |
| 65 | +## Destination dir |
| 66 | +## |
| 67 | +################################################################# |
| 68 | + |
| 69 | +# Where binary exes and libs should be placed when built |
| 70 | +CONFIG(debug, debug|release){ |
| 71 | + message(DEBUG? : yes) |
| 72 | + # for ifdefs in code that should run only |
| 73 | + # when debug support is enabled |
| 74 | + QGIS_DEBUGMODE=true |
| 75 | + QGIS_APP_NAME=$${QGIS_APP_NAME}-debug |
| 76 | + win32:CONFIG+=console |
| 77 | +}else{ |
| 78 | + message(DEBUG? : no ) |
| 79 | + QGIS_APP_NAME=$${QGIS_APP_NAME}-release |
| 80 | +} |
| 81 | +DESTDIR=$${WORKDIR}/$${QGIS_APP_NAME} |
| 82 | + |
| 83 | +################################################################# |
| 84 | +# |
| 85 | +# INSTALL PATHS |
| 86 | +# |
| 87 | +################################################################# |
| 88 | + |
| 89 | +linux-g++:QGISBINDIR=$${DESTDIR}/bin |
| 90 | +win32:QGISBINDIR=$${DESTDIR} |
| 91 | +macx:QGISBINDIR=$${DESTDIR}/$${QGIS_APP_NAME}.app/Contents/MacOS/ |
| 92 | + |
| 93 | +linux-g++:QGISLIBDIR=$${DESTDIR}/lib |
| 94 | +macx:QGISLIBDIR=$${QGISBINDIR} |
| 95 | +win32:QGISLIBDIR=$${DESTDIR} |
| 96 | + |
| 97 | +QGISPLUGINDIR=$${QGISBINDIR}/plugins |
| 98 | +macx:QGISPLUGINDIR=$${DESTDIR}/$${QGIS_APP_NAME}.app/Contents/plugins |
| 99 | + |
| 100 | +message(WORKDIR : $${WORKDIR}) |
| 101 | +message(DESTDIR : $${DESTDIR}) |
| 102 | +message(QGISBINDIR : $${QGISBINDIR}) |
| 103 | +message(QGISLIBDIR : $${QGISLIBDIR}) |
| 104 | +message(QGISPLUGINDIR : $${QGISPLUGINDIR}) |
| 105 | + |
| 106 | +################################################################# |
| 107 | +## |
| 108 | +## Library names |
| 109 | +## |
| 110 | +################################################################# |
| 111 | + |
| 112 | +QGISLIBADD=-lomgui |
| 113 | +QGISWIDGETSLIBADD=-lomgwidgets |
| 114 | +QGISSOAPLIBADD=-lomgsoap |
| 115 | +OPENMODELLERLIBADD=-lopenmodeller |
| 116 | +CONFIG(debug, debug|release){ |
| 117 | + QGISLIBADD=$$member(QGISLIBADD, 0)-debug |
| 118 | + #win32:LIBS += -lomgui-debug$${VER_MAJ} |
| 119 | + QGISWIDGETSLIBADD=$$member(QGISWIDGETSLIBADD, 0)-debug |
| 120 | + QGISSOAPLIBADD=$$member(QGISSOAPLIBADD, 0)-debug |
| 121 | + win32:OPENMODELLERLIBADD=$$member(OPENMODELLERLIBADD, 0)-debug |
| 122 | +} |
| 123 | +win32:EXPATLIBADD=libexpat-1 |
| 124 | +unix:EXPATLIBADD= #not needed for unix |
| 125 | +win32:GDALLIBADD=-lgdal |
| 126 | +unix:GDALLIBADD=-lgdal |
| 127 | +macx:GDALLIBADD=-framework gdal |
| 128 | + |
| 129 | +contains(QGIS_USE_QGIS,true){ |
| 130 | + QGISLIBADD = -lqgis_core -lqgis_gui -lproj |
| 131 | +} |
| 132 | + |
| 133 | + |
| 134 | +################################################################# |
| 135 | +# |
| 136 | +# Lib search paths |
| 137 | +# |
| 138 | +################################################################# |
| 139 | + |
| 140 | +#win32:LIBS+=-LC:\MinGW\lib |
| 141 | +win32:LIBS+=-LC:\msys\local\lib |
| 142 | +win32:LIBS+=-L$${DESTDIR} |
| 143 | +linux-g++:LIBS+=-L$${DESTDIR}/lib |
| 144 | +linux-g++:LIBS+=-L/usr/lib/ccache/lib |
| 145 | +macx:LIBS+=-L$${QGISLIBDIR} |
| 146 | +macx:LIBS+=-F/Library/Frameworks/ |
| 147 | +macx:LIBS+=-L/usr/local/lib |
| 148 | + |
| 149 | +contains(QGIS_USE_QGIS,true){ |
| 150 | + QT+= qt3support |
| 151 | + #For mac we specify the path into a qgis.app bundle for the libs |
| 152 | + #on other systems we will assume they are already in the path |
| 153 | + macx:QGISDIR=/Users/timsutton/apps/qgis.app/Contents/MacOS/ |
| 154 | + linux-g++:QGISDIR=/home/timlinux/apps |
| 155 | + #linux-g++:/usr |
| 156 | + QGISLIBDIR=$${QGISDIR}/lib |
| 157 | + LIBS+=-L$${QGISLIBDIR} |
| 158 | + |
| 159 | + QGISPLUGINDIR=$${QGISLIBDIR}/qgis |
| 160 | + DEFINES += QGISPLUGINDIR=$${QGISPLUGINDIR} |
| 161 | + DEFINES += WITH_QGIS |
| 162 | +} |
| 163 | + |
| 164 | +################################################################# |
| 165 | +# |
| 166 | +# Include paths |
| 167 | +# |
| 168 | +################################################################# |
| 169 | + |
| 170 | +linux-g++:INCLUDEPATH += /usr/lib/ccache/include |
| 171 | +contains(QGIS_USE_QGIS,true){ |
| 172 | + macx:QGISSRCDIR=/Users/timsutton/dev/cpp/qgis/src |
| 173 | + linux-g++:QGISSRCDIR=/home/timlinux/dev/cpp/qgis/src |
| 174 | + win32:QGISSRCDIR=c:/dev/cpp/qgis/src |
| 175 | + |
| 176 | + unix:INCLUDEPATH += $${QGISDIR}/include/qgis |
| 177 | + win32:INCLUDEPATH += $${QGISSRCDIR} |
| 178 | + win32:INCLUDEPATH += c:/msys/local/include |
| 179 | + INCLUDEPATH +=$${QGISSRCDIR}/core \ |
| 180 | + $${QGISSRCDIR}/gui \ |
| 181 | + $${QGISSRCDIR}/plugins \ |
| 182 | + $${QGISSRCDIR}/providers \ |
| 183 | + $${QGISSRCDIR}/raster \ |
| 184 | + $${QGISSRCDIR}/ui |
| 185 | +} |
| 186 | + |
| 187 | +################################################################# |
| 188 | +# |
| 189 | +# windows platform (MinGW) |
| 190 | +# |
| 191 | +################################################################# |
| 192 | + |
| 193 | +win32{ |
| 194 | + message(Installing for windows!) |
| 195 | + INCLUDEPATH += . |
| 196 | + INCLUDEPATH += C:/MinGW/include |
| 197 | + INCLUDEPATH += C:/cygwin/usr/local/src/om/src |
| 198 | + INCLUDEPATH += c:/dev/cpp/om/src |
| 199 | +} |
| 200 | + |
| 201 | + |
| 202 | +################################################################# |
| 203 | +# |
| 204 | +# MacOSX platform specific directives |
| 205 | +# |
| 206 | +################################################################# |
| 207 | + |
| 208 | +macx{ |
| 209 | + INCLUDEPATH += /usr/local/include/openmodeller |
| 210 | + #fixme should not need the next line |
| 211 | + #INCLUDEPATH += /Users/timsutton/dev/cpp/om/src |
| 212 | + FRAMEWORKSDIR=$${DESTDIR}/$${QGIS_APP_NAME}.app/Contents/Frameworks |
| 213 | + message (Checking if $${FRAMEWORKSDIR}/gdal.framework/gdal exists) |
| 214 | + exists( $${FRAMEWORKSDIR}/gdal.framework/gdal ) |
| 215 | + { |
| 216 | + message(Gdal framework already in the bundle...skipping copy) |
| 217 | + }else{ |
| 218 | + system(mkdir -p $${FRAMEWORKSDIR}) |
| 219 | + system(cp -RP /Library/Frameworks/gdal.framework $${FRAMEWORKSDIR}/) |
| 220 | + message(Gdal framework copied into the bundle) |
| 221 | + } |
| 222 | + system(cp mac/Info.plist $${DESTDIR}/bin/$${QGIS_APP_NAME}.app/Contents) |
| 223 | +} |
| 224 | + |
| 225 | +#################################################### |
| 226 | + |
| 227 | + |
| 228 | +# Whether we should build the local om plugin |
| 229 | +contains(QGIS_LOCALPLUGIN,true){ |
| 230 | + message("Building with omglocalplugin support") |
| 231 | + #make available as a c++ compiler macro |
| 232 | + DEFINES += WITH_LOCAL_PLUGIN |
| 233 | +}else { |
| 234 | + message("OmgLocalPlugin support disabled") |
| 235 | +} |
| 236 | + |
| 237 | +#################################################### |
| 238 | + |
| 239 | +# Whether we should build the webservices om plugin |
| 240 | +contains(QGIS_WEBSERVICESPLUGIN,true){ |
| 241 | + message("Building with omgwebservicesplugin support") |
| 242 | + #make available as a c++ compiler macro |
| 243 | + DEFINES += WITH_WEBSERVICES_PLUGIN |
| 244 | +}else{ |
| 245 | + message("OmgWebServicesPlugin support disabled") |
| 246 | + #nullify soap lib include if WS is disabled |
| 247 | + QGISSOAPLIBADD= |
| 248 | +} |
| 249 | + |
| 250 | +#################################################### |
| 251 | + |
| 252 | + |
| 253 | +# Whether we should build with experimental/incomplete features |
| 254 | +# enabled on the GUI |
| 255 | +contains(QGIS_ALLOW_EXPERIMENTAL,false){ |
| 256 | + message("Building with NO_EXPERIMENTAL features visible to user") |
| 257 | + #make available as a c++ compiler macro |
| 258 | + DEFINES += QGIS_NO_EXPERIMENTAL |
| 259 | +}else{ |
| 260 | + message("EXPERIMENTAL features will be visible to user") |
| 261 | +} |
| 262 | + |
| 263 | + |
| 264 | +################################################################# |
| 265 | +# |
| 266 | +# Where intermediate build files should go |
| 267 | +# |
| 268 | +################################################################# |
| 269 | + |
| 270 | +OBJDIR = $${WORKDIR}/obj |
| 271 | +MOC_DIR = $${OBJDIR}/moc |
| 272 | +UI_DIR = $${OBJDIR}/ui |
| 273 | +macx:OBJECTS_DIR = $${OBJDIR}/o/mac |
| 274 | +linux-g++:OBJECTS_DIR = $${OBJDIR}/o/linux |
| 275 | +win32:OBJECTS_DIR = $${OBJDIR}/o/win32 |
| 276 | +#These next two are not currently needed for this simple project |
| 277 | +#RCC_DIR = $${OBJDIR}/rcc |
| 278 | +#RC_FILE = $${APPNAME}.rc |
0 commit comments