Skip to content
qgroundcontrol.pri 9.19 KiB
Newer Older
Hugo Vincent's avatar
Hugo Vincent committed
#-------------------------------------------------
#
# QGroundControl - Micro Air Vehicle Groundstation
#
# Please see our website at <http://qgroundcontrol.org>
Hugo Vincent's avatar
Hugo Vincent committed
#
Hugo Vincent's avatar
Hugo Vincent committed
# Lorenz Meier <mavteam@student.ethz.ch>
#
Hugo Vincent's avatar
Hugo Vincent committed
#
# This file is part of the mav groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
Hugo Vincent's avatar
Hugo Vincent committed
# 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.
# QGroundControl is distributed in the hope that it will be useful,
Hugo Vincent's avatar
Hugo Vincent committed
# 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 QGroundControl. If not, see <http://www.gnu.org/licenses/>.
Hugo Vincent's avatar
Hugo Vincent committed
#
#-------------------------------------------------

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

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

release {
#    DEFINES += QT_NO_DEBUG_OUTPUT
#    DEFINES += QT_NO_WARNING_OUTPUT
}
Hugo Vincent's avatar
Hugo Vincent committed

# MAC OS X
macx { 
    HARDWARE_PLATFORM = $$system(uname -a)
    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
        # 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)
                # Enable function-profiling with the OS X saturn tool
                debug {
                        #QMAKE_CXXFLAGS += -finstrument-functions
                        #LIBS += -lSaturn
pixhawk's avatar
pixhawk committed
    } else {
        # x64 Mac OS X Snow Leopard 10.6 and later
        CONFIG += x86_64 cocoa
pixhawk's avatar
pixhawk committed
        CONFIG -= x86 phonon
        message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
Hugo Vincent's avatar
Hugo Vincent committed

Hugo Vincent's avatar
Hugo Vincent committed

    DESTDIR = $$BASEDIR/bin/mac
    INCLUDEPATH += -framework SDL \
lm's avatar
lm committed
        $$BASEDIR/../mavlink/include
Hugo Vincent's avatar
Hugo Vincent committed

    LIBS += -framework IOKit \
Hugo Vincent's avatar
Hugo Vincent committed
        -framework SDL \
        -framework CoreFoundation \
        -framework ApplicationServices \
pixhawk's avatar
pixhawk committed
 #       -framework GLUT \
Hugo Vincent's avatar
Hugo Vincent committed
        -lm
    
    ICON = $$BASEDIR/images/icons/macx.icns
    QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/qgroundcontrol.app/Contents/MacOs/.
    exists(/usr/include/osg) {
    message("Building support for OpenSceneGraph")
    DEPENDENCIES_PRESENT += osg
    # Include OpenSceneGraph libraries
    LIBS += -losg

    exists(/usr/include/osgEarth) {
    message("Building support for osgEarth")
    DEPENDENCIES_PRESENT += osgearth
    # Include osgEarth libraries
    LIBS += -losgViewer \
            -losgEarth \
            -losgEarthUtil
    DEFINES += QGC_OSGEARTH_ENABLED
    }

    exists(/usr/local/include/libfreenect) {
    message("Building support for libfreenect")
    DEPENDENCIES_PRESENT += libfreenect
    # Include libfreenect libraries
    LIBS += -lfreenect
    DEFINES += QGC_LIBFREENECT_ENABLED
    }
Hugo Vincent's avatar
Hugo Vincent committed
}

# GNU/Linux
Hugo Vincent's avatar
Hugo Vincent committed
    
    debug {
Hugo Vincent's avatar
Hugo Vincent committed
    }

    release {
Hugo Vincent's avatar
Hugo Vincent committed
    }

    QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.

    INCLUDEPATH += /usr/include \
pixhawk's avatar
pixhawk committed
                   /usr/include/qt4/phonon
lm's avatar
lm committed
              # $$BASEDIR/lib/flite/include \
              # $$BASEDIR/lib/flite/lang
Hugo Vincent's avatar
Hugo Vincent committed

    HARDWARE_PLATFORM = $$system(uname -a)
Hugo Vincent's avatar
Hugo Vincent committed
    contains( HARDWARE_PLATFORM, x86_64 ) {
        # 64-bit Linux
lm's avatar
lm committed
        #LIBS += \
            #-L$$BASEDIR/lib/flite/linux64
        message(Building for GNU/Linux 64bit/x64)
Hugo Vincent's avatar
Hugo Vincent committed
    } else {
        # 32-bit Linux
lm's avatar
lm committed
        #LIBS += \
           #-L$$BASEDIR/lib/flite/linux32
        message(Building for GNU/Linux 32bit/i386)
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
pixhawk's avatar
pixhawk committed
        -lSDLmain
    exists(/usr/include/osg) {
    message("Building support for OpenSceneGraph")
    DEPENDENCIES_PRESENT += osg
    # Include OpenSceneGraph libraries
    LIBS += -losg
    DEFINES += QGC_OSG_ENABLED
    }
    exists(/usr/include/osgEarth) {
    message("Building support for osgEarth")
    DEPENDENCIES_PRESENT += osgearth
    # Include osgEarth libraries
    LIBS += -losgViewer \
            -losgEarth \
            -losgEarthUtil
    exists(/usr/local/include/libfreenect) {
    message("Building suplocport for libfreenect")
    DEPENDENCIES_PRESENT += libfreenect
    INCLUDEPATH += /usr/include/libusb-1.0
    # Include libfreenect libraries
    LIBS += -lfreenect
    DEFINES += QGC_LIBFREENECT_ENABLED
    }

    QMAKE_CXXFLAGS += -Wl,-E
pixhawk's avatar
pixhawk committed

lm's avatar
lm committed
        #-lflite_cmu_us_rms \
        #-lflite_cmu_us_slt \

    QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
    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 \
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
Hugo Vincent's avatar
Hugo Vincent committed
        -lSDL \
pixhawk's avatar
pixhawk committed
        -lSDLmain
    exists(/usr/include/osg) {
    message("Building support for OpenSceneGraph")
    DEPENDENCIES_PRESENT += osg
    # Include OpenSceneGraph libraries
    LIBS += -losg
    DEFINES += QGC_OSG_ENABLED
    }

    exists(/usr/include/osgEarth) {
    message("Building support for osgEarth")
    DEPENDENCIES_PRESENT += osgearth
    # Include osgEarth libraries
    LIBS += -losgViewer \
            -losgEarth \
            -losgEarthUtil
    DEFINES += QGC_OSGEARTH_ENABLED
    }

    exists(/usr/local/include/libfreenect) {
    message("Building support for libfreenect")
    DEPENDENCIES_PRESENT += libfreenect
    INCLUDEPATH += /usr/include/libusb-1.0
    # Include libfreenect libraries
    LIBS += -lfreenect
    DEFINES += QGC_LIBFREENECT_ENABLED
    }
Hugo Vincent's avatar
Hugo Vincent committed
}

pixhawk's avatar
pixhawk committed
# Windows (32bit)
win32-msvc2008 {

    message(Building for Windows Visual Studio 2008 (32bit))

    # Special settings for debug
    #CONFIG += CONSOLE

    INCLUDEPATH += $$BASEDIR/lib/sdl/msvc/include \
                   $$BASEDIR/lib/opal/include \
                   $$BASEDIR/lib/msinttypes
                   #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"

    LIBS += -L$$BASEDIR/lib/sdl/msvc/lib \
             -lSDLmain -lSDL

    RC_FILE = $$BASEDIR/qgroundcontrol.rc

    # Copy dependencies
    QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/debug/. &&
    QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/release/. &&
    QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$TARGETDIR/debug/. &&
    QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$TARGETDIR/release/.
}
Hugo Vincent's avatar
Hugo Vincent committed

pixhawk's avatar
pixhawk committed
# Windows (32bit)
Hugo Vincent's avatar
Hugo Vincent committed

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

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

    LIBS += -L$$BASEDIR/lib/sdl/win32 \
unknown's avatar
unknown committed
             -lmingw32 -lSDLmain -lSDL -mwindows



Hugo Vincent's avatar
Hugo Vincent committed
    debug {
Hugo Vincent's avatar
Hugo Vincent committed
    }

    release {
Hugo Vincent's avatar
Hugo Vincent committed
    }
        
    RC_FILE = $$BASEDIR/qgroundcontrol.rc
    QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/debug/. &&
    QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/release/. &&
    QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$BUILDDIR/debug/. &&
    QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$BUILDDIR/release/.
Hugo Vincent's avatar
Hugo Vincent committed
}

pixhawk's avatar
pixhawk committed
# Windows (64bit)
pixhawk's avatar
pixhawk committed
    message(Building for Windows Platform (64bit))

    # Special settings for debug
    #CONFIG += CONSOLE

    INCLUDEPATH += $$BASEDIR\lib\sdl\include \
                   $$BASEDIR\lib\opal\include #\ #\
                   #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"

    LIBS += -L$$BASEDIR\lib\sdl\win32 \
             -lmingw32 -lSDLmain -lSDL -mwindows



    debug {
        DESTDIR = $$BASEDIR/bin
    }

    release {
        DESTDIR = $$BASEDIR/bin
    }

    RC_FILE = $$BASEDIR/qgroundcontrol.rc
    QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/debug/. &&
    QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/release/. &&
    QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$BUILDDIR/debug/. &&
    QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$BUILDDIR/release/.
pixhawk's avatar
pixhawk committed
}