qgroundcontrol.pri 4.76 KB
Newer Older
Hugo Vincent's avatar
Hugo Vincent committed
1 2
#-------------------------------------------------
#
3 4
# QGroundControl - Micro Air Vehicle Groundstation
#
5
# Please see our website at <http://qgroundcontrol.org>
Hugo Vincent's avatar
Hugo Vincent committed
6
#
7
# Author:
Hugo Vincent's avatar
Hugo Vincent committed
8 9
# Lorenz Meier <mavteam@student.ethz.ch>
#
10
# (c) 2009-2010 PIXHAWK Team
Hugo Vincent's avatar
Hugo Vincent committed
11 12
#
# This file is part of the mav groundstation project
13
# QGroundControl is free software: you can redistribute it and/or modify
Hugo Vincent's avatar
Hugo Vincent committed
14 15 16
# 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.
17
# QGroundControl is distributed in the hope that it will be useful,
Hugo Vincent's avatar
Hugo Vincent committed
18 19 20 21
# 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
22
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
Hugo Vincent's avatar
Hugo Vincent committed
23 24 25
#
#-------------------------------------------------

pixhawk's avatar
pixhawk committed
26 27 28 29
#$$BASEDIR/lib/qextserialport/include
#               $$BASEDIR/lib/openjaus/libjaus/include \
#               $$BASEDIR/lib/openjaus/libopenJaus/include

Hugo Vincent's avatar
Hugo Vincent committed
30 31
message(Qt version $$[QT_VERSION])

32 33 34 35
release {
#    DEFINES += QT_NO_DEBUG_OUTPUT
#    DEFINES += QT_NO_WARNING_OUTPUT
}
Hugo Vincent's avatar
Hugo Vincent committed
36 37 38

# MAC OS X
macx { 
39

40
    HARDWARE_PLATFORM = $$system(uname -a)
41 42
    contains( HARDWARE_PLATFORM, 9.6.0 ) || contains( HARDWARE_PLATFORM, 9.7.0 ) || contains( HARDWARE_PLATFORM, 9.8.0 ) || || contains( HARDWARE_PLATFORM, 9.9.0 )
    {
pixhawk's avatar
pixhawk committed
43 44 45
        # x86 Mac OS X Leopard 10.5 and earlier
        CONFIG += x86 cocoa phonon
        message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)
46

47 48
                # Enable function-profiling with the OS X saturn tool
                debug {
49 50
                        #QMAKE_CXXFLAGS += -finstrument-functions
                        #LIBS += -lSaturn
51
                }
pixhawk's avatar
pixhawk committed
52
    } else {
53 54
        # x64 Mac OS X Snow Leopard 10.6 and later
        CONFIG += x86_64 cocoa
pixhawk's avatar
pixhawk committed
55
        CONFIG -= x86 phonon
56
        message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
57
    }
Hugo Vincent's avatar
Hugo Vincent committed
58

59
    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
Hugo Vincent's avatar
Hugo Vincent committed
60 61 62

    DESTDIR = $$BASEDIR/bin/mac
    INCLUDEPATH += -framework SDL \
63
        $$BASEDIR/../mavlink/contrib/slugs/include \
lm's avatar
lm committed
64
        $$BASEDIR/../mavlink/include
Hugo Vincent's avatar
Hugo Vincent committed
65 66

    LIBS += -framework IOKit \
Hugo Vincent's avatar
Hugo Vincent committed
67 68 69
        -framework SDL \
        -framework CoreFoundation \
        -framework ApplicationServices \
pixhawk's avatar
pixhawk committed
70
 #       -framework GLUT \
Hugo Vincent's avatar
Hugo Vincent committed
71 72 73 74 75 76 77
        -lm
    
    ICON = $$BASEDIR/images/icons/macx.icns
}

