Skip to content

Commit

Permalink
Updates for building with qmake under windows
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5936 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 10, 2006
1 parent d0d7a5f commit 5ec2ad3
Show file tree
Hide file tree
Showing 5 changed files with 420 additions and 284 deletions.
14 changes: 1 addition & 13 deletions qgis.pro
@@ -1,15 +1,3 @@
# Project file for building QGIS on Windows
# This file and the QGIS source tree should reside in
# a directory named qgis_win32 in order for the qmake
# build system to work.
#
# Building for Windows requires setting the following
# environment variables:
# GDAL - directory containing the gdal install
# POSTGRESQL - directory containing the postgresql install
# (windows client only)
# qgis.pro,v 1.12 2004/07/14 18:20:11 gsherman Exp #
TEMPLATE = subdirs
SUBDIRS = src \
providers \
plugins
SUBDIRS = src
278 changes: 278 additions & 0 deletions settings.pro
@@ -0,0 +1,278 @@
#################################################################
#
# QMAKE Project File for openModeller Gui
#
# Tim Sutton 2005
#
#################################################################
message(******************** settings.pro ***********************)

#################################################################
#
# all platforms - change these settings as you need them
#
#################################################################

unix:WORKDIR=$$system(pwd)
win32:WORKDIR=c:/temp/
message(Building in $${WORKDIR})
QGIS_APP_NAME=omgui1
QGIS_LOCALPLUGIN=true
QGIS_WEBSERVICESPLUGIN=false #disabled until renato gets it fully implemented
QGIS_DUMMYPLUGIN=false
#wether to try to build the witty web toolkit fast cgi module
QGIS_WITTY=false
#whether to build unit tests
QGIS_TESTS=false
#whether to build console only applications
QGIS_CONSOLE=false
#whether to build the qt designer plugin
QGIS_DESIGNER=false
#whether to show experimental features to the user (set to true to hide
#experimental features when making a release
QGIS_ALLOW_EXPERIMENTAL=true
#whether to use to qgis mapping component
#at the moment it only builds on linux :-(
QGIS_USE_QGIS=true
#linux-g++:QGIS_USE_QGIS=true
#below is needed for winows - cant seemt to get ver_maj just by setting VERSION
unix:VER_MAJ = 1
unix:VERSION = 1.0.0

#################################################################
# Should not need to change below this point!!!! #
#################################################################


#################################################################
##
## General compilation settings and defines
##
#################################################################
CONFIG += warn_off
#create both debug and relase makefiles
CONFIG += debug_and_release
#build both release and debug targets when make is run
CONFIG += build_all
LANGUAGE = C++
CONFIG += exceptions
# Require that there are no undefined symbols in any libs!
QMAKE_LFLAGS_SHLIB *= --no-undefined

QGSSVNVERSION="version0.8pre2"
#################################################################
##
## Destination dir
##
#################################################################

# Where binary exes and libs should be placed when built
CONFIG(debug, debug|release){
message(DEBUG? : yes)
# for ifdefs in code that should run only
# when debug support is enabled
QGIS_DEBUGMODE=true
QGIS_APP_NAME=$${QGIS_APP_NAME}-debug
win32:CONFIG+=console
}else{
message(DEBUG? : no )
QGIS_APP_NAME=$${QGIS_APP_NAME}-release
}
DESTDIR=$${WORKDIR}/$${QGIS_APP_NAME}

#################################################################
#
# INSTALL PATHS
#
#################################################################

linux-g++:QGISBINDIR=$${DESTDIR}/bin
win32:QGISBINDIR=$${DESTDIR}
macx:QGISBINDIR=$${DESTDIR}/$${QGIS_APP_NAME}.app/Contents/MacOS/

linux-g++:QGISLIBDIR=$${DESTDIR}/lib
macx:QGISLIBDIR=$${QGISBINDIR}
win32:QGISLIBDIR=$${DESTDIR}

QGISPLUGINDIR=$${QGISBINDIR}/plugins
macx:QGISPLUGINDIR=$${DESTDIR}/$${QGIS_APP_NAME}.app/Contents/plugins

message(WORKDIR : $${WORKDIR})
message(DESTDIR : $${DESTDIR})
message(QGISBINDIR : $${QGISBINDIR})
message(QGISLIBDIR : $${QGISLIBDIR})
message(QGISPLUGINDIR : $${QGISPLUGINDIR})

#################################################################
##
## Library names
##
#################################################################

QGISLIBADD=-lomgui
QGISWIDGETSLIBADD=-lomgwidgets
QGISSOAPLIBADD=-lomgsoap
OPENMODELLERLIBADD=-lopenmodeller
CONFIG(debug, debug|release){
QGISLIBADD=$$member(QGISLIBADD, 0)-debug
#win32:LIBS += -lomgui-debug$${VER_MAJ}
QGISWIDGETSLIBADD=$$member(QGISWIDGETSLIBADD, 0)-debug
QGISSOAPLIBADD=$$member(QGISSOAPLIBADD, 0)-debug
win32:OPENMODELLERLIBADD=$$member(OPENMODELLERLIBADD, 0)-debug
}
win32:EXPATLIBADD=libexpat-1
unix:EXPATLIBADD= #not needed for unix
win32:GDALLIBADD=-lgdal
unix:GDALLIBADD=-lgdal
macx:GDALLIBADD=-framework gdal

