Made QtOSG truly optional

Made QtOSG truly optional

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
# This file is part of the open groundstation project
# QGroundControl 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.
# QGroundControl 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 QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------

message(Qt version $$[QT_VERSION])
message(Using Qt from $$(QTDIR))

release {
#    DEFINES += QT_NO_DEBUG_OUTPUT
#    DEFINES += QT_NO_WARNING_OUTPUT
}

win32-msvc2008|win32-msvc2010 {
    QMAKE_POST_LINK += $$quote(echo "Copying files"$$escape_expand(\\n))
} else {
    QMAKE_POST_LINK += $$quote(echo "Copying files")
}

# Turn off serial port warnings
DEFINES += _TTY_NOWARN_

# MAC OS X
macx|macx-g++42|macx-g++: {

   # COMPILER_VERSION = $$system(gcc -v)
    #message(Using compiler $$COMPILER_VERSION)

        CONFIG += x86_64 cocoa phonon
        CONFIG -= x86

    #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" ) {
        # x86 Mac OS X Leopard 10.5 and earlier

        #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
                       # CONFIG += console
                #}
    #} else {
        # x64 Mac OS X Snow Leopard 10.6 and later
     #   CONFIG += x86_64 x86 cocoa phonon
        #CONFIG -= x86 # phonon
        #message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
      #          debug {
                        #QMAKE_CXXFLAGS += -finstrument-functions
                        #LIBS += -lSaturn
      #          }
    #}

    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6

    #DESTDIR = $$BASEDIR/bin/mac
    INCLUDEPATH += -framework SDL

    LIBS += -framework IOKit \
        -framework SDL \
        -framework CoreFoundation \
        -framework ApplicationServices \
        -lm

    ICON = $$BASEDIR/images/icons/macx.icns

    # Copy contributed files
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # Copy google earth starter file
    QMAKE_POST_LINK += && cp -f $$BASEDIR/images/earth.html $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # Copy CSS stylesheets
    QMAKE_POST_LINK += && cp -f $$BASEDIR/images/style-mission.css $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/style-indoor.css
    QMAKE_POST_LINK += && cp -f $$BASEDIR/images/style-outdoor.css $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # Copy parameter tooltip files
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # Copy libraries
    QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/qgroundcontrol.app/Contents/libs
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/lib/mac64/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/libs

    # Fix library paths inside executable
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgViewer.dylib "@executable_path/../libs/libosgViewer.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgWidget.dylib "@executable_path/../libs/libosgWidget.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol

    # Fix library paths within libraries (inter-library dependencies)

    # OSG GA LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib

    # OSG DB LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib

    # OSG TEXT LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib

    # OSG UTIL LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgUtil.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgUtil.dylib

    # OSG VIEWER LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib

    # OSG WIDGET LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgViewer.dylib "@executable_path/../libs/libosgViewer.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib

    # CORE OSG LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosg.dylib

    # Copy model files
    #QMAKE_POST_LINK += && cp -f $$BASEDIR/models/*.dae $$TARGETDIR/qgroundcontrol.app/Contents/MacOs

    #exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
    # No check for GLUT.framework since it's a MAC default
    message("Building support for OpenSceneGraph")
    DEPENDENCIES_PRESENT += osg
    DEFINES += QGC_OSG_ENABLED
    # Include OpenSceneGraph libraries
    INCLUDEPATH += -framework GLUT \
            -framework Cocoa \
            $$BASEDIR/lib/mac64/include

    LIBS += -framework GLUT \
            -framework Cocoa \
            -L$$BASEDIR/lib/mac64/lib \
            -lOpenThreads \
            -losg \
            -losgViewer \
            -losgGA \
            -losgDB \
            -losgText \
            -losgWidget
    #}

    exists(/usr/local/include/google/protobuf) {
    message("Building support for Protocol Buffers")
    DEPENDENCIES_PRESENT += protobuf
    # Include Protocol Buffers libraries
    LIBS += -L/usr/local/lib \
            -lprotobuf \
            -lprotobuf-lite \
            -lprotoc

    DEFINES += QGC_PROTOBUF_ENABLED
    }

    exists(/opt/local/include/libfreenect)|exists(/usr/local/include/libfreenect) {
    message("Building support for libfreenect")
    DEPENDENCIES_PRESENT += libfreenect
    # Include libfreenect libraries
    LIBS += -lfreenect
    DEFINES += QGC_LIBFREENECT_ENABLED
    }
}

# GNU/Linux
linux-g++ {

    CONFIG -= console

    debug {
        #DESTDIR = $$TARGETDIR/debug
        #CONFIG += debug console
    }

    release {
        #DESTDIR = $$TARGETDIR/release
        DEFINES += QT_NO_DEBUG
        #CONFIG -= console
    }

    #QMAKE_POST_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.

message("Compiling for linux 32")

    INCLUDEPATH += /usr/include \
                   /usr/local/include \
                   /usr/include/qt4/phonon

    message(Building for GNU/Linux 32bit/i386)

    LIBS += \
        -L/usr/lib \
        -L/usr/local/lib64 \
        -lm \
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain

    exists(/usr/include/osg) | exists(/usr/local/include/osg) {
    message("Building support for OpenSceneGraph")
    DEPENDENCIES_PRESENT += osg
    # Include OpenSceneGraph libraries
    LIBS += -losg \
            -losgViewer \
            -losgGA \
            -losgDB \
            -losgText \
            -lOpenThreads

    DEFINES += QGC_OSG_ENABLED
    }

    exists(/usr/include/osg/osgQt) | exists(/usr/local/include/osg/osgQt) {
    message("Building support for OpenSceneGraph")
    # Include OpenSceneGraph Qt libraries
    LIBS += -losgQt
    DEFINES += QGC_OSG_QT_ENABLED
    }

    exists(/usr/local/include/google/protobuf) {
    message("Building support for Protocol Buffers")
    DEPENDENCIES_PRESENT += protobuf
    # Include Protocol Buffers libraries
    LIBS += -lprotobuf \
            -lprotobuf-lite \
            -lprotoc

    DEFINES += QGC_PROTOBUF_ENABLED
    }

    exists(/usr/local/include/libfreenect/libfreenect.h) {
    message("Building support for libfreenect")
    DEPENDENCIES_PRESENT += libfreenect
    INCLUDEPATH += /usr/include/libusb-1.0
    # Include libfreenect libraries
    LIBS += -lfreenect
    DEFINES += QGC_LIBFREENECT_ENABLED
    }

    # Validated copy commands
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR

    QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR
    QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/images
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$TARGETDIR/images/Vera.ttf

    # osg/osgEarth dynamic casts might fail without this compiler option.
    # see http://osgearth.org/wiki/FAQ for details.
    QMAKE_CXXFLAGS += -Wl,-E
}

linux-g++-64 {

    CONFIG -= console

    debug {
        #DESTDIR = $$TARGETDIR/debug
        #CONFIG += debug console
    }

    release {
        #DESTDIR = $$TARGETDIR/release
        DEFINES += QT_NO_DEBUG
        #CONFIG -= console
    }

    #QMAKE_POST_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.

    INCLUDEPATH += /usr/include \
                   /usr/include/qt4/phonon

    # 64-bit Linux
    message(Building for GNU/Linux 64bit/x64 (g++-64))

    LIBS += \
        -L/usr/lib \
        -L/usr/local/lib64 \
        -lm \
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain

    exists(/usr/include/osg) | exists(/usr/local/include/osg) {
    message("Building support for OpenSceneGraph")
    DEPENDENCIES_PRESENT += osg
    # Include OpenSceneGraph libraries
    LIBS += -losg \
            -losgViewer \
            -losgGA \
            -losgDB \
            -losgText \
            -lOpenThreads

    exists(/usr/local/lib64) {
    LIBS += -L/usr/local/lib64
    }

    DEFINES += QGC_OSG_ENABLED
    }

    exists(/usr/include/osg/osgQt) | exists(/usr/local/include/osg/osgQt) {
    message("Building support for OpenSceneGraph")
    # Include OpenSceneGraph Qt libraries
    LIBS += -losgQt
    DEFINES += QGC_OSG_QT_ENABLED
    }

    exists(/usr/local/include/google/protobuf) {
    message("Building support for Protocol Buffers")
    DEPENDENCIES_PRESENT += protobuf
    # Include Protocol Buffers libraries
    LIBS += -lprotobuf \
            -lprotobuf-lite \
            -lprotoc

    DEFINES += QGC_PROTOBUF_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
    }

    # Validated copy commands
    debug {
        !exists($$TARGETDIR/debug){
             QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/debug
        }
        DESTDIR = $$TARGETDIR/debug
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/debug
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/debug
        QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/debug/images
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$TARGETDIR/debug/images/Vera.ttf
    }
    release {
        !exists($$TARGETDIR/release){
             QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/release
        }
        DESTDIR = $$TARGETDIR/release
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/release
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/release
        QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/release/images
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$TARGETDIR/release/images/Vera.ttf
    }

    # osg/osgEarth dynamic casts might fail without this compiler option.
    # see http://osgearth.org/wiki/FAQ for details.
    QMAKE_CXXFLAGS += -Wl,-E
}