# GNU/Linux
linux-g++ { 
78 79

    CONFIG += debug
Hugo Vincent's avatar
Hugo Vincent committed
80 81 82 83 84 85 86 87
    
    debug {
        DESTDIR = $$BASEDIR
    }

    release {
        DESTDIR = $$BASEDIR
    }
88
    INCLUDEPATH += /usr/include \
pixhawk's avatar
pixhawk committed
89
                   /usr/include/qt4/phonon
lm's avatar
lm committed
90 91
              # $$BASEDIR/lib/flite/include \
              # $$BASEDIR/lib/flite/lang
92

Hugo Vincent's avatar
Hugo Vincent committed
93

94
    HARDWARE_PLATFORM = $$system(uname -a)
Hugo Vincent's avatar
Hugo Vincent committed
95 96
    contains( HARDWARE_PLATFORM, x86_64 ) {
        # 64-bit Linux
lm's avatar
lm committed
97 98
        #LIBS += \
            #-L$$BASEDIR/lib/flite/linux64
99
        message(Building for GNU/Linux 64bit/x64)
Hugo Vincent's avatar
Hugo Vincent committed
100 101
    } else {
        # 32-bit Linux
lm's avatar
lm committed
102 103
        #LIBS += \
           #-L$$BASEDIR/lib/flite/linux32
104
        message(Building for GNU/Linux 32bit/i386)
105
    }
106 107 108
    LIBS += \
        -L/usr/lib \
        -lm \
109
        -lflite_cmu_us_kal \
110 111 112 113
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
pixhawk's avatar
pixhawk committed
114
        -lSDLmain
115

lm's avatar
lm committed
116 117
        #-lflite_cmu_us_rms \
        #-lflite_cmu_us_slt \
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
}

linux-g++-64 {
    CONFIG += debug

    debug {
        DESTDIR = $$BASEDIR
    }

    release {
        DESTDIR = $$BASEDIR
    }
    INCLUDEPATH += /usr/include \
                   /usr/include/qt4/phonon
              # $$BASEDIR/lib/flite/include \
              # $$BASEDIR/lib/flite/lang


    HARDWARE_PLATFORM = $$system(uname -a)
    contains( HARDWARE_PLATFORM, x86_64 ) {
        # 64-bit Linux
        #LIBS += \
            #-L$$BASEDIR/lib/flite/linux64
        message(Building for GNU/Linux 64bit/x64)
    } else {
        # 32-bit Linux
        #LIBS += \
           #-L$$BASEDIR/lib/flite/linux32
        message(Building for GNU/Linux 32bit/i386)
    }
    LIBS += \
        -L/usr/lib \
        -lm \
151
        -lflite_cmu_us_kal \
152 153 154
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
Hugo Vincent's avatar
Hugo Vincent committed
155
        -lSDL \
pixhawk's avatar
pixhawk committed
156
        -lSDLmain
Hugo Vincent's avatar
Hugo Vincent committed
157 158 159
}


Hugo Vincent's avatar
Hugo Vincent committed
160
# Windows (32bit/64bit)
Hugo Vincent's avatar
Hugo Vincent committed
161 162 163 164 165
win32 { 

    message(Building for Windows Platform (32/64bit))
    
    # Special settings for debug
Hugo Vincent's avatar
Hugo Vincent committed
166
    #CONFIG += CONSOLE
unknown's avatar
unknown committed
167

168 169
    INCLUDEPATH += $$BASEDIR\lib\sdl\include \
                   $$BASEDIR\lib\opal\include #\ #\
pixhawk's avatar
pixhawk committed
170
                   #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
Hugo Vincent's avatar
Hugo Vincent committed
171

unknown's avatar
unknown committed
172 173 174 175 176
    LIBS += -L$$BASEDIR\lib\sdl\win32 \
             -lmingw32 -lSDLmain -lSDL -mwindows



Hugo Vincent's avatar
Hugo Vincent committed
177 178 179 180 181 182 183 184
    debug {
        DESTDIR = $$BASEDIR/bin
    }

    release {
        DESTDIR = $$BASEDIR/bin
    }
        
185
    RC_FILE = $$BASEDIR/qgroundcontrol.rc
Hugo Vincent's avatar
Hugo Vincent committed
186 187
}

188

189