contains(QGIS_USE_QGIS,true){
QGISLIBADD = -lqgis_core -lqgis_gui -lproj
}


#################################################################
#
# Lib search paths
#
#################################################################

#win32:LIBS+=-LC:\MinGW\lib
win32:LIBS+=-LC:\msys\local\lib
win32:LIBS+=-L$${DESTDIR}
linux-g++:LIBS+=-L$${DESTDIR}/lib
linux-g++:LIBS+=-L/usr/lib/ccache/lib
macx:LIBS+=-L$${QGISLIBDIR}
macx:LIBS+=-F/Library/Frameworks/
macx:LIBS+=-L/usr/local/lib

contains(QGIS_USE_QGIS,true){
QT+= qt3support
#For mac we specify the path into a qgis.app bundle for the libs
#on other systems we will assume they are already in the path
macx:QGISDIR=/Users/timsutton/apps/qgis.app/Contents/MacOS/
linux-g++:QGISDIR=/home/timlinux/apps
#linux-g++:/usr
QGISLIBDIR=$${QGISDIR}/lib
LIBS+=-L$${QGISLIBDIR}

QGISPLUGINDIR=$${QGISLIBDIR}/qgis
DEFINES += QGISPLUGINDIR=$${QGISPLUGINDIR}
DEFINES += WITH_QGIS
}

#################################################################
#
# Include paths
#
#################################################################

linux-g++:INCLUDEPATH += /usr/lib/ccache/include
contains(QGIS_USE_QGIS,true){
macx:QGISSRCDIR=/Users/timsutton/dev/cpp/qgis/src
linux-g++:QGISSRCDIR=/home/timlinux/dev/cpp/qgis/src
win32:QGISSRCDIR=c:/dev/cpp/qgis/src

unix:INCLUDEPATH += $${QGISDIR}/include/qgis
win32:INCLUDEPATH += $${QGISSRCDIR}
win32:INCLUDEPATH += c:/msys/local/include
INCLUDEPATH +=$${QGISSRCDIR}/core \
$${QGISSRCDIR}/gui \
$${QGISSRCDIR}/plugins \
$${QGISSRCDIR}/providers \
$${QGISSRCDIR}/raster \
$${QGISSRCDIR}/ui
}

#################################################################
#
# windows platform (MinGW)
#
#################################################################

win32{
message(Installing for windows!)
INCLUDEPATH += .
INCLUDEPATH += C:/MinGW/include
INCLUDEPATH += C:/cygwin/usr/local/src/om/src
INCLUDEPATH += c:/dev/cpp/om/src
}


#################################################################
#
# MacOSX platform specific directives
#
#################################################################

macx{
INCLUDEPATH += /usr/local/include/openmodeller
#fixme should not need the next line
#INCLUDEPATH += /Users/timsutton/dev/cpp/om/src
FRAMEWORKSDIR=$${DESTDIR}/$${QGIS_APP_NAME}.app/Contents/Frameworks
message (Checking if $${FRAMEWORKSDIR}/gdal.framework/gdal exists)
exists( $${FRAMEWORKSDIR}/gdal.framework/gdal )
{
message(Gdal framework already in the bundle...skipping copy)
}else{
system(mkdir -p $${FRAMEWORKSDIR})
system(cp -RP /Library/Frameworks/gdal.framework $${FRAMEWORKSDIR}/)
message(Gdal framework copied into the bundle)
}
system(cp mac/Info.plist $${DESTDIR}/bin/$${QGIS_APP_NAME}.app/Contents)
}

####################################################


# Whether we should build the local om plugin
contains(QGIS_LOCALPLUGIN,true){
message("Building with omglocalplugin support")
#make available as a c++ compiler macro
DEFINES += WITH_LOCAL_PLUGIN
}else {
message("OmgLocalPlugin support disabled")
}

####################################################

# Whether we should build the webservices om plugin
contains(QGIS_WEBSERVICESPLUGIN,true){
message("Building with omgwebservicesplugin support")
#make available as a c++ compiler macro
DEFINES += WITH_WEBSERVICES_PLUGIN
}else{
message("OmgWebServicesPlugin support disabled")
#nullify soap lib include if WS is disabled
QGISSOAPLIBADD=
}

####################################################


# Whether we should build with experimental/incomplete features
# enabled on the GUI
contains(QGIS_ALLOW_EXPERIMENTAL,false){
message("Building with NO_EXPERIMENTAL features visible to user")
#make available as a c++ compiler macro
DEFINES += QGIS_NO_EXPERIMENTAL
}else{
message("EXPERIMENTAL features will be visible to user")
}


#################################################################
#
# Where intermediate build files should go
#
#################################################################

OBJDIR = $${WORKDIR}/obj
MOC_DIR = $${OBJDIR}/moc
UI_DIR = $${OBJDIR}/ui
macx:OBJECTS_DIR = $${OBJDIR}/o/mac
linux-g++:OBJECTS_DIR = $${OBJDIR}/o/linux
win32:OBJECTS_DIR = $${OBJDIR}/o/win32
#These next two are not currently needed for this simple project
#RCC_DIR = $${OBJDIR}/rcc
#RC_FILE = $${APPNAME}.rc

0 comments on commit 5ec2ad3

Please sign in to comment.