# Windows (32bit)
win32-msvc2008|win32-msvc2010 {

    win32-msvc2008 {
    message(Building for Windows Visual Studio 2008 (32bit))
    }
    win32-msvc2010 {
    message(Building for Windows Visual Studio 2010 (32bit))
    }

    # QAxContainer support is needed for the Internet Control
    # element showing the Google Earth window
    CONFIG += qaxcontainer

    # The EIGEN library needs this define
    # to make the internal min/max functions work
    DEFINES += NOMINMAX

    # QWebkit is not needed on MS-Windows compilation environment
    CONFIG -= webkit

    release {
        CONFIG -= console
        DEFINES += QT_NO_DEBUG
    }

    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 \
			 -lsetupapi

exists($$BASEDIR/lib/osg123) {
message("Building support for OSG")
DEPENDENCIES_PRESENT += osg

# Include OpenSceneGraph
INCLUDEPATH += $$BASEDIR/lib/osgEarth/win32/include \
    $$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/include
LIBS += -L$$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/lib \
    -losg \
    -losgViewer \
    -losgGA \
    -losgDB \
    -losgText \
    -lOpenThreads
DEFINES += QGC_OSG_ENABLED
}

    RC_FILE = $$BASEDIR/qgroundcontrol.rc

    # Copy dependencies
    BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
    TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")

    CONFIG(debug, debug|release) {
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
        QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\files" "$$TARGETDIR_WIN\\debug\\files" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\models" "$$TARGETDIR_WIN\\debug\\models" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\images\\earth.html" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\debug" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\phonond4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtCored4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtGuid4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtMultimediad4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtNetworkd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtOpenGLd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSqld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSvgd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtWebKitd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXmld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXmlPatternsd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
    }

    CONFIG(release, debug|release) {
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
        QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\files" "$$TARGETDIR_WIN\\release\\files" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\models" "$$TARGETDIR_WIN\\release\\models" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\images\\earth.html" "$$TARGETDIR_WIN\\release\\earth.html" $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\release" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\phonon4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtCore4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtGui4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtMultimedia4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtNetwork4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtOpenGL4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSql4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSvg4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtWebKit4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXml4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXmlPatterns4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(del /F "$$TARGETDIR_WIN\\release\\qgroundcontrol.exp"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(del /F "$$TARGETDIR_WIN\\release\\qgroundcontrol.lib"$$escape_expand(\\n))
    }
}

# Windows (32bit)
win32-g++ {

    message(Building for Windows Platform (32bit))

    # Special settings for debug
    CONFIG += CONSOLE
    OUTPUT += CONSOLE

    # The EIGEN library needs this define
    # to make the internal min/max functions work
    DEFINES += NOMINMAX

    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 \
			 -lsetupapi

    CONFIG += windows

    debug {
        #DESTDIR = $$BUILDDIR/debug
    CONFIG += console
    }

    release {
        CONFIG -= console
        DEFINES += QT_NO_DEBUG
        #DESTDIR = $$BUILDDIR/release
    }

    RC_FILE = $$BASEDIR/qgroundcontrol.rc

    # Copy dependencies

    system(cp): {
    # CP command is available, use it instead of copy / xcopy
    message("Using cp to copy image and audio files to executable")
    debug {
        QMAKE_POST_LINK += && cp $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/debug/SDL.dll
        QMAKE_POST_LINK += && cp -r $$BASEDIR/files $$TARGETDIR/debug/files
        QMAKE_POST_LINK += && cp -r $$BASEDIR/models $$TARGETDIR/debug/models
    }

    release {
        QMAKE_POST_LINK += && cp $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/release/SDL.dll
        QMAKE_POST_LINK += && cp -r $$BASEDIR/files $$TARGETDIR/release/files
        QMAKE_POST_LINK += && cp -r $$BASEDIR/models $$TARGETDIR/release/models
    }

    } else {
    # No cp command available, go for copy / xcopy
    # Copy dependencies
    BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
    TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")

    exists($$TARGETDIR/debug) {
        QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll\" \"$$TARGETDIR_WIN\\debug\\SDL.dll\"
        QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\files\" \"$$TARGETDIR_WIN\\debug\\files\\\" /S /E /Y
        QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\debug\\models\\\" /S /E /Y
        QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\images\\earth.html\" \"$$TARGETDIR_WIN\\debug\\earth.html\"
    }

    exists($$TARGETDIR/release) {
        QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll\" \"$$TARGETDIR_WIN\\release\\SDL.dll\"
        QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\files\" \"$$TARGETDIR_WIN\\release\\files\\\" /S /E /Y
        QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\release\\models\\\" /S /E /Y
        QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\images\\earth.html\" \"$$TARGETDIR_WIN\\release\\earth.html\"
    }

}

    # osg/osgEarth dynamic casts might fail without this compiler option.
    # see http://osgearth.org/wiki/FAQ for details.
    QMAKE_CXXFLAGS += -Wl,-E
}
# vim:ts=4:sw=4:expandtab

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
# This file is part of the open groundstation project
# QGroundControl 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.
# QGroundControl 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 QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------

message(Qt version $$[QT_VERSION])
message(Using Qt from $$(QTDIR))

release {
#    DEFINES += QT_NO_DEBUG_OUTPUT
#    DEFINES += QT_NO_WARNING_OUTPUT
}

win32-msvc2008|win32-msvc2010 {
    QMAKE_POST_LINK += $$quote(echo "Copying files"$$escape_expand(\\n))
} else {
    QMAKE_POST_LINK += $$quote(echo "Copying files")
}

# Turn off serial port warnings
DEFINES += _TTY_NOWARN_

# MAC OS X
macx|macx-g++42|macx-g++: {

   # COMPILER_VERSION = $$system(gcc -v)
    #message(Using compiler $$COMPILER_VERSION)

        CONFIG += x86_64 cocoa phonon
        CONFIG -= x86

    #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" ) {
        # x86 Mac OS X Leopard 10.5 and earlier

        #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
                       # CONFIG += console
                #}
    #} else {
        # x64 Mac OS X Snow Leopard 10.6 and later
     #   CONFIG += x86_64 x86 cocoa phonon
        #CONFIG -= x86 # phonon
        #message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
      #          debug {
                        #QMAKE_CXXFLAGS += -finstrument-functions
                        #LIBS += -lSaturn
      #          }
    #}

    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6

    #DESTDIR = $$BASEDIR/bin/mac
    INCLUDEPATH += -framework SDL

    LIBS += -framework IOKit \
        -framework SDL \
        -framework CoreFoundation \
        -framework ApplicationServices \
        -lm

    ICON = $$BASEDIR/images/icons/macx.icns

    # Copy contributed files
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # Copy google earth starter file
    QMAKE_POST_LINK += && cp -f $$BASEDIR/images/earth.html $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # Copy CSS stylesheets
    QMAKE_POST_LINK += && cp -f $$BASEDIR/images/style-mission.css $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/style-indoor.css
    QMAKE_POST_LINK += && cp -f $$BASEDIR/images/style-outdoor.css $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # Copy parameter tooltip files
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # Copy libraries
    QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/qgroundcontrol.app/Contents/libs
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/lib/mac64/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/libs

    # Fix library paths inside executable
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgViewer.dylib "@executable_path/../libs/libosgViewer.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
    QMAKE_POST_LINK += && install_name_tool -change libosgWidget.dylib "@executable_path/../libs/libosgWidget.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol

    # Fix library paths within libraries (inter-library dependencies)

    # OSG GA LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib

    # OSG DB LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib

    # OSG TEXT LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib

    # OSG UTIL LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgUtil.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgUtil.dylib

    # OSG VIEWER LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib

    # OSG WIDGET LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
    QMAKE_POST_LINK += && install_name_tool -change libosgViewer.dylib "@executable_path/../libs/libosgViewer.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib

    # CORE OSG LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosg.dylib

    # Copy model files
    #QMAKE_POST_LINK += && cp -f $$BASEDIR/models/*.dae $$TARGETDIR/qgroundcontrol.app/Contents/MacOs

    #exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
    # No check for GLUT.framework since it's a MAC default
    message("Building support for OpenSceneGraph")
    DEPENDENCIES_PRESENT += osg
    DEFINES += QGC_OSG_ENABLED
    # Include OpenSceneGraph libraries
    INCLUDEPATH += -framework GLUT \
            -framework Cocoa \
            $$BASEDIR/lib/mac64/include

    LIBS += -framework GLUT \
            -framework Cocoa \
            -L$$BASEDIR/lib/mac64/lib \
            -lOpenThreads \
            -losg \
            -losgViewer \
            -losgGA \
            -losgDB \
            -losgText \
            -losgWidget
    #}

    exists(/usr/local/include/google/protobuf) {
    message("Building support for Protocol Buffers")
    DEPENDENCIES_PRESENT += protobuf
    # Include Protocol Buffers libraries
    LIBS += -L/usr/local/lib \
            -lprotobuf \
            -lprotobuf-lite \
            -lprotoc

    DEFINES += QGC_PROTOBUF_ENABLED
    }

    exists(/opt/local/include/libfreenect)|exists(/usr/local/include/libfreenect) {
    message("Building support for libfreenect")
    DEPENDENCIES_PRESENT += libfreenect
    # Include libfreenect libraries
    LIBS += -lfreenect
    DEFINES += QGC_LIBFREENECT_ENABLED
    }
}

# GNU/Linux
linux-g++ {

    CONFIG -= console

    debug {
        #DESTDIR = $$TARGETDIR/debug
        #CONFIG += debug console
    }

    release {
        #DESTDIR = $$TARGETDIR/release
        DEFINES += QT_NO_DEBUG
        #CONFIG -= console
    }

    #QMAKE_POST_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.

message("Compiling for linux 32")

    INCLUDEPATH += /usr/include \
                   /usr/local/include \
                   /usr/include/qt4/phonon

    message(Building for GNU/Linux 32bit/i386)

    LIBS += \
        -L/usr/lib \
        -L/usr/local/lib64 \
        -lm \
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain

    exists(/usr/include/osg) | exists(/usr/local/include/osg) {
    message("Building support for OpenSceneGraph")
    DEPENDENCIES_PRESENT += osg
    # Include OpenSceneGraph libraries
    LIBS += -losg \
            -losgViewer \
            -losgGA \
            -losgDB \
            -losgText \
            -losgQt \
            -lOpenThreads

    DEFINES += QGC_OSG_ENABLED
    DEFINES += QGC_OSG_QT_ENABLED
    }

    exists(/usr/local/include/google/protobuf) {
    message("Building support for Protocol Buffers")
    DEPENDENCIES_PRESENT += protobuf
    # Include Protocol Buffers libraries
    LIBS += -lprotobuf \
            -lprotobuf-lite \
            -lprotoc

    DEFINES += QGC_PROTOBUF_ENABLED
    }

    exists(/usr/local/include/libfreenect/libfreenect.h) {
    message("Building support for libfreenect")
    DEPENDENCIES_PRESENT += libfreenect
    INCLUDEPATH += /usr/include/libusb-1.0
    # Include libfreenect libraries
    LIBS += -lfreenect
    DEFINES += QGC_LIBFREENECT_ENABLED
    }

    # Validated copy commands
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR

    QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR
    QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/images
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$TARGETDIR/images/Vera.ttf

    # osg/osgEarth dynamic casts might fail without this compiler option.
    # see http://osgearth.org/wiki/FAQ for details.
    QMAKE_CXXFLAGS += -Wl,-E
}

linux-g++-64 {

    CONFIG -= console

    debug {
        #DESTDIR = $$TARGETDIR/debug
        #CONFIG += debug console
    }

    release {
        #DESTDIR = $$TARGETDIR/release
        DEFINES += QT_NO_DEBUG
        #CONFIG -= console
    }

    #QMAKE_POST_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.

    INCLUDEPATH += /usr/include \
                   /usr/include/qt4/phonon

    # 64-bit Linux
    message(Building for GNU/Linux 64bit/x64 (g++-64))

    LIBS += \
        -L/usr/lib \
        -L/usr/local/lib64 \
        -lm \
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain

    exists(/usr/include/osg) | exists(/usr/local/include/osg) {
    message("Building support for OpenSceneGraph")
    DEPENDENCIES_PRESENT += osg
    # Include OpenSceneGraph libraries
    LIBS += -losg \
            -losgViewer \
            -losgGA \
            -losgDB \
            -losgText \
            -losgQt \
            -lOpenThreads

    exists(/usr/local/lib64) {
    LIBS += -L/usr/local/lib64
    }

    DEFINES += QGC_OSG_ENABLED
    DEFINES += QGC_OSG_QT_ENABLED
    }

    exists(/usr/local/include/google/protobuf) {
    message("Building support for Protocol Buffers")
    DEPENDENCIES_PRESENT += protobuf
    # Include Protocol Buffers libraries
    LIBS += -lprotobuf \
            -lprotobuf-lite \
            -lprotoc

    DEFINES += QGC_PROTOBUF_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
    }

    # Validated copy commands
    debug {
        !exists($$TARGETDIR/debug){
             QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/debug
        }
        DESTDIR = $$TARGETDIR/debug
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/debug
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/debug
        QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/debug/images
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$TARGETDIR/debug/images/Vera.ttf
    }
    release {
        !exists($$TARGETDIR/release){
             QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/release
        }
        DESTDIR = $$TARGETDIR/release
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/release
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/release
        QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/release/images
        QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$TARGETDIR/release/images/Vera.ttf
    }

    # osg/osgEarth dynamic casts might fail without this compiler option.
    # see http://osgearth.org/wiki/FAQ for details.
    QMAKE_CXXFLAGS += -Wl,-E
}

# Windows (32bit)
win32-msvc2008|win32-msvc2010 {

    win32-msvc2008 {
    message(Building for Windows Visual Studio 2008 (32bit))
    }
    win32-msvc2010 {
    message(Building for Windows Visual Studio 2010 (32bit))
    }

    # QAxContainer support is needed for the Internet Control
    # element showing the Google Earth window
    CONFIG += qaxcontainer

    # The EIGEN library needs this define
    # to make the internal min/max functions work
    DEFINES += NOMINMAX

    # QWebkit is not needed on MS-Windows compilation environment
    CONFIG -= webkit

    release {
        CONFIG -= console
        DEFINES += QT_NO_DEBUG
    }

    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 \
			 -lsetupapi

exists($$BASEDIR/lib/osg123) {
message("Building support for OSG")
DEPENDENCIES_PRESENT += osg

# Include OpenSceneGraph
INCLUDEPATH += $$BASEDIR/lib/osgEarth/win32/include \
    $$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/include
LIBS += -L$$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/lib \
    -losg \
    -losgViewer \
    -losgGA \
    -losgDB \
    -losgText \
    -lOpenThreads
DEFINES += QGC_OSG_ENABLED
}

    RC_FILE = $$BASEDIR/qgroundcontrol.rc

    # Copy dependencies
    BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
    TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")

    CONFIG(debug, debug|release) {
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
        QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\files" "$$TARGETDIR_WIN\\debug\\files" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\models" "$$TARGETDIR_WIN\\debug\\models" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\images\\earth.html" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\debug" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\phonond4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtCored4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtGuid4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtMultimediad4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtNetworkd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtOpenGLd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSqld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSvgd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtWebKitd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXmld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXmlPatternsd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
    }

    CONFIG(release, debug|release) {
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
        QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\files" "$$TARGETDIR_WIN\\release\\files" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\models" "$$TARGETDIR_WIN\\release\\models" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\images\\earth.html" "$$TARGETDIR_WIN\\release\\earth.html" $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\release" /E /I $$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\phonon4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtCore4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtGui4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtMultimedia4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtNetwork4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtOpenGL4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSql4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSvg4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtWebKit4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXml4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXmlPatterns4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(del /F "$$TARGETDIR_WIN\\release\\qgroundcontrol.exp"$$escape_expand(\\n))
		QMAKE_POST_LINK += $$quote(del /F "$$TARGETDIR_WIN\\release\\qgroundcontrol.lib"$$escape_expand(\\n))
    }
}

# Windows (32bit)
win32-g++ {

    message(Building for Windows Platform (32bit))

    # Special settings for debug
    CONFIG += CONSOLE
    OUTPUT += CONSOLE

    # The EIGEN library needs this define
    # to make the internal min/max functions work
    DEFINES += NOMINMAX

    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 \
			 -lsetupapi

    CONFIG += windows

    debug {
        #DESTDIR = $$BUILDDIR/debug
    CONFIG += console
    }

    release {
        CONFIG -= console
        DEFINES += QT_NO_DEBUG
        #DESTDIR = $$BUILDDIR/release
    }

    RC_FILE = $$BASEDIR/qgroundcontrol.rc

    # Copy dependencies

    system(cp): {
    # CP command is available, use it instead of copy / xcopy
    message("Using cp to copy image and audio files to executable")
    debug {
        QMAKE_POST_LINK += && cp $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/debug/SDL.dll
        QMAKE_POST_LINK += && cp -r $$BASEDIR/files $$TARGETDIR/debug/files
        QMAKE_POST_LINK += && cp -r $$BASEDIR/models $$TARGETDIR/debug/models
    }

    release {
        QMAKE_POST_LINK += && cp $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/release/SDL.dll
        QMAKE_POST_LINK += && cp -r $$BASEDIR/files $$TARGETDIR/release/files
        QMAKE_POST_LINK += && cp -r $$BASEDIR/models $$TARGETDIR/release/models
    }

    } else {
    # No cp command available, go for copy / xcopy
    # Copy dependencies
    BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
    TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")

    exists($$TARGETDIR/debug) {
        QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll\" \"$$TARGETDIR_WIN\\debug\\SDL.dll\"
        QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\files\" \"$$TARGETDIR_WIN\\debug\\files\\\" /S /E /Y
        QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\debug\\models\\\" /S /E /Y
        QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\images\\earth.html\" \"$$TARGETDIR_WIN\\debug\\earth.html\"
    }

    exists($$TARGETDIR/release) {
        QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll\" \"$$TARGETDIR_WIN\\release\\SDL.dll\"
        QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\files\" \"$$TARGETDIR_WIN\\release\\files\\\" /S /E /Y
        QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\release\\models\\\" /S /E /Y
        QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\images\\earth.html\" \"$$TARGETDIR_WIN\\release\\earth.html\"
    }

}

    # osg/osgEarth dynamic casts might fail without this compiler option.
    # see http://osgearth.org/wiki/FAQ for details.
    QMAKE_CXXFLAGS += -Wl,-E
}
# vim:ts=4:sw=4:expandtab


Add missing files to wallet.pri

Add missing files to wallet.pri

# Input
DEPENDPATH += . json qt
HEADERS += qt/bitcoingui.h \
    qt/transactiontablemodel.h \
    qt/addresstablemodel.h \
    qt/optionsdialog.h \
    qt/coincontroldialog.h \
    qt/coincontroltreewidget.h \
    qt/sendcoinsdialog.h \
    qt/addressbookpage.h \
    qt/signverifymessagedialog.h \
    qt/aboutdialog.h \
    qt/editaddressdialog.h \
    qt/bitcoinaddressvalidator.h \
    alert.h \
    addrman.h \
    base58.h \
    bignum.h \
    checkpoints.h \
    compat.h \
    coincontrol.h \
    sync.h \
    util.h \
    hash.h \
    uint256.h \
    kernel.h \
    scrypt.h \
    pbkdf2.h \
    serialize.h \
    main.h \
    miner.h \
    net.h \
    key.h \
    db.h \
    txdb.h \
    walletdb.h \
    script.h \
    init.h \
    hash.h \
    bloom.h \
    mruset.h \
    json/json_spirit_writer_template.h \
    json/json_spirit_writer.h \
    json/json_spirit_value.h \
    json/json_spirit_utils.h \
    json/json_spirit_stream_reader.h \
    json/json_spirit_reader_template.h \
    json/json_spirit_reader.h \
    json/json_spirit_error_position.h \
    json/json_spirit.h \
    qt/clientmodel.h \
    qt/guiutil.h \
    qt/transactionrecord.h \
    qt/guiconstants.h \
    qt/optionsmodel.h \
    qt/monitoreddatamapper.h \
    qt/transactiondesc.h \
    qt/transactiondescdialog.h \
    qt/bitcoinamountfield.h \
    wallet.h \
    keystore.h \
    qt/transactionfilterproxy.h \
    qt/transactionview.h \
    qt/walletmodel.h \
    bitcoinrpc.h \
    qt/overviewpage.h \
    qt/ui_overviewpage.h \
    qt/ui_qrcodedialog.h \
    qt/ntp1summary.h \
    qt/ui_ntp1summary.h \
    qt/ui_coldstakingpage.h \
    qt/ui_sendcoinsdialog.h \
    qt/ui_coincontroldialog.h \
    qt/ui_sendcoinsdialog.h \
    qt/ui_addressbookpage.h \
    qt/ui_signverifymessagedialog.h \
    qt/ui_aboutdialog.h \
    qt/ui_editaddressdialog.h \
    qt/ui_transactiondescdialog.h \
    qt/ui_sendcoinsentry.h \
    qt/ui_askpassphrasedialog.h \
    qt/ui_rpcconsole.h \
    qt/ui_optionsdialog.h \
    qt/csvmodelwriter.h \
    crypter.h \
    qt/sendcoinsentry.h \
    qt/qvalidatedlineedit.h \
    qt/bitcoinunits.h \
    qt/qvaluecombobox.h \
    qt/askpassphrasedialog.h \
    qt/neblioupdatedialog.h \
    protocol.h \
    qt/notificator.h \
    qt/qtipcserver.h \
    allocators.h \
    ui_interface.h \
    qt/rpcconsole.h \
    qt/ClickableLabel.h \
    version.h \
    netbase.h \
    clientversion.h \
    threadsafety.h \
    neblioupdater.h \
    neblioversion.h \
    neblioreleaseinfo.h \
    curltools.h \
    qt/messageboxwithtimer.h \
    qt/ntp1/ntp1tokenlistmodel.h \
    qt/ntp1/ntp1tokenlistfilterproxy.h \
    ntp1/ntp1tokenmetadata.h \
    ntp1/ntp1wallet.h \
    qt/ntp1/ntp1tokenlistitemdelegate.h \
    ThreadSafeHashMap.h \
    qt/ntp1sendtokensfeewidget.h \
    ntp1/ntp1script_burn.h \
    ntp1/ntp1tokenminimalmetadata.h \
    qt/ntp1/ntp1listelementtokendata.h \
    qt/sociallinks.h \
    ntp1/ntp1sendtxdata.h \
    NetworkForks.h \
    ntp1/ntp1v1_issuance_static_data.h \
    qt/json/AbstractTreeNode.h  \
    qt/json/JsonNewNodeDialog.h \
    qt/json/JsonTreeModel.h     \
    qt/json/JsonTreeNode.h      \
    qt/json/JsonTreeView.h      \
    qt/ntp1/ntp1createmetadatadialog.h \
    qt/ntp1/ntp1metadatapairwidget.h \
    qt/ntp1/ntp1custommetadatawidget.h \
    qt/ntp1/ntp1metadatapairswidget.h \
    qt/json/NTP1MetadataViewer.h \
    SerializationTester.h \
    blockindexcatalog.h   \
    blockindex.h          \
    outpoint.h            \
    inpoint.h             \
    block.h               \
    transaction.h         \
    globals.h             \
    diskblockindex.h      \
    disktxpos.h           \
    txindex.h             \
    txin.h                \
    txout.h               \
    txmempool.h           \
    merkletx.h            \
    blocklocator.h        \
    udaddress.h           \
    qt/ntp1/issuenewntp1tokendialog.h \
    chainparamsbase.h          \
    chainparams.h              \
    consensus_params.h         \
    amount.h                   \
    crypto_highlevel.h         \
    merkle.h                   \
    wallet_ismine.h            \
    stakemaker.h               \
    addressbook.h              \
    work.h                     \
    validation.h               \
    script_error.h             \
    qt/coldstakinglistitemdelegate.h \
    qt/coldstakingmodel.h            \
    qt/coldstakingpage.h             \
    qt/newstakedelegationdialog.h    \
    coldstakedelegation.h            \
    db/idb.h                         \
    db/lmdb/lmdb.h                   \
    db/lmdb/lmdbtransaction.h        \
    stringmanip.h                    \
    logging/defaultlogger.h          \
    logging/logger.h                 \
    blockreject.h                    \
    blockmetadata.h                  \
    blockindexlrucache.h

HEADERS +=                 \
    ntp1/ntp1tools.h       \
    ntp1/ntp1inpoint.h     \
    ntp1/ntp1outpoint.h    \
    ntp1/ntp1transaction.h \
    ntp1/ntp1txin.h        \
    ntp1/ntp1txout.h       \
    ntp1/ntp1tokentxdata.h \
    ntp1/ntp1apicalls.h    \
    ntp1/ntp1sendtokensonerecipientdata.h \
    ntp1/ntp1script.h      \
    ntp1/ntp1script_issuance.h \
    ntp1/ntp1script_transfer.h

SOURCES += qt/bitcoin.cpp \
    qt/bitcoingui.cpp \
    qt/transactiontablemodel.cpp \
    qt/addresstablemodel.cpp \
    qt/optionsdialog.cpp \
    qt/sendcoinsdialog.cpp \
    qt/coincontroldialog.cpp \
    qt/coincontroltreewidget.cpp \
    qt/addressbookpage.cpp \
    qt/signverifymessagedialog.cpp \
    qt/aboutdialog.cpp \
    qt/editaddressdialog.cpp \
    qt/bitcoinaddressvalidator.cpp \
    alert.cpp \
    version.cpp \
    sync.cpp \
    util.cpp \
    hash.cpp \
    netbase.cpp \
    key.cpp \
    script.cpp \
    main.cpp \
    miner.cpp \
    init.cpp \
    net.cpp \
    bloom.cpp \
    checkpoints.cpp \
    addrman.cpp \
    db.cpp \
    walletdb.cpp \
    qt/clientmodel.cpp \
    qt/guiutil.cpp \
    qt/transactionrecord.cpp \
    qt/optionsmodel.cpp \
    qt/monitoreddatamapper.cpp \
    qt/transactiondesc.cpp \
    qt/transactiondescdialog.cpp \
    qt/bitcoinstrings.cpp \
    qt/bitcoinamountfield.cpp \
    wallet.cpp \
    keystore.cpp \
    qt/transactionfilterproxy.cpp \
    qt/transactionview.cpp \
    qt/walletmodel.cpp \
    bitcoinrpc.cpp \
    rpcdump.cpp \
    rpcnet.cpp \
    rpcmining.cpp \
    rpcwallet.cpp \
    rpcblockchain.cpp \
    rpcrawtransaction.cpp \
    qt/overviewpage.cpp \
    qt/ntp1summary.cpp \
    qt/csvmodelwriter.cpp \
    crypter.cpp \
    qt/sendcoinsentry.cpp \
    qt/qvalidatedlineedit.cpp \
    qt/bitcoinunits.cpp \
    qt/qvaluecombobox.cpp \
    qt/askpassphrasedialog.cpp \
    protocol.cpp \
    qt/notificator.cpp \
    qt/qtipcserver.cpp \
    qt/rpcconsole.cpp \
    qt/ClickableLabel.cpp \
    qt/neblioupdatedialog.cpp \
    qt/messageboxwithtimer.cpp \
    noui.cpp \
    kernel.cpp \
    scrypt-arm.S \
    scrypt-x86.S \
    scrypt-x86_64.S \
    scrypt.cpp \
    pbkdf2.cpp \
    neblioupdater.cpp \
    neblioversion.cpp \
    json/json_spirit_value.cpp \
    json/json_spirit_reader.cpp \
    json/json_spirit_writer.cpp \
    neblioreleaseinfo.cpp \
    curltools.cpp \
    qt/ntp1/ntp1tokenlistmodel.cpp \
    qt/ntp1/ntp1tokenlistfilterproxy.cpp \
    ntp1/ntp1tokenmetadata.cpp \
    ntp1/ntp1wallet.cpp \
    qt/ntp1/ntp1tokenlistitemdelegate.cpp \
    ThreadSafeHashMap.cpp \
    ntp1/ntp1sendtokensonerecipientdata.cpp \
    qt/ntp1sendtokensfeewidget.cpp \
    qt/sociallinks.cpp \
    ntp1/ntp1script_burn.cpp \
    ntp1/ntp1tokenminimalmetadata.cpp \
    ntp1/ntp1sendtxdata.cpp \
    NetworkForks.cpp \
    ntp1/ntp1v1_issuance_static_data.cpp \
    qt/json/AbstractTreeNode.cpp  \
    qt/json/JsonNewNodeDialog.cpp \
    qt/json/JsonTreeModel.cpp     \
    qt/json/JsonTreeNode.cpp      \
    qt/json/JsonTreeView.cpp      \
    qt/json/NTP1MetadataViewer.cpp \
    qt/ntp1/ntp1createmetadatadialog.cpp \
    qt/ntp1/ntp1metadatapairwidget.cpp \
    qt/ntp1/ntp1custommetadatawidget.cpp \
    qt/ntp1/ntp1metadatapairswidget.cpp \
    SerializationTester.cpp \
    blockindexcatalog.cpp \
    blockindex.cpp        \
    outpoint.cpp          \
    inpoint.cpp           \
    block.cpp             \
    transaction.cpp       \
    globals.cpp           \
    diskblockindex.cpp    \
    disktxpos.cpp         \
    txindex.cpp           \
    txin.cpp              \
    txout.cpp             \
    txmempool.cpp         \
    merkletx.cpp          \
    blocklocator.cpp      \
    udaddress.cpp         \
    qt/ntp1/issuenewntp1tokendialog.cpp \
    chainparamsbase.cpp                 \
    chainparams.cpp                     \
    consensus_params.cpp                \
    crypto_highlevel.cpp                \
    merkle.cpp                          \
    wallet_ismine.cpp                   \
    stakemaker.cpp                      \
    addressbook.cpp                     \
    work.cpp                            \
    validation.cpp                      \
    script_error.cpp                    \
    qt/coldstakinglistitemdelegate.cpp  \
    qt/coldstakingmodel.cpp             \
    qt/coldstakingpage.cpp              \
    qt/newstakedelegationdialog.cpp     \
    coldstakedelegation.cpp             \
    coldstakinglistfilterproxy.cpp      \
    db/lmdb/lmdb.cpp                    \
    db/lmdb/lmdbtransaction.cpp         \
    stringmanip.cpp                     \
    logging/defaultlogger.cpp           \
    logging/logger.cpp                  \
    blockreject.cpp                     \
    blockmetadata.cpp                   \
    blockindexlrucache.cpp

SOURCES +=                   \
    ntp1/ntp1tools.cpp       \
    ntp1/ntp1inpoint.cpp     \
    ntp1/ntp1outpoint.cpp    \
    ntp1/ntp1transaction.cpp \
    ntp1/ntp1txin.cpp        \
    ntp1/ntp1txout.cpp       \
    ntp1/ntp1tokentxdata.cpp \
    ntp1/ntp1apicalls.cpp    \
    ntp1/ntp1script.cpp      \
    ntp1/ntp1script_issuance.cpp \
    ntp1/ntp1script_transfer.cpp

contains(NEBLIO_REST, 1) {
    HEADERS += nebliorest.h
    SOURCES += nebliorest.cpp
}

contains(USE_QRCODE, 1) {
HEADERS += qt/qrcodedialog.h
SOURCES += qt/qrcodedialog.cpp
FORMS += qt/forms/qrcodedialog.ui
}

# Input
DEPENDPATH += . json qt
HEADERS += qt/bitcoingui.h \
    qt/transactiontablemodel.h \
    qt/addresstablemodel.h \
    qt/optionsdialog.h \
    qt/coincontroldialog.h \
    qt/coincontroltreewidget.h \
    qt/sendcoinsdialog.h \
    qt/addressbookpage.h \
    qt/signverifymessagedialog.h \
    qt/aboutdialog.h \
    qt/editaddressdialog.h \
    qt/bitcoinaddressvalidator.h \
    alert.h \
    addrman.h \
    base58.h \
    bignum.h \
    checkpoints.h \
    compat.h \
    coincontrol.h \
    sync.h \
    util.h \
    hash.h \
    uint256.h \
    kernel.h \
    scrypt.h \
    pbkdf2.h \
    serialize.h \
    main.h \
    miner.h \
    net.h \
    key.h \
    db.h \
    txdb.h \
    walletdb.h \
    script.h \
    init.h \
    hash.h \
    bloom.h \
    mruset.h \
    json/json_spirit_writer_template.h \
    json/json_spirit_writer.h \
    json/json_spirit_value.h \
    json/json_spirit_utils.h \
    json/json_spirit_stream_reader.h \
    json/json_spirit_reader_template.h \
    json/json_spirit_reader.h \
    json/json_spirit_error_position.h \
    json/json_spirit.h \
    qt/clientmodel.h \
    qt/guiutil.h \
    qt/transactionrecord.h \
    qt/guiconstants.h \
    qt/optionsmodel.h \
    qt/monitoreddatamapper.h \
    qt/transactiondesc.h \
    qt/transactiondescdialog.h \
    qt/bitcoinamountfield.h \
    wallet.h \
    keystore.h \
    qt/transactionfilterproxy.h \
    qt/transactionview.h \
    qt/walletmodel.h \
    bitcoinrpc.h \
    qt/overviewpage.h \
    qt/ui_overviewpage.h \
    qt/ui_qrcodedialog.h \
    qt/ntp1summary.h \
    qt/ui_ntp1summary.h \
    qt/ui_coldstakingpage.h \
    qt/ui_sendcoinsdialog.h \
    qt/ui_coincontroldialog.h \
    qt/ui_sendcoinsdialog.h \
    qt/ui_addressbookpage.h \
    qt/ui_signverifymessagedialog.h \
    qt/ui_aboutdialog.h \
    qt/ui_editaddressdialog.h \
    qt/ui_transactiondescdialog.h \
    qt/ui_sendcoinsentry.h \
    qt/ui_askpassphrasedialog.h \
    qt/ui_rpcconsole.h \
    qt/ui_optionsdialog.h \
    qt/csvmodelwriter.h \
    crypter.h \
    qt/sendcoinsentry.h \
    qt/qvalidatedlineedit.h \
    qt/bitcoinunits.h \
    qt/qvaluecombobox.h \
    qt/askpassphrasedialog.h \
    qt/neblioupdatedialog.h \
    protocol.h \
    qt/notificator.h \
    qt/qtipcserver.h \
    allocators.h \
    ui_interface.h \
    qt/rpcconsole.h \
    qt/ClickableLabel.h \
    version.h \
    netbase.h \
    clientversion.h \
    threadsafety.h \
    neblioupdater.h \
    neblioversion.h \
    neblioreleaseinfo.h \
    curltools.h \
    qt/messageboxwithtimer.h \
    qt/ntp1/ntp1tokenlistmodel.h \
    qt/ntp1/ntp1tokenlistfilterproxy.h \
    ntp1/ntp1tokenmetadata.h \
    ntp1/ntp1wallet.h \
    qt/ntp1/ntp1tokenlistitemdelegate.h \
    ThreadSafeHashMap.h \
    qt/ntp1sendtokensfeewidget.h \
    ntp1/ntp1script_burn.h \
    ntp1/ntp1tokenminimalmetadata.h \
    qt/ntp1/ntp1listelementtokendata.h \
    ntp1/ntp1sendtxdata.h \
    NetworkForks.h \
    ntp1/ntp1v1_issuance_static_data.h \
    qt/json/AbstractTreeNode.h  \
    qt/json/JsonNewNodeDialog.h \
    qt/json/JsonTreeModel.h     \
    qt/json/JsonTreeNode.h      \
    qt/json/JsonTreeView.h      \
    qt/ntp1/ntp1createmetadatadialog.h \
    qt/ntp1/ntp1metadatapairwidget.h \
    qt/ntp1/ntp1custommetadatawidget.h \
    qt/ntp1/ntp1metadatapairswidget.h \
    qt/json/NTP1MetadataViewer.h \
    SerializationTester.h \
    blockindexcatalog.h   \
    blockindex.h          \
    outpoint.h            \
    inpoint.h             \
    block.h               \
    transaction.h         \
    globals.h             \
    diskblockindex.h      \
    disktxpos.h           \
    txindex.h             \
    txin.h                \
    txout.h               \
    txmempool.h           \
    merkletx.h            \
    blocklocator.h        \
    udaddress.h           \
    qt/ntp1/issuenewntp1tokendialog.h \
    chainparamsbase.h          \
    chainparams.h              \
    consensus_params.h         \
    amount.h                   \
    crypto_highlevel.h         \
    merkle.h                   \
    wallet_ismine.h            \
    stakemaker.h               \
    addressbook.h              \
    work.h                     \
    validation.h               \
    script_error.h             \
    qt/coldstakinglistitemdelegate.h \
    qt/coldstakingmodel.h            \
    qt/coldstakingpage.h             \
    qt/newstakedelegationdialog.h    \
    coldstakedelegation.h            \
    db/idb.h                         \
    db/lmdb/lmdb.h                   \
    db/lmdb/lmdbtransaction.h        \
    stringmanip.h                    \
    logging/defaultlogger.h          \
    logging/logger.h                 \
    blockreject.h                    \
    blockmetadata.h                  \
    blockindexlrucache.h

HEADERS +=                 \
    ntp1/ntp1tools.h       \
    ntp1/ntp1inpoint.h     \
    ntp1/ntp1outpoint.h    \
    ntp1/ntp1transaction.h \
    ntp1/ntp1txin.h        \
    ntp1/ntp1txout.h       \
    ntp1/ntp1tokentxdata.h \
    ntp1/ntp1apicalls.h    \
    ntp1/ntp1sendtokensonerecipientdata.h \
    ntp1/ntp1script.h      \
    ntp1/ntp1script_issuance.h \
    ntp1/ntp1script_transfer.h

SOURCES += qt/bitcoin.cpp \
    qt/bitcoingui.cpp \
    qt/transactiontablemodel.cpp \
    qt/addresstablemodel.cpp \
    qt/optionsdialog.cpp \
    qt/sendcoinsdialog.cpp \
    qt/coincontroldialog.cpp \
    qt/coincontroltreewidget.cpp \
    qt/addressbookpage.cpp \
    qt/signverifymessagedialog.cpp \
    qt/aboutdialog.cpp \
    qt/editaddressdialog.cpp \
    qt/bitcoinaddressvalidator.cpp \
    alert.cpp \
    version.cpp \
    sync.cpp \
    util.cpp \
    hash.cpp \
    netbase.cpp \
    key.cpp \
    script.cpp \
    main.cpp \
    miner.cpp \
    init.cpp \
    net.cpp \
    bloom.cpp \
    checkpoints.cpp \
    addrman.cpp \
    db.cpp \
    walletdb.cpp \
    qt/clientmodel.cpp \
    qt/guiutil.cpp \
    qt/transactionrecord.cpp \
    qt/optionsmodel.cpp \
    qt/monitoreddatamapper.cpp \
    qt/transactiondesc.cpp \
    qt/transactiondescdialog.cpp \
    qt/bitcoinstrings.cpp \
    qt/bitcoinamountfield.cpp \
    wallet.cpp \
    keystore.cpp \
    qt/transactionfilterproxy.cpp \
    qt/transactionview.cpp \
    qt/walletmodel.cpp \
    bitcoinrpc.cpp \
    rpcdump.cpp \
    rpcnet.cpp \
    rpcmining.cpp \
    rpcwallet.cpp \
    rpcblockchain.cpp \
    rpcrawtransaction.cpp \
    qt/overviewpage.cpp \
    qt/ntp1summary.cpp \
    qt/csvmodelwriter.cpp \
    crypter.cpp \
    qt/sendcoinsentry.cpp \
    qt/qvalidatedlineedit.cpp \
    qt/bitcoinunits.cpp \
    qt/qvaluecombobox.cpp \
    qt/askpassphrasedialog.cpp \
    protocol.cpp \
    qt/notificator.cpp \
    qt/qtipcserver.cpp \
    qt/rpcconsole.cpp \
    qt/ClickableLabel.cpp \
    qt/neblioupdatedialog.cpp \
    qt/messageboxwithtimer.cpp \
    noui.cpp \
    kernel.cpp \
    scrypt-arm.S \
    scrypt-x86.S \
    scrypt-x86_64.S \
    scrypt.cpp \
    pbkdf2.cpp \
    neblioupdater.cpp \
    neblioversion.cpp \
    json/json_spirit_value.cpp \
    json/json_spirit_reader.cpp \
    json/json_spirit_writer.cpp \
    neblioreleaseinfo.cpp \
    curltools.cpp \
    qt/ntp1/ntp1tokenlistmodel.cpp \
    qt/ntp1/ntp1tokenlistfilterproxy.cpp \
    ntp1/ntp1tokenmetadata.cpp \
    ntp1/ntp1wallet.cpp \
    qt/ntp1/ntp1tokenlistitemdelegate.cpp \
    ThreadSafeHashMap.cpp \
    ntp1/ntp1sendtokensonerecipientdata.cpp \
    qt/ntp1sendtokensfeewidget.cpp \
    ntp1/ntp1script_burn.cpp \
    ntp1/ntp1tokenminimalmetadata.cpp \
    ntp1/ntp1sendtxdata.cpp \
    NetworkForks.cpp \
    ntp1/ntp1v1_issuance_static_data.cpp \
    qt/json/AbstractTreeNode.cpp  \
    qt/json/JsonNewNodeDialog.cpp \
    qt/json/JsonTreeModel.cpp     \
    qt/json/JsonTreeNode.cpp      \
    qt/json/JsonTreeView.cpp      \
    qt/json/NTP1MetadataViewer.cpp \
    qt/ntp1/ntp1createmetadatadialog.cpp \
    qt/ntp1/ntp1metadatapairwidget.cpp \
    qt/ntp1/ntp1custommetadatawidget.cpp \
    qt/ntp1/ntp1metadatapairswidget.cpp \
    SerializationTester.cpp \
    blockindexcatalog.cpp \
    blockindex.cpp        \
    outpoint.cpp          \
    inpoint.cpp           \
    block.cpp             \
    transaction.cpp       \
    globals.cpp           \
    diskblockindex.cpp    \
    disktxpos.cpp         \
    txindex.cpp           \
    txin.cpp              \
    txout.cpp             \
    txmempool.cpp         \
    merkletx.cpp          \
    blocklocator.cpp      \
    udaddress.cpp         \
    qt/ntp1/issuenewntp1tokendialog.cpp \
    chainparamsbase.cpp                 \
    chainparams.cpp                     \
    consensus_params.cpp                \
    crypto_highlevel.cpp                \
    merkle.cpp                          \
    wallet_ismine.cpp                   \
    stakemaker.cpp                      \
    addressbook.cpp                     \
    work.cpp                            \
    validation.cpp                      \
    script_error.cpp                    \
    qt/coldstakinglistitemdelegate.cpp  \
    qt/coldstakingmodel.cpp             \
    qt/coldstakingpage.cpp              \
    qt/newstakedelegationdialog.cpp     \
    coldstakedelegation.cpp             \
    coldstakinglistfilterproxy.cpp      \
    db/lmdb/lmdb.cpp                    \
    db/lmdb/lmdbtransaction.cpp         \
    stringmanip.cpp                     \
    logging/defaultlogger.cpp           \
    logging/logger.cpp                  \
    blockreject.cpp                     \
    blockmetadata.cpp                   \
    blockindexlrucache.cpp

SOURCES +=                   \
    ntp1/ntp1tools.cpp       \
    ntp1/ntp1inpoint.cpp     \
    ntp1/ntp1outpoint.cpp    \
    ntp1/ntp1transaction.cpp \
    ntp1/ntp1txin.cpp        \
    ntp1/ntp1txout.cpp       \
    ntp1/ntp1tokentxdata.cpp \
    ntp1/ntp1apicalls.cpp    \
    ntp1/ntp1script.cpp      \
    ntp1/ntp1script_issuance.cpp \
    ntp1/ntp1script_transfer.cpp

contains(NEBLIO_REST, 1) {
    HEADERS += nebliorest.h
    SOURCES += nebliorest.cpp
}

contains(USE_QRCODE, 1) {
HEADERS += qt/qrcodedialog.h
SOURCES += qt/qrcodedialog.cpp
FORMS += qt/forms/qrcodedialog.ui
}


Utils: Remove outdated warnings exclusions on MSVC

Change-Id: I89d440f4ba781f4b2e5f9cbf84cc638a56a743dc
Reviewed-by: Friedemann Kleint <1b9f2592239daaec4856ccc1cfb4d2d55b35fb71@theqtcompany.com>
Reviewed-by: Christian Kandeler <3aa99dcdd3f0cac61fb81c2a11771c0cc2497607@theqtcompany.com>

dll {
    DEFINES += QTCREATOR_UTILS_LIB
} else {
    DEFINES += QTCREATOR_UTILS_STATIC_LIB
}

QT += script network

CONFIG += exceptions # used by portlist.cpp, textfileformat.cpp, and ssh/*

SOURCES += $$PWD/environment.cpp \
    $$PWD/environmentmodel.cpp \
    $$PWD/qtcprocess.cpp \
    $$PWD/reloadpromptutils.cpp \
    $$PWD/settingsselector.cpp \
    $$PWD/stringutils.cpp \
    $$PWD/textfieldcheckbox.cpp \
    $$PWD/textfieldcombobox.cpp \
    $$PWD/filesearch.cpp \
    $$PWD/pathchooser.cpp \
    $$PWD/pathlisteditor.cpp \
    $$PWD/wizard.cpp \
    $$PWD/wizardpage.cpp \
    $$PWD/filewizardpage.cpp \
    $$PWD/filesystemwatcher.cpp \
    $$PWD/projectintropage.cpp \
    $$PWD/filenamevalidatinglineedit.cpp \
    $$PWD/projectnamevalidatinglineedit.cpp \
    $$PWD/codegeneration.cpp \
    $$PWD/newclasswidget.cpp \
    $$PWD/classnamevalidatinglineedit.cpp \
    $$PWD/linecolumnlabel.cpp \
    $$PWD/fancylineedit.cpp \
    $$PWD/qtcolorbutton.cpp \
    $$PWD/savedaction.cpp \
    $$PWD/synchronousprocess.cpp \
    $$PWD/savefile.cpp \
    $$PWD/fileutils.cpp \
    $$PWD/textfileformat.cpp \
    $$PWD/consoleprocess.cpp \
    $$PWD/uncommentselection.cpp \
    $$PWD/parameteraction.cpp \
    $$PWD/headerviewstretcher.cpp \
    $$PWD/checkablemessagebox.cpp \
    $$PWD/styledbar.cpp \
    $$PWD/stylehelper.cpp \
    $$PWD/iwelcomepage.cpp \
    $$PWD/fancymainwindow.cpp \
    $$PWD/detailsbutton.cpp \
    $$PWD/detailswidget.cpp \
    $$PWD/changeset.cpp \
    $$PWD/faketooltip.cpp \
    $$PWD/htmldocextractor.cpp \
    $$PWD/navigationtreeview.cpp \
    $$PWD/crumblepath.cpp \
    $$PWD/historycompleter.cpp \
    $$PWD/buildablehelperlibrary.cpp \
    $$PWD/annotateditemdelegate.cpp \
    $$PWD/fileinprojectfinder.cpp \
    $$PWD/statuslabel.cpp \
    $$PWD/outputformatter.cpp \
    $$PWD/flowlayout.cpp \
    $$PWD/networkaccessmanager.cpp \
    $$PWD/persistentsettings.cpp \
    $$PWD/completingtextedit.cpp \
    $$PWD/json.cpp \
    $$PWD/portlist.cpp \
    $$PWD/tcpportsgatherer.cpp \
    $$PWD/appmainwindow.cpp \
    $$PWD/sleep.cpp \
    $$PWD/basetreeview.cpp \
    $$PWD/qtcassert.cpp \
    $$PWD/elfreader.cpp \
    $$PWD/bracematcher.cpp \
    $$PWD/proxyaction.cpp \
    $$PWD/elidinglabel.cpp \
    $$PWD/hostosinfo.cpp \
    $$PWD/tooltip/tooltip.cpp \
    $$PWD/tooltip/tips.cpp \
    $$PWD/tooltip/tipcontents.cpp \
    $$PWD/unixutils.cpp \
    $$PWD/ansiescapecodehandler.cpp \
    $$PWD/execmenu.cpp \
    $$PWD/completinglineedit.cpp \
    $$PWD/winutils.cpp \
    $$PWD/itemviews.cpp \
    $$PWD/treemodel.cpp \
    $$PWD/treeviewcombobox.cpp \
    $$PWD/proxycredentialsdialog.cpp \
    $$PWD/macroexpander.cpp \
    $$PWD/theme/theme.cpp

win32:SOURCES += $$PWD/consoleprocess_win.cpp
else:SOURCES += $$PWD/consoleprocess_unix.cpp

HEADERS += \
    $$PWD/environment.h \
    $$PWD/environmentmodel.h \
    $$PWD/qtcprocess.h \
    $$PWD/utils_global.h \
    $$PWD/reloadpromptutils.h \
    $$PWD/settingsselector.h \
    $$PWD/stringutils.h \
    $$PWD/textfieldcheckbox.h \
    $$PWD/textfieldcombobox.h \
    $$PWD/filesearch.h \
    $$PWD/listutils.h \
    $$PWD/pathchooser.h \
    $$PWD/pathlisteditor.h \
    $$PWD/wizard.h \
    $$PWD/wizardpage.h \
    $$PWD/filewizardpage.h \
    $$PWD/filesystemwatcher.h \
    $$PWD/projectintropage.h \
    $$PWD/filenamevalidatinglineedit.h \
    $$PWD/projectnamevalidatinglineedit.h \
    $$PWD/codegeneration.h \
    $$PWD/newclasswidget.h \
    $$PWD/classnamevalidatinglineedit.h \
    $$PWD/linecolumnlabel.h \
    $$PWD/fancylineedit.h \
    $$PWD/qtcolorbutton.h \
    $$PWD/savedaction.h \
    $$PWD/consoleprocess.h \
    $$PWD/consoleprocess_p.h \
    $$PWD/synchronousprocess.h \
    $$PWD/savefile.h \
    $$PWD/fileutils.h \
    $$PWD/textfileformat.h \
    $$PWD/uncommentselection.h \
    $$PWD/parameteraction.h \
    $$PWD/headerviewstretcher.h \
    $$PWD/checkablemessagebox.h \
    $$PWD/qtcassert.h \
    $$PWD/styledbar.h \
    $$PWD/stylehelper.h \
    $$PWD/iwelcomepage.h \
    $$PWD/fancymainwindow.h \
    $$PWD/detailsbutton.h \
    $$PWD/detailswidget.h \
    $$PWD/changeset.h \
    $$PWD/faketooltip.h \
    $$PWD/htmldocextractor.h \
    $$PWD/navigationtreeview.h \
    $$PWD/crumblepath.h \
    $$PWD/historycompleter.h \
    $$PWD/buildablehelperlibrary.h \
    $$PWD/annotateditemdelegate.h \
    $$PWD/fileinprojectfinder.h \
    $$PWD/statuslabel.h \
    $$PWD/outputformatter.h \
    $$PWD/outputformat.h \
    $$PWD/flowlayout.h \
    $$PWD/networkaccessmanager.h \
    $$PWD/persistentsettings.h \
    $$PWD/completingtextedit.h \
    $$PWD/json.h \
    $$PWD/multitask.h \
    $$PWD/runextensions.h \
    $$PWD/portlist.h \
    $$PWD/tcpportsgatherer.h \
    $$PWD/appmainwindow.h \
    $$PWD/sleep.h \
    $$PWD/basetreeview.h \
    $$PWD/elfreader.h \
    $$PWD/bracematcher.h \
    $$PWD/proxyaction.h \
    $$PWD/hostosinfo.h \
    $$PWD/osspecificaspects.h \
    $$PWD/elidinglabel.h \
    $$PWD/tooltip/tooltip.h \
    $$PWD/tooltip/tips.h \
    $$PWD/tooltip/tipcontents.h \
    $$PWD/tooltip/reuse.h \
    $$PWD/tooltip/effects.h \
    $$PWD/unixutils.h \
    $$PWD/ansiescapecodehandler.h \
    $$PWD/execmenu.h \
    $$PWD/completinglineedit.h \
    $$PWD/winutils.h \
    $$PWD/itemviews.h \
    $$PWD/treemodel.h \
    $$PWD/treeviewcombobox.h \
    $$PWD/scopedswap.h \
    $$PWD/algorithm.h \
    $$PWD/QtConcurrentTools \
    $$PWD/proxycredentialsdialog.h \
    $$PWD/macroexpander.h \
    $$PWD/theme/theme.h \
    $$PWD/theme/theme_p.h

FORMS += $$PWD/filewizardpage.ui \
    $$PWD/projectintropage.ui \
    $$PWD/newclasswidget.ui \
    $$PWD/proxycredentialsdialog.ui

RESOURCES += $$PWD/utils.qrc

osx {
    OBJECTIVE_SOURCES += \
        $$PWD/fileutils_mac.mm
    LIBS += -framework Foundation
}

dll {
    DEFINES += QTCREATOR_UTILS_LIB
} else {
    DEFINES += QTCREATOR_UTILS_STATIC_LIB
}

QT += script network

CONFIG += exceptions # used by portlist.cpp, textfileformat.cpp, and ssh/*

win32-msvc* {
    # disable warnings caused by botan headers
    QMAKE_CXXFLAGS += -wd4250 -wd4290
}

SOURCES += $$PWD/environment.cpp \
    $$PWD/environmentmodel.cpp \
    $$PWD/qtcprocess.cpp \
    $$PWD/reloadpromptutils.cpp \
    $$PWD/settingsselector.cpp \
    $$PWD/stringutils.cpp \
    $$PWD/textfieldcheckbox.cpp \
    $$PWD/textfieldcombobox.cpp \
    $$PWD/filesearch.cpp \
    $$PWD/pathchooser.cpp \
    $$PWD/pathlisteditor.cpp \
    $$PWD/wizard.cpp \
    $$PWD/wizardpage.cpp \
    $$PWD/filewizardpage.cpp \
    $$PWD/filesystemwatcher.cpp \
    $$PWD/projectintropage.cpp \
    $$PWD/filenamevalidatinglineedit.cpp \
    $$PWD/projectnamevalidatinglineedit.cpp \
    $$PWD/codegeneration.cpp \
    $$PWD/newclasswidget.cpp \
    $$PWD/classnamevalidatinglineedit.cpp \
    $$PWD/linecolumnlabel.cpp \
    $$PWD/fancylineedit.cpp \
    $$PWD/qtcolorbutton.cpp \
    $$PWD/savedaction.cpp \
    $$PWD/synchronousprocess.cpp \
    $$PWD/savefile.cpp \
    $$PWD/fileutils.cpp \
    $$PWD/textfileformat.cpp \
    $$PWD/consoleprocess.cpp \
    $$PWD/uncommentselection.cpp \
    $$PWD/parameteraction.cpp \
    $$PWD/headerviewstretcher.cpp \
    $$PWD/checkablemessagebox.cpp \
    $$PWD/styledbar.cpp \
    $$PWD/stylehelper.cpp \
    $$PWD/iwelcomepage.cpp \
    $$PWD/fancymainwindow.cpp \
    $$PWD/detailsbutton.cpp \
    $$PWD/detailswidget.cpp \
    $$PWD/changeset.cpp \
    $$PWD/faketooltip.cpp \
    $$PWD/htmldocextractor.cpp \
    $$PWD/navigationtreeview.cpp \
    $$PWD/crumblepath.cpp \
    $$PWD/historycompleter.cpp \
    $$PWD/buildablehelperlibrary.cpp \
    $$PWD/annotateditemdelegate.cpp \
    $$PWD/fileinprojectfinder.cpp \
    $$PWD/statuslabel.cpp \
    $$PWD/outputformatter.cpp \
    $$PWD/flowlayout.cpp \
    $$PWD/networkaccessmanager.cpp \
    $$PWD/persistentsettings.cpp \
    $$PWD/completingtextedit.cpp \
    $$PWD/json.cpp \
    $$PWD/portlist.cpp \
    $$PWD/tcpportsgatherer.cpp \
    $$PWD/appmainwindow.cpp \
    $$PWD/sleep.cpp \
    $$PWD/basetreeview.cpp \
    $$PWD/qtcassert.cpp \
    $$PWD/elfreader.cpp \
    $$PWD/bracematcher.cpp \
    $$PWD/proxyaction.cpp \
    $$PWD/elidinglabel.cpp \
    $$PWD/hostosinfo.cpp \
    $$PWD/tooltip/tooltip.cpp \
    $$PWD/tooltip/tips.cpp \
    $$PWD/tooltip/tipcontents.cpp \
    $$PWD/unixutils.cpp \
    $$PWD/ansiescapecodehandler.cpp \
    $$PWD/execmenu.cpp \
    $$PWD/completinglineedit.cpp \
    $$PWD/winutils.cpp \
    $$PWD/itemviews.cpp \
    $$PWD/treemodel.cpp \
    $$PWD/treeviewcombobox.cpp \
    $$PWD/proxycredentialsdialog.cpp \
    $$PWD/macroexpander.cpp \
    $$PWD/theme/theme.cpp

win32:SOURCES += $$PWD/consoleprocess_win.cpp
else:SOURCES += $$PWD/consoleprocess_unix.cpp

HEADERS += \
    $$PWD/environment.h \
    $$PWD/environmentmodel.h \
    $$PWD/qtcprocess.h \
    $$PWD/utils_global.h \
    $$PWD/reloadpromptutils.h \
    $$PWD/settingsselector.h \
    $$PWD/stringutils.h \
    $$PWD/textfieldcheckbox.h \
    $$PWD/textfieldcombobox.h \
    $$PWD/filesearch.h \
    $$PWD/listutils.h \
    $$PWD/pathchooser.h \
    $$PWD/pathlisteditor.h \
    $$PWD/wizard.h \
    $$PWD/wizardpage.h \
    $$PWD/filewizardpage.h \
    $$PWD/filesystemwatcher.h \
    $$PWD/projectintropage.h \
    $$PWD/filenamevalidatinglineedit.h \
    $$PWD/projectnamevalidatinglineedit.h \
    $$PWD/codegeneration.h \
    $$PWD/newclasswidget.h \
    $$PWD/classnamevalidatinglineedit.h \
    $$PWD/linecolumnlabel.h \
    $$PWD/fancylineedit.h \
    $$PWD/qtcolorbutton.h \
    $$PWD/savedaction.h \
    $$PWD/consoleprocess.h \
    $$PWD/consoleprocess_p.h \
    $$PWD/synchronousprocess.h \
    $$PWD/savefile.h \
    $$PWD/fileutils.h \
    $$PWD/textfileformat.h \
    $$PWD/uncommentselection.h \
    $$PWD/parameteraction.h \
    $$PWD/headerviewstretcher.h \
    $$PWD/checkablemessagebox.h \
    $$PWD/qtcassert.h \
    $$PWD/styledbar.h \
    $$PWD/stylehelper.h \
    $$PWD/iwelcomepage.h \
    $$PWD/fancymainwindow.h \
    $$PWD/detailsbutton.h \
    $$PWD/detailswidget.h \
    $$PWD/changeset.h \
    $$PWD/faketooltip.h \
    $$PWD/htmldocextractor.h \
    $$PWD/navigationtreeview.h \
    $$PWD/crumblepath.h \
    $$PWD/historycompleter.h \
    $$PWD/buildablehelperlibrary.h \
    $$PWD/annotateditemdelegate.h \
    $$PWD/fileinprojectfinder.h \
    $$PWD/statuslabel.h \
    $$PWD/outputformatter.h \
    $$PWD/outputformat.h \
    $$PWD/flowlayout.h \
    $$PWD/networkaccessmanager.h \
    $$PWD/persistentsettings.h \
    $$PWD/completingtextedit.h \
    $$PWD/json.h \
    $$PWD/multitask.h \
    $$PWD/runextensions.h \
    $$PWD/portlist.h \
    $$PWD/tcpportsgatherer.h \
    $$PWD/appmainwindow.h \
    $$PWD/sleep.h \
    $$PWD/basetreeview.h \
    $$PWD/elfreader.h \
    $$PWD/bracematcher.h \
    $$PWD/proxyaction.h \
    $$PWD/hostosinfo.h \
    $$PWD/osspecificaspects.h \
    $$PWD/elidinglabel.h \
    $$PWD/tooltip/tooltip.h \
    $$PWD/tooltip/tips.h \
    $$PWD/tooltip/tipcontents.h \
    $$PWD/tooltip/reuse.h \
    $$PWD/tooltip/effects.h \
    $$PWD/unixutils.h \
    $$PWD/ansiescapecodehandler.h \
    $$PWD/execmenu.h \
    $$PWD/completinglineedit.h \
    $$PWD/winutils.h \
    $$PWD/itemviews.h \
    $$PWD/treemodel.h \
    $$PWD/treeviewcombobox.h \
    $$PWD/scopedswap.h \
    $$PWD/algorithm.h \
    $$PWD/QtConcurrentTools \
    $$PWD/proxycredentialsdialog.h \
    $$PWD/macroexpander.h \
    $$PWD/theme/theme.h \
    $$PWD/theme/theme_p.h

FORMS += $$PWD/filewizardpage.ui \
    $$PWD/projectintropage.ui \
    $$PWD/newclasswidget.ui \
    $$PWD/proxycredentialsdialog.ui

RESOURCES += $$PWD/utils.qrc

osx {
    OBJECTIVE_SOURCES += \
        $$PWD/fileutils_mac.mm
    LIBS += -framework Foundation
}


macOS Catalina project update

macOS Catalina project update

#
# GAMS - General Algebraic Modeling System C++ API
#
# Copyright (c) 2017-2019 GAMS Software GmbH <support@gams.com>
# Copyright (c) 2017-2019 GAMS Development Corp. <support@gams.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

win32 {
    # Switch off warings caused by GAMS headers
    DEFINES += _CRT_SECURE_NO_WARNINGS
}

include (version)
# GAMS_CORE_PATH is Jenkins build switch
GAMS_CORE_TMP = $$(GAMS_CORE_PATH)
!exists($$PWD/gamsinclude.pri) {
    equals(GAMS_CORE_TMP, "") {
        macx {
            GAMSINC = GAMS_DISTRIB=/Applications/GAMS'$$GAMS_DISTRIB_MAJOR'.'$$GAMS_DISTRIB_MINOR'/Resources/sysdir \
                      GAMS_DISTRIB_C_API=\$$GAMS_DISTRIB/apifiles/C/api   \
                      GAMS_DISTRIB_CPP_API=\$$GAMS_DISTRIB/apifiles/C++/api
        }
        unix:!macx {
            GAMSINC = GAMS_DISTRIB=$$(HOME)/gams/gams'$$GAMS_DISTRIB_MAJOR'.'$$GAMS_DISTRIB_MINOR'_linux_x64_64_sfx \
                      GAMS_DISTRIB_C_API=\$$GAMS_DISTRIB/apifiles/C/api   \
                      GAMS_DISTRIB_CPP_API=\$$GAMS_DISTRIB/apifiles/C++/api
        }
        win32 {
            GAMSINC = GAMS_DISTRIB=C:/GAMS/win64/'$$GAMS_DISTRIB_MAJOR'.'$$GAMS_DISTRIB_MINOR' \
                      GAMS_DISTRIB_C_API=\$$GAMS_DISTRIB/apifiles/C/api   \
                      GAMS_DISTRIB_CPP_API=\$$GAMS_DISTRIB/apifiles/C++/api
        }
        write_file($$PWD/gamsinclude.pri,GAMSINC)
    } else {
        GAMSINC = GAMS_DISTRIB=$$(GAMS_CORE_PATH) \
                  GAMS_DISTRIB_C_API=\$$GAMS_DISTRIB/apifiles/C/api   \
                  GAMS_DISTRIB_CPP_API=\$$GAMS_DISTRIB/apifiles/C++/api
        write_file($$PWD/gamsinclude.pri,GAMSINC)
    }
}

exists($$PWD/gamsinclude.pri) {
    include($$PWD/gamsinclude.pri)
}

# GAMS_BUILD is GAMS distrib build switch
GAMS_BUILD_ENV = $$(GAMS_BUILD)
equals(GAMS_BUILD_ENV, "") {
    INCLUDEPATH += $$GAMS_DISTRIB_C_API     \
                   $$GAMS_DISTRIB_CPP_API

    SOURCES +=                                      \
        $$GAMS_DISTRIB_C_API/gclgms.c               \
        $$GAMS_DISTRIB_C_API/gmdcc.c                \
        $$GAMS_DISTRIB_C_API/cfgmcc.c               \
        $$GAMS_DISTRIB_C_API/gevmcc.c               \
        $$GAMS_DISTRIB_C_API/gmomcc.c               \
        $$GAMS_DISTRIB_C_API/optcc.c

    equals(USE_GAMS_DISTRIB_CPP_API_SRC, "true") {
        SOURCES +=                                      \
            $$GAMS_DISTRIB_CPP_API/gamsoptions.cpp      \
            $$GAMS_DISTRIB_CPP_API/gamsoptionsimpl.cpp
    }
} else {
    DEFINES += HAVE_MUTEX
    GSYS_ENV = $$(GSYS)
    equals(GSYS_ENV, "wei") {
        DEFINES += WEI
        DEFINES += CIA_WEX
    }
    equals(GSYS_ENV, "vs8") {
        DEFINES += VS8
        DEFINES += CIA_WIN
    }
    equals(GSYS_ENV, "leg") {
        DEFINES += LEG
        DEFINES += CIA_LEX
        QMAKE_CXXFLAGS += -Werror-implicit-function-declaration -Wreturn-type -Wmissing-declarations -m64
        QMAKE_CFLAGS += -Werror-implicit-function-declaration -Wreturn-type -Wmissing-prototypes -Wmissing-declarations -m64
    }
    equals(GSYS_ENV, "deg") {
        DEFINES += DEG
        DEFINES += CIA_DEX
        QMAKE_CXXFLAGS += -Werror-implicit-function-declaration -Wreturn-type -Wmissing-declarations -m64
        QMAKE_CFLAGS += -Werror-implicit-function-declaration -Wreturn-type -Wmissing-prototypes -Wmissing-declarations -m64
    }
    INCLUDEPATH +=                              \
        $$(GPRODUCTS)/gclib                     \
        $$(GPRODUCTS)/apiwrap/gmdobj            \
        $$(GPRODUCTS)/apiwrap/joat              \
        $$(GPRODUCTS)/apiwrap/optobj            \
        $$(GPRODUCTS)/apiexamples/C++/api

    SOURCES +=                                                  \
        $$(GPRODUCTS)/gclib/gclgms.c                            \
        $$(GPRODUCTS)/gclib/gcmt.c                              \
        $$(GPRODUCTS)/apiwrap/gmdobj/gmdcc.c                    \
        $$(GPRODUCTS)/apiwrap/joat/cfgmcc.c                     \
        $$(GPRODUCTS)/apiwrap/joat/gevmcc.c                     \
        $$(GPRODUCTS)/apiwrap/joat/gmomcc.c                     \
        $$(GPRODUCTS)/apiwrap/optobj/optcc.c

    equals(USE_GAMS_DISTRIB_CPP_API_SRC, "true") {
        SOURCES +=                                                  \
            $$(GPRODUCTS)/apiexamples/C++/api/gamsoptions.cpp       \
            $$(GPRODUCTS)/apiexamples/C++/api/gamsoptionsimpl.cpp
    }
}

#
# GAMS - General Algebraic Modeling System C++ API
#
# Copyright (c) 2017-2019 GAMS Software GmbH <support@gams.com>
# Copyright (c) 2017-2019 GAMS Development Corp. <support@gams.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

win32 {
    # Switch off warings caused by GAMS headers
    DEFINES += _CRT_SECURE_NO_WARNINGS
}

include (version)
# GAMS_CORE_PATH is Jenkins build switch
GAMS_CORE_TMP = $$(GAMS_CORE_PATH)
!exists($$PWD/gamsinclude.pri) {
    equals(GAMS_CORE_TMP, "") {
        macx {
            GAMSINC = GAMS_DISTRIB=/Applications/GAMS'$$GAMS_DISTRIB_MAJOR'.'$$GAMS_DISTRIB_MINOR'/sysdir \
                      GAMS_DISTRIB_C_API=\$$GAMS_DISTRIB/apifiles/C/api   \
                      GAMS_DISTRIB_CPP_API=\$$GAMS_DISTRIB/apifiles/C++/api
        }
        unix:!macx {
            GAMSINC = GAMS_DISTRIB=$$(HOME)/gams/gams'$$GAMS_DISTRIB_MAJOR'.'$$GAMS_DISTRIB_MINOR'_linux_x64_64_sfx \
                      GAMS_DISTRIB_C_API=\$$GAMS_DISTRIB/apifiles/C/api   \
                      GAMS_DISTRIB_CPP_API=\$$GAMS_DISTRIB/apifiles/C++/api
        }
        win32 {
            GAMSINC = GAMS_DISTRIB=C:/GAMS/win64/'$$GAMS_DISTRIB_MAJOR'.'$$GAMS_DISTRIB_MINOR' \
                      GAMS_DISTRIB_C_API=\$$GAMS_DISTRIB/apifiles/C/api   \
                      GAMS_DISTRIB_CPP_API=\$$GAMS_DISTRIB/apifiles/C++/api
        }
        write_file($$PWD/gamsinclude.pri,GAMSINC)
    } else {
        GAMSINC = GAMS_DISTRIB=$$(GAMS_CORE_PATH) \
                  GAMS_DISTRIB_C_API=\$$GAMS_DISTRIB/apifiles/C/api   \
                  GAMS_DISTRIB_CPP_API=\$$GAMS_DISTRIB/apifiles/C++/api
        write_file($$PWD/gamsinclude.pri,GAMSINC)
    }
}

exists($$PWD/gamsinclude.pri) {
    include($$PWD/gamsinclude.pri)
}

# GAMS_BUILD is GAMS distrib build switch
GAMS_BUILD_ENV = $$(GAMS_BUILD)
equals(GAMS_BUILD_ENV, "") {
    INCLUDEPATH += $$GAMS_DISTRIB_C_API     \
                   $$GAMS_DISTRIB_CPP_API

    SOURCES +=                                      \
        $$GAMS_DISTRIB_C_API/gclgms.c               \
        $$GAMS_DISTRIB_C_API/gmdcc.c                \
        $$GAMS_DISTRIB_C_API/cfgmcc.c               \
        $$GAMS_DISTRIB_C_API/gevmcc.c               \
        $$GAMS_DISTRIB_C_API/gmomcc.c               \
        $$GAMS_DISTRIB_C_API/optcc.c

    equals(USE_GAMS_DISTRIB_CPP_API_SRC, "true") {
        SOURCES +=                                      \
            $$GAMS_DISTRIB_CPP_API/gamsoptions.cpp      \
            $$GAMS_DISTRIB_CPP_API/gamsoptionsimpl.cpp
    }
} else {
    DEFINES += HAVE_MUTEX
    GSYS_ENV = $$(GSYS)
    equals(GSYS_ENV, "wei") {
        DEFINES += WEI
        DEFINES += CIA_WEX
    }
    equals(GSYS_ENV, "vs8") {
        DEFINES += VS8
        DEFINES += CIA_WIN
    }
    equals(GSYS_ENV, "leg") {
        DEFINES += LEG
        DEFINES += CIA_LEX
        QMAKE_CXXFLAGS += -Werror-implicit-function-declaration -Wreturn-type -Wmissing-declarations -m64
        QMAKE_CFLAGS += -Werror-implicit-function-declaration -Wreturn-type -Wmissing-prototypes -Wmissing-declarations -m64
    }
    equals(GSYS_ENV, "deg") {
        DEFINES += DEG
        DEFINES += CIA_DEX
        QMAKE_CXXFLAGS += -Werror-implicit-function-declaration -Wreturn-type -Wmissing-declarations -m64
        QMAKE_CFLAGS += -Werror-implicit-function-declaration -Wreturn-type -Wmissing-prototypes -Wmissing-declarations -m64
    }
    INCLUDEPATH +=                              \
        $$(GPRODUCTS)/gclib                     \
        $$(GPRODUCTS)/apiwrap/gmdobj            \
        $$(GPRODUCTS)/apiwrap/joat              \
        $$(GPRODUCTS)/apiwrap/optobj            \
        $$(GPRODUCTS)/apiexamples/C++/api

    SOURCES +=                                                  \
        $$(GPRODUCTS)/gclib/gclgms.c                            \
        $$(GPRODUCTS)/gclib/gcmt.c                              \
        $$(GPRODUCTS)/apiwrap/gmdobj/gmdcc.c                    \
        $$(GPRODUCTS)/apiwrap/joat/cfgmcc.c                     \
        $$(GPRODUCTS)/apiwrap/joat/gevmcc.c                     \
        $$(GPRODUCTS)/apiwrap/joat/gmomcc.c                     \
        $$(GPRODUCTS)/apiwrap/optobj/optcc.c

    equals(USE_GAMS_DISTRIB_CPP_API_SRC, "true") {
        SOURCES +=                                                  \
            $$(GPRODUCTS)/apiexamples/C++/api/gamsoptions.cpp       \
            $$(GPRODUCTS)/apiexamples/C++/api/gamsoptionsimpl.cpp
    }
}