mavground.pri 3.59 KB
Newer Older
pixhawk's avatar
pixhawk committed
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
#-------------------------------------------------
#
# MAVGround - Micro Air Vehicle Groundstation
# 
# Please see our website at <http://pixhawk.ethz.ch>
#
# Original Author:
# Lorenz Meier <mavteam@student.ethz.ch>
#
# Contributing Authors (in alphabetical order):
# 
# (c) 2009 PIXHAWK Team
#
# This file is part of the mav groundstation project
# MAVGround is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# MAVGround is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with MAVGround. If not, see <http://www.gnu.org/licenses/>.
#
#-------------------------------------------------

28
QT       += network opengl svg xml phonon
pixhawk's avatar
pixhawk committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

TEMPLATE = app
TARGET = opengroundcontrol

BASEDIR = .
BUILDDIR = build
LANGUAGE = C++

#CONFIG += static debug
#CONFIG += static release console
CONFIG += static debug_and_release console
QMAKE_CFLAGS += -j8

OBJECTS_DIR = $$BUILDDIR/obj
MOC_DIR = $$BUILDDIR/moc
UI_HEADERS_DIR = src/ui/generated


# Add external libraries
pixhawk's avatar
pixhawk committed
48 49 50
INCLUDEPATH += $$BASEDIR/lib/SDL/include \
               $$BASEDIR/lib/flite/include \
               $$BASEDIR/lib/flite/lang
pixhawk's avatar
pixhawk committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64

#$$BASEDIR/lib/qextserialport/include
#               $$BASEDIR/lib/openjaus/libjaus/include \
#               $$BASEDIR/lib/openjaus/libopenJaus/include

message(Qt version> $$[QMAKESPEC])



# MAC OS X
macx { 

    message(Building for Mac OS X)

65 66 67 68
    CONFIG += x86

    contains ( DEFINES, QT_MAC_USE_COCOA ) {
        CONFIG += x86_64 cocoa
69
	CONFIG -= static
70
    }
71

pixhawk's avatar
pixhawk committed
72
    DESTDIR = $$BASEDIR/bin/mac
73

74
    INCLUDEPATH += -framework SDL
75

pixhawk's avatar
pixhawk committed
76
    LIBS += -framework IOKit \
77 78 79
        -framework SDL \
        -framework CoreFoundation \
        -framework ApplicationServices \
80 81
        -lm

pixhawk's avatar
pixhawk committed
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
    DEFINES += _TTY_POSIX_
    
    #ICON = $$BASEDIR/img/icons/empty.png
}

# GNU/Linux
linux-g++ { 

    message(Building for GNU/Linux)
    
    debug {
        DESTDIR = $$BASEDIR
    }

    release {
        DESTDIR = $$BASEDIR
    }
    INCLUDEPATH += /usr/include/SDL

    DEFINES += _TTY_POSIX_

    HARDWARE_PLATFORM = $$system(uname -a)
    contains( HARDWARE_PLATFORM, x86_64 ) {
        # 64-bit Linux
    LIBS += \
        -L$$BASEDIR/lib/flite/linux64 \
        -lm \
        -lflite_cmu_us_awb \
        -lflite_cmu_us_rms \
        -lflite_cmu_us_slt \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain
    } else {
        # 32-bit Linux
    LIBS += \
        -L$$BASEDIR/lib/flite/linux32 \
        -lm \
        -lflite_cmu_us_awb \
        -lflite_cmu_us_rms \
        -lflite_cmu_us_slt \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain
    }
}


134
# Windows (32bit/64bit)
pixhawk's avatar
pixhawk committed
135 136 137 138 139
win32 { 

    message(Building for Windows Platform (32/64bit))
    
    # Special settings for debug
140
    #CONFIG += CONSOLE
pixhawk's avatar
pixhawk committed
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
    LIBS += -L$$BASEDIR\lib\sdl\win32 \
        -lmingw32 -lSDLmain -lSDL -mwindows
    
    INCLUDEPATH += $$BASEDIR/lib/sdl/include/SDL
    
    DEFINES += _TTY_WIN_

    debug {
        DESTDIR = $$BASEDIR/bin
    }

    release {
        DESTDIR = $$BASEDIR/bin
    }
        
}