Removed special instructions for Linux leading to qt creator not finding executable

# -------------------------------------------------
# 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 {

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

        CONFIG += x86 cocoa phonon
        CONFIG -= x86_64

    #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 audio files if needed
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # 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 += && cp -rf $$BASEDIR/lib/mac32-gcc40/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # 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/mac32-gcc40/include

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

    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++ {

    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 \
            -losgQt \
            -losgText \
            -lOpenThreads

    DEFINES += QGC_OSG_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/audio $$DESTDIR
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$DESTDIR

    QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$DESTDIR
    QMAKE_POST_LINK += && mkdir -p $$DESTDIR/images
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$DESTDIR/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 {

    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 \
            -losgQt \
            -losgText \
            -lOpenThreads

    DEFINES += QGC_OSG_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
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/audio $$DESTDIR
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$DESTDIR
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$DESTDIR
    QMAKE_POST_LINK += && mkdir -p $$DESTDIR/images
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$DESTDIR/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,"/","\\")

    exists($$TARGETDIR/debug) {
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\audio" "$$TARGETDIR_WIN\\debug\\audio" /E /I $$escape_expand(\\n))
        QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\files" "$$TARGETDIR_WIN\\debug\\files" /E /I $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\models" "$$TARGETDIR_WIN\\debug\\models" /E /I $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\images\\earth.html" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\debug" /E /I /EXCLUDE:copydebug.txt $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\phonond4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtCored4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtGuid4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtMultimediad4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtNetworkd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtOpenGLd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtSqld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtSvgd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtWebKitd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtXmld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtXmlPatternsd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
    }

    exists($$TARGETDIR/release) {
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\audio" "$$TARGETDIR_WIN\\release\\audio" /E /I $$escape_expand(\\n))
        QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\files" "$$TARGETDIR_WIN\\release\\files" /E /I $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\models" "$$TARGETDIR_WIN\\release\\models" /E /I $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\images\\earth.html" "$$TARGETDIR_WIN\\release\\earth.html" $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\release" /E /I /EXCLUDE:copyrelease.txt $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\phonon4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtCore4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtGui4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtMultimedia4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtNetwork4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtOpenGL4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtSql4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtSvg4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtWebKit4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtXml4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /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/audio $$TARGETDIR/debug/audio
        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/audio $$TARGETDIR/release/audio
        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\\audio\" \"$$TARGETDIR_WIN\\debug\\audio\\\" /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\\audio\" \"$$TARGETDIR_WIN\\release\\audio\\\" /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 {

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

        CONFIG += x86 cocoa phonon
        CONFIG -= x86_64

    #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 audio files if needed
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # 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 += && cp -rf $$BASEDIR/lib/mac32-gcc40/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
    # 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/mac32-gcc40/include

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

    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++ {

    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 \
            -losgQt \
            -losgText \
            -lOpenThreads

    DEFINES += QGC_OSG_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/audio $$DESTDIR
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$DESTDIR

    QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$DESTDIR
    QMAKE_POST_LINK += && mkdir -p $$DESTDIR/images
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$DESTDIR/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 {

    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 \
            -losgQt \
            -losgText \
            -lOpenThreads

    DEFINES += QGC_OSG_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
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/audio $$DESTDIR
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$DESTDIR
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$DESTDIR
    QMAKE_POST_LINK += && mkdir -p $$DESTDIR/images
    QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$DESTDIR/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,"/","\\")

    exists($$TARGETDIR/debug) {
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\audio" "$$TARGETDIR_WIN\\debug\\audio" /E /I $$escape_expand(\\n))
        QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\files" "$$TARGETDIR_WIN\\debug\\files" /E /I $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\models" "$$TARGETDIR_WIN\\debug\\models" /E /I $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\images\\earth.html" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\debug" /E /I /EXCLUDE:copydebug.txt $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\phonond4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtCored4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtGuid4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtMultimediad4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtNetworkd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtOpenGLd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtSqld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtSvgd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtWebKitd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtXmld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtXmlPatternsd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
    }

    exists($$TARGETDIR/release) {
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\audio" "$$TARGETDIR_WIN\\release\\audio" /E /I $$escape_expand(\\n))
        QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\files" "$$TARGETDIR_WIN\\release\\files" /E /I $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$BASEDIR_WIN\\models" "$$TARGETDIR_WIN\\release\\models" /E /I $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\images\\earth.html" "$$TARGETDIR_WIN\\release\\earth.html" $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(xcopy /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\release" /E /I /EXCLUDE:copyrelease.txt $$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\phonon4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtCore4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtGui4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtMultimedia4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtNetwork4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtOpenGL4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtSql4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtSvg4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtWebKit4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /Y "$$(QTDIR)\\bin\\QtXml4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
	QMAKE_POST_LINK += $$quote(copy /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/audio $$TARGETDIR/debug/audio
        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/audio $$TARGETDIR/release/audio
        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\\audio\" \"$$TARGETDIR_WIN\\debug\\audio\\\" /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\\audio\" \"$$TARGETDIR_WIN\\release\\audio\\\" /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


Fixup includes and linking of libmaliit-connection in tests

RevBy: Krzesimir Nowak, Jan Arne Petersen
A bit ugly at the moment, but for better transparency in
which tests require what things we would need to split
up the code that goes into maliit server further.
For instance by splitting out the input method plugin interface.

Full, original commit at 10cbc8c3809d12122fd5f002defeea7173a183b7 in maliit-framework

include(../config.pri)

OBJECTS_DIR = .obj
MOC_DIR = .moc
UTILS_DIR = ../utils

CONFIG += debug
QT += testlib xml $$QT_WIDGETS

QMAKE_CLEAN += *.log *~

target.path = $$MALIIT_TEST_LIBDIR/$$TARGET
INSTALLS += target

DEFINES += MALIIT_TEST_DATA_PATH=\\\"$$MALIIT_TEST_LIBDIR\\\"

TOP_DIR = ../..
SRC_DIR = $$TOP_DIR/src

INCLUDEPATH += . \
               $$TOP_DIR \
               $$SRC_DIR \
               $$TOP_DIR/common \
               $$TOP_DIR/connection \
               $$UTILS_DIR \

HEADERS += \
           $$UTILS_DIR/utils.h \

SOURCES += \
           $$UTILS_DIR/utils.cpp \

code_coverage_option=off
for(OPTION,$$list($$lower($$COV_OPTION))){
    isEqual(OPTION, on){
        code_coverage_option=on
    }
}

include(../config.pri)

OBJECTS_DIR = .obj
MOC_DIR = .moc
UTILS_DIR = ../utils

CONFIG += debug
QT += testlib xml $$QT_WIDGETS

QMAKE_CLEAN += *.log *~

target.path = $$MALIIT_TEST_LIBDIR/$$TARGET
INSTALLS += target

DEFINES += MALIIT_TEST_DATA_PATH=\\\"$$MALIIT_TEST_LIBDIR\\\"

TOP_DIR = ../..
SRC_DIR = $$TOP_DIR/src

INCLUDEPATH += . \
               $$TOP_DIR \
               $$SRC_DIR \
               $$TOP_DIR/common \
               $$UTILS_DIR \

HEADERS += \
           $$UTILS_DIR/utils.h \

SOURCES += \
           $$UTILS_DIR/utils.cpp \

code_coverage_option=off
for(OPTION,$$list($$lower($$COV_OPTION))){
    isEqual(OPTION, on){
        code_coverage_option=on
    }
}


add include guard for qtcreator.pri

add include guard for qtcreator.pri

this also covers the higher-level includes for libs and plugins

!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
QTCREATOR_PRI_INCLUDED = 1

defineReplace(cleanPath) {
    win32:1 ~= s|\\\\|/|g
    contains(1, ^/.*):pfx = /
    else:pfx =
    segs = $$split(1, /)
    out =
    for(seg, segs) {
        equals(seg, ..):out = $$member(out, 0, -2)
        else:!equals(seg, .):out += $$seg
    }
    return($$join(out, /, $$pfx))
}

defineReplace(targetPath) {
    return($$replace(1, /, $$QMAKE_DIR_SEP))
}

defineReplace(qtLibraryName) {
   unset(LIBRARY_NAME)
   LIBRARY_NAME = $$1
   CONFIG(debug, debug|release) {
      !debug_and_release|build_pass {
          mac:RET = $$member(LIBRARY_NAME, 0)_debug
              else:win32:RET = $$member(LIBRARY_NAME, 0)d
      }
   }
   isEmpty(RET):RET = $$LIBRARY_NAME
   return($$RET)
}

# For use in custom compilers which just copy files
win32:i_flag = i
defineReplace(stripSrcDir) {
    win32 {
        !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
    } else {
        !contains(1, ^/.*):1 = $$OUT_PWD/$$1
    }
    out = $$cleanPath($$1)
    out ~= s|^$$re_escape($$PWD/)||$$i_flag
    return($$out)
}

isEmpty(TEST):CONFIG(debug, debug|release) {
    !debug_and_release|build_pass {
        TEST = 1
    }
}

isEmpty(IDE_LIBRARY_BASENAME) {
    IDE_LIBRARY_BASENAME = lib
}

DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"

equals(TEST, 1) {
    QT +=testlib
    DEFINES += WITH_TESTS
}

IDE_SOURCE_TREE = $$PWD
isEmpty(IDE_BUILD_TREE) {
    sub_dir = $$_PRO_FILE_PWD_
    sub_dir ~= s,^$$re_escape($$PWD),,
    IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
    IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
macx {
    IDE_APP_TARGET   = "Qt Creator"
    IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DATA_PATH    = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DOC_PATH     = $$IDE_DATA_PATH/doc
    IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
    contains(QT_CONFIG, ppc):CONFIG += ppc x86
    copydata = 1
} else {
    win32 {
        contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
        IDE_APP_TARGET   = qtcreator
    } else {
        IDE_APP_TARGET   = qtcreator
    }
    IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH/plugins
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
    IDE_DATA_PATH    = $$IDE_BUILD_TREE/share/qtcreator
    IDE_DOC_PATH     = $$IDE_BUILD_TREE/share/doc/qtcreator
    IDE_BIN_PATH     = $$IDE_APP_PATH
    !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
}

INCLUDEPATH += \
    $$IDE_SOURCE_TREE/src/libs \
    $$IDE_SOURCE_TREE/tools

DEPENDPATH += \
    $$IDE_SOURCE_TREE/src/libs \
    $$IDE_SOURCE_TREE/tools

LIBS += -L$$IDE_LIBRARY_PATH

#DEFINES += QT_NO_CAST_FROM_ASCII
DEFINES += QT_NO_CAST_TO_ASCII
!macx:DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION

unix {
    CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
    CONFIG(release, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared

    CONFIG(debug, debug|release):MOC_DIR = $${OUT_PWD}/.moc/debug-shared
    CONFIG(release, debug|release):MOC_DIR = $${OUT_PWD}/.moc/release-shared

    RCC_DIR = $${OUT_PWD}/.rcc
    UI_DIR = $${OUT_PWD}/.uic
}

linux-g++-* {
    # Bail out on non-selfcontained libraries. Just a security measure
    # to prevent checking in code that does not compile on other platforms.
    QMAKE_LFLAGS += -Wl,--allow-shlib-undefined -Wl,--no-undefined
}

win32-msvc* {
    #Don't warn about sprintf, fopen etc being 'unsafe'
    DEFINES += _CRT_SECURE_NO_WARNINGS
}

# Handle S60 support: default on Windows, conditionally built on other platforms.
macx:SUPPORT_QT_S60 = $$(QTCREATOR_WITH_S60)
else:SUPPORT_QT_S60=1


Prevent the use of an empty variable for a LIBDIR

Because it's not very sensible to send -L alone to the linker.

Change-Id: Id6556a010c86a42d00dcf97c39df6e1772350ef0
Reviewed-by: Jørgen Lind <6105bb7d7ebdd613cef5835c4a38d29949bd95ac@nokia.com>

CONFIG += module
MODULE_PRI += $$PWD/../../modules/qt_compositor.pri

INCLUDEPATH += $$PWD
DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
DEFINES += QT_BUILD_COMPOSITOR_LIB

!mac:use_pkgconfig {
    CONFIG += link_pkgconfig
    PKGCONFIG += wayland-server

    #set the rpath
    !isEmpty(QMAKE_LFLAGS_RPATH) {
        WAYLAND_NEEDS_RPATH = $$system(pkg-config --libs-only-L wayland-server)
        !isEmpty(WAYLAND_NEEDS_RPATH) {
            WAYLAND_LIBDIR = $$system(pkg-config --variable=libdir wayland-server)
            !isEmpty(WAYLAND_LIBDIR):QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${WAYLAND_LIBDIR}
        }
    }
} else {
    INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND
    !isEmpty(QMAKE_LIBDIR_WAYLAND) {
        LIBS += -L$$QMAKE_LIBDIR_WAYLAND
    }
    LIBS += -lwayland-server -lffi
}

HEADERS += qtcompositorversion.h

include ($$PWD/global/global.pri)
include ($$PWD/wayland_wrapper/wayland_wrapper.pri)
include ($$PWD/hardware_integration/hardware_integration.pri)
include ($$PWD/compositor_api/compositor_api.pri)
include ($$PWD/windowmanagerprotocol/windowmanagerprotocol.pri)

CONFIG += module
MODULE_PRI += $$PWD/../../modules/qt_compositor.pri

INCLUDEPATH += $$PWD
DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
DEFINES += QT_BUILD_COMPOSITOR_LIB

!mac:use_pkgconfig {
    CONFIG += link_pkgconfig
    PKGCONFIG += wayland-server

    #set the rpath
    !isEmpty(QMAKE_LFLAGS_RPATH) {
        WAYLAND_NEEDS_RPATH = $$system(pkg-config --libs-only-L wayland-server)
        !isEmpty(WAYLAND_NEEDS_RPATH) {
            WAYLAND_LIBDIR = $$system(pkg-config --variable=libdir wayland-server)
            !isEmpty(WAYLAND_LIBDIR):QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${WAYLAND_LIBDIR}
        }
    }
} else {
    INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND
    LIBS += -L$$QMAKE_LIBDIR_WAYLAND
    LIBS += -lwayland-server -lffi
}

HEADERS += qtcompositorversion.h

include ($$PWD/global/global.pri)
include ($$PWD/wayland_wrapper/wayland_wrapper.pri)
include ($$PWD/hardware_integration/hardware_integration.pri)
include ($$PWD/compositor_api/compositor_api.pri)
include ($$PWD/windowmanagerprotocol/windowmanagerprotocol.pri)


make access-plugin compile for device

make access-plugin compile for device

Former-commit-id: 5de9ea218fc171396aaf56fc8cfd34b0524810b9
Former-commit-id: 011a92b5fc1edc13fc3d17f9689d0624f607a8a7

# Qt for Embedded Linux

embedded {
	CONFIG -= opengl x11
	LIBS -= -dl
	KERNEL_P        = kernel

	!mac:HEADERS += embedded/qsoundqss_qws.h
	HEADERS += \
		    embedded/qcopchannel_qws.h \
		    embedded/qdecoration_qws.h \
		    embedded/qdecorationfactory_qws.h \
		    embedded/qdecorationplugin_qws.h \
		    embedded/qdirectpainter_qws.h \
		    embedded/qlock_p.h \
		    embedded/qscreen_qws.h \
		    embedded/qscreenmulti_qws_p.h \
		    embedded/qscreenproxy_qws.h \
		    embedded/qwindowsystem_qws.h \
		    embedded/qwindowsystem_p.h \
		    embedded/qwscommand_qws_p.h \
		    embedded/qwscursor_qws.h \
		    embedded/qwsdisplay_qws.h \
		    embedded/qwsdisplay_qws_p.h \
		    embedded/qwsevent_qws.h \
		    embedded/qwsmanager_qws.h \
		    embedded/qwsmanager_p.h \
		    embedded/qwsproperty_qws.h \
		    embedded/qwsprotocolitem_qws.h \
                    embedded/qtransportauth_qws.h \
                    embedded/qtransportauth_qws_p.h \
                    embedded/qtransportauthdefs_qws.h \
		    embedded/qwssocket_qws.h \
		    embedded/qwslock_p.h \
		    embedded/qwsutils_qws.h \
                    embedded/qwssharedmemory_p.h \
		    embedded/qwssignalhandler_p.h \
		    embedded/qwsembedwidget.h

	 !mac:SOURCES += embedded/qsoundqss_qws.cpp
         SOURCES +=  \
		    embedded/qcopchannel_qws.cpp \
		    embedded/qdecoration_qws.cpp \
		    embedded/qdecorationfactory_qws.cpp \
		    embedded/qdecorationplugin_qws.cpp \
		    embedded/qdirectpainter_qws.cpp \
		    embedded/qlock.cpp \
		    embedded/qscreen_qws.cpp \
		    embedded/qscreenmulti_qws.cpp \
		    embedded/qscreenproxy_qws.cpp \
		    embedded/qwindowsystem_qws.cpp \
		    embedded/qwscommand_qws.cpp \
		    embedded/qwscursor_qws.cpp \
		    embedded/qwsevent_qws.cpp \
		    embedded/qwsmanager_qws.cpp \
		    embedded/qwsproperty_qws.cpp \
                    embedded/qtransportauth_qws.cpp \
		    embedded/qwslock.cpp \
                    embedded/qwssharedmemory.cpp \
		    embedded/qwssocket_qws.cpp \
		    embedded/qwssignalhandler.cpp \
		    embedded/qwsembedwidget.cpp

        contains(QT_CONFIG,sxe)|contains(QT_CONFIG,qtopia) {
            SOURCES += embedded/qunixsocket.cpp embedded/qunixsocketserver.cpp
            HEADERS += embedded/qunixsocket_p.h embedded/qunixsocketserver_p.h
        }

#
# Decorations
#
    contains( decorations, default ) {
    	HEADERS += embedded/qdecorationdefault_qws.h
    	SOURCES += embedded/qdecorationdefault_qws.cpp
    }
    contains( decorations, styled ) {
    	HEADERS += embedded/qdecorationstyled_qws.h
    	SOURCES += embedded/qdecorationstyled_qws.cpp
    }

    contains( decorations, windows ) {
    	HEADERS += embedded/qdecorationwindows_qws.h
    	SOURCES += embedded/qdecorationwindows_qws.cpp
    }

#
# Qt for Embedded Linux Drivers
#
	HEADERS += embedded/qscreendriverplugin_qws.h \
		    embedded/qscreendriverfactory_qws.h \
		    embedded/qkbd_qws.h \
		    embedded/qkbd_qws_p.h \
		    embedded/qkbd_defaultmap_qws_p.h \
		    embedded/qkbddriverplugin_qws.h \
		    embedded/qkbddriverfactory_qws.h \
		    embedded/qmouse_qws.h \
		    embedded/qmousedriverplugin_qws.h \
		    embedded/qmousedriverfactory_qws.h

	SOURCES += embedded/qscreendriverplugin_qws.cpp \
		    embedded/qscreendriverfactory_qws.cpp \
		    embedded/qkbd_qws.cpp \
		    embedded/qkbddriverplugin_qws.cpp \
		    embedded/qkbddriverfactory_qws.cpp \
		    embedded/qmouse_qws.cpp \
		    embedded/qmousedriverplugin_qws.cpp \
		    embedded/qmousedriverfactory_qws.cpp

#
# Graphics drivers
#
        contains( gfx-drivers, linuxfb ) {
	        HEADERS += embedded/qscreenlinuxfb_qws.h
		SOURCES += embedded/qscreenlinuxfb_qws.cpp
	}

        contains( gfx-drivers, qnx ) {
                HEADERS += embedded/qscreenqnx_qws.h
                SOURCES += embedded/qscreenqnx_qws.cpp
                LIBS_PRIVATE += -lgf
        }

        contains( gfx-drivers, integrityfb ) {
                HEADERS += embedded/qscreenintegrityfb_qws.h
                SOURCES += embedded/qscreenintegrityfb_qws.cpp
                LIBS += -lfbdev
        }

	contains( gfx-drivers, qvfb ) {
		HEADERS += embedded/qscreenvfb_qws.h
		SOURCES += embedded/qscreenvfb_qws.cpp
	}

	contains( gfx-drivers, vnc ) {
		VNCDIR = $$QT_SOURCE_TREE/src/plugins/gfxdrivers/vnc
		INCLUDEPATH += $$VNCDIR
		HEADERS += $$VNCDIR/qscreenvnc_qws.h \
			   $$VNCDIR/qscreenvnc_p.h
		SOURCES += $$VNCDIR/qscreenvnc_qws.cpp
	}

	contains( gfx-drivers, transformed ) {
		HEADERS += embedded/qscreentransformed_qws.h
		SOURCES += embedded/qscreentransformed_qws.cpp
	}

	contains( gfx-drivers, directfb ) {
		INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/gfxdrivers/directfb
                include($$PWD/directfb.pri)
	}
#
# Keyboard drivers
#
	contains( kbd-drivers, qvfb ) {
		HEADERS +=embedded/qkbdvfb_qws.h
		SOURCES +=embedded/qkbdvfb_qws.cpp
		!contains( kbd-drivers, qvfb ) {
			kbd-drivers += qvfb
		}
        }

	contains( kbd-drivers, tty ) {
		HEADERS +=embedded/qkbdtty_qws.h
		SOURCES +=embedded/qkbdtty_qws.cpp
	}

	contains( kbd-drivers, linuxinput ) {
		HEADERS +=embedded/qkbdlinuxinput_qws.h
		SOURCES +=embedded/qkbdlinuxinput_qws.cpp
	}

	contains( kbd-drivers, um ) {
		HEADERS +=embedded/qkbdum_qws.h
		SOURCES +=embedded/qkbdum_qws.cpp
	}

        contains( kbd-drivers, qnx ) {
                HEADERS += embedded/qkbdqnx_qws.h
                SOURCES += embedded/qkbdqnx_qws.cpp
        }

        contains( kbd-drivers, integrity ) {
                HEADERS += embedded/qkbdintegrity_qws.h
                SOURCES += embedded/qkbdintegrity_qws.cpp
        }

#
# Mouse drivers
#
	contains( mouse-drivers, qvfb ) {
		HEADERS +=embedded/qmousevfb_qws.h
		SOURCES +=embedded/qmousevfb_qws.cpp
	}

	contains( mouse-drivers, pc ) {
		HEADERS +=embedded/qmousepc_qws.h
		SOURCES +=embedded/qmousepc_qws.cpp
	}

	contains( mouse-drivers, linuxtp ) {
		HEADERS +=embedded/qmouselinuxtp_qws.h
		SOURCES +=embedded/qmouselinuxtp_qws.cpp
	}

	contains( mouse-drivers, tslib ) {
		LIBS_PRIVATE += -lts
		HEADERS +=embedded/qmousetslib_qws.h
		SOURCES +=embedded/qmousetslib_qws.cpp
	}

	contains( mouse-drivers, linuxinput ) {
		HEADERS +=embedded/qmouselinuxinput_qws.h
		SOURCES +=embedded/qmouselinuxinput_qws.cpp
        }

        contains( mouse-drivers, qnx ) {
                HEADERS += embedded/qmouseqnx_qws.h
                SOURCES += embedded/qmouseqnx_qws.cpp
        }

	contains( mouse-drivers, integrity ) {
                HEADERS += embedded/qmouseintegrity_qws.h
                SOURCES += embedded/qmouseintegrity_qws.cpp
        }

	HEADERS += ../3rdparty/accessplugin/accessplugininterface.h
	INCLUDEPATH += ../3rdparty/accessplugin
}

# Qt for Embedded Linux

embedded {
	CONFIG -= opengl x11
	LIBS -= -dl
	KERNEL_P        = kernel

	!mac:HEADERS += embedded/qsoundqss_qws.h
	HEADERS += \
		    embedded/qcopchannel_qws.h \
		    embedded/qdecoration_qws.h \
		    embedded/qdecorationfactory_qws.h \
		    embedded/qdecorationplugin_qws.h \
		    embedded/qdirectpainter_qws.h \
		    embedded/qlock_p.h \
		    embedded/qscreen_qws.h \
		    embedded/qscreenmulti_qws_p.h \
		    embedded/qscreenproxy_qws.h \
		    embedded/qwindowsystem_qws.h \
		    embedded/qwindowsystem_p.h \
		    embedded/qwscommand_qws_p.h \
		    embedded/qwscursor_qws.h \
		    embedded/qwsdisplay_qws.h \
		    embedded/qwsdisplay_qws_p.h \
		    embedded/qwsevent_qws.h \
		    embedded/qwsmanager_qws.h \
		    embedded/qwsmanager_p.h \
		    embedded/qwsproperty_qws.h \
		    embedded/qwsprotocolitem_qws.h \
                    embedded/qtransportauth_qws.h \
                    embedded/qtransportauth_qws_p.h \
                    embedded/qtransportauthdefs_qws.h \
		    embedded/qwssocket_qws.h \
		    embedded/qwslock_p.h \
		    embedded/qwsutils_qws.h \
                    embedded/qwssharedmemory_p.h \
		    embedded/qwssignalhandler_p.h \
		    embedded/qwsembedwidget.h

	 !mac:SOURCES += embedded/qsoundqss_qws.cpp
         SOURCES +=  \
		    embedded/qcopchannel_qws.cpp \
		    embedded/qdecoration_qws.cpp \
		    embedded/qdecorationfactory_qws.cpp \
		    embedded/qdecorationplugin_qws.cpp \
		    embedded/qdirectpainter_qws.cpp \
		    embedded/qlock.cpp \
		    embedded/qscreen_qws.cpp \
		    embedded/qscreenmulti_qws.cpp \
		    embedded/qscreenproxy_qws.cpp \
		    embedded/qwindowsystem_qws.cpp \
		    embedded/qwscommand_qws.cpp \
		    embedded/qwscursor_qws.cpp \
		    embedded/qwsevent_qws.cpp \
		    embedded/qwsmanager_qws.cpp \
		    embedded/qwsproperty_qws.cpp \
                    embedded/qtransportauth_qws.cpp \
		    embedded/qwslock.cpp \
                    embedded/qwssharedmemory.cpp \
		    embedded/qwssocket_qws.cpp \
		    embedded/qwssignalhandler.cpp \
		    embedded/qwsembedwidget.cpp

        contains(QT_CONFIG,sxe)|contains(QT_CONFIG,qtopia) {
            SOURCES += embedded/qunixsocket.cpp embedded/qunixsocketserver.cpp
            HEADERS += embedded/qunixsocket_p.h embedded/qunixsocketserver_p.h
        }

#
# Decorations
#
    contains( decorations, default ) {
    	HEADERS += embedded/qdecorationdefault_qws.h
    	SOURCES += embedded/qdecorationdefault_qws.cpp
    }
    contains( decorations, styled ) {
    	HEADERS += embedded/qdecorationstyled_qws.h
    	SOURCES += embedded/qdecorationstyled_qws.cpp
    }

    contains( decorations, windows ) {
    	HEADERS += embedded/qdecorationwindows_qws.h
    	SOURCES += embedded/qdecorationwindows_qws.cpp
    }

#
# Qt for Embedded Linux Drivers
#
	HEADERS += embedded/qscreendriverplugin_qws.h \
		    embedded/qscreendriverfactory_qws.h \
		    embedded/qkbd_qws.h \
		    embedded/qkbd_qws_p.h \
		    embedded/qkbd_defaultmap_qws_p.h \
		    embedded/qkbddriverplugin_qws.h \
		    embedded/qkbddriverfactory_qws.h \
		    embedded/qmouse_qws.h \
		    embedded/qmousedriverplugin_qws.h \
		    embedded/qmousedriverfactory_qws.h

	SOURCES += embedded/qscreendriverplugin_qws.cpp \
		    embedded/qscreendriverfactory_qws.cpp \
		    embedded/qkbd_qws.cpp \
		    embedded/qkbddriverplugin_qws.cpp \
		    embedded/qkbddriverfactory_qws.cpp \
		    embedded/qmouse_qws.cpp \
		    embedded/qmousedriverplugin_qws.cpp \
		    embedded/qmousedriverfactory_qws.cpp

#
# Graphics drivers
#
        contains( gfx-drivers, linuxfb ) {
	        HEADERS += embedded/qscreenlinuxfb_qws.h
		SOURCES += embedded/qscreenlinuxfb_qws.cpp
	}

        contains( gfx-drivers, qnx ) {
                HEADERS += embedded/qscreenqnx_qws.h
                SOURCES += embedded/qscreenqnx_qws.cpp
                LIBS_PRIVATE += -lgf
        }

        contains( gfx-drivers, integrityfb ) {
                HEADERS += embedded/qscreenintegrityfb_qws.h
                SOURCES += embedded/qscreenintegrityfb_qws.cpp
                LIBS += -lfbdev
        }

	contains( gfx-drivers, qvfb ) {
		HEADERS += embedded/qscreenvfb_qws.h
		SOURCES += embedded/qscreenvfb_qws.cpp
	}

	contains( gfx-drivers, vnc ) {
		VNCDIR = $$QT_SOURCE_TREE/src/plugins/gfxdrivers/vnc
		INCLUDEPATH += $$VNCDIR
		HEADERS += $$VNCDIR/qscreenvnc_qws.h \
			   $$VNCDIR/qscreenvnc_p.h
		SOURCES += $$VNCDIR/qscreenvnc_qws.cpp
	}

	contains( gfx-drivers, transformed ) {
		HEADERS += embedded/qscreentransformed_qws.h
		SOURCES += embedded/qscreentransformed_qws.cpp
	}

	contains( gfx-drivers, directfb ) {
		INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/gfxdrivers/directfb
                include($$PWD/directfb.pri)
	}
#
# Keyboard drivers
#
	contains( kbd-drivers, qvfb ) {
		HEADERS +=embedded/qkbdvfb_qws.h
		SOURCES +=embedded/qkbdvfb_qws.cpp
		!contains( kbd-drivers, qvfb ) {
			kbd-drivers += qvfb
		}
        }

	contains( kbd-drivers, tty ) {
		HEADERS +=embedded/qkbdtty_qws.h
		SOURCES +=embedded/qkbdtty_qws.cpp
	}

	contains( kbd-drivers, linuxinput ) {
		HEADERS +=embedded/qkbdlinuxinput_qws.h
		SOURCES +=embedded/qkbdlinuxinput_qws.cpp
	}

	contains( kbd-drivers, um ) {
		HEADERS +=embedded/qkbdum_qws.h
		SOURCES +=embedded/qkbdum_qws.cpp
	}

        contains( kbd-drivers, qnx ) {
                HEADERS += embedded/qkbdqnx_qws.h
                SOURCES += embedded/qkbdqnx_qws.cpp
        }

        contains( kbd-drivers, integrity ) {
                HEADERS += embedded/qkbdintegrity_qws.h
                SOURCES += embedded/qkbdintegrity_qws.cpp
        }

#
# Mouse drivers
#
	contains( mouse-drivers, qvfb ) {
		HEADERS +=embedded/qmousevfb_qws.h
		SOURCES +=embedded/qmousevfb_qws.cpp
	}

	contains( mouse-drivers, pc ) {
		HEADERS +=embedded/qmousepc_qws.h
		SOURCES +=embedded/qmousepc_qws.cpp
	}

	contains( mouse-drivers, linuxtp ) {
		HEADERS +=embedded/qmouselinuxtp_qws.h
		SOURCES +=embedded/qmouselinuxtp_qws.cpp
	}

	contains( mouse-drivers, tslib ) {
		LIBS_PRIVATE += -lts
		HEADERS +=embedded/qmousetslib_qws.h
		SOURCES +=embedded/qmousetslib_qws.cpp
	}

	contains( mouse-drivers, linuxinput ) {
		HEADERS +=embedded/qmouselinuxinput_qws.h
		SOURCES +=embedded/qmouselinuxinput_qws.cpp
        }

        contains( mouse-drivers, qnx ) {
                HEADERS += embedded/qmouseqnx_qws.h
                SOURCES += embedded/qmouseqnx_qws.cpp
        }

	contains( mouse-drivers, integrity ) {
                HEADERS += embedded/qmouseintegrity_qws.h
                SOURCES += embedded/qmouseintegrity_qws.cpp
        }
}


support SUBSYSTEM:CONSOLE[948564]

support SUBSYSTEM:CONSOLE[948564]

#-------------------------------------------------
#
# Project created by QtCreator 2014-08-08T23:19:41
#
#-------------------------------------------------

QT       += core gui xml sql

equals(QT_MAJOR_VERSION, 4){
QT       += network script
CONFIG   += gcc
include(TTKExtra/Qt4/qmmp.pri)
}
equals(QT_MAJOR_VERSION, 5){
QT       += widgets multimediawidgets
include(TTKExtra/Qt5/qmmp.pri)
}

UI_DIR = ./.build/ui/
MOC_DIR = ./.build/moc/
OBJECTS_DIR = ./.build/obj
RCC_DIR = ./.build/rcc

win32{
    LIBS += -lIphlpapi
    equals(QT_MAJOR_VERSION, 5){
        QT  += winextras
        msvc{
            LIBS += -L../bin -lqmmp1
            !contains(QMAKE_TARGET.arch, x86_64){
                 #support on windows XP
                 QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01
                 QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.01
            }
        }

        gcc{
            LIBS += -L../bin -lqmmp1
            QMAKE_CXXFLAGS += -std=c++11
            QMAKE_CXXFLAGS += -Wunused-function
            QMAKE_CXXFLAGS += -Wswitch
        }
    }

    equals(QT_MAJOR_VERSION, 4){
        QT  += multimedia
        gcc{
            LIBS += -L../bin -lqmmp0
            QMAKE_CXXFLAGS += -std=c++11
            QMAKE_CXXFLAGS += -Wunused-function
            QMAKE_CXXFLAGS += -Wswitch
        }
    }
}

unix:!mac{
    equals(QT_MAJOR_VERSION, 4){
        QMAKE_CXXFLAGS += -I/usr/include/QtMultimediaKit \
                          -I/usr/include/QtMobility
        LIBS += -lQtMultimediaKit
    }

    QMAKE_CXXFLAGS += -std=c++11
    QMAKE_CXXFLAGS += -Wunused-function
    QMAKE_CXXFLAGS += -Wswitch
    LIBS += -L../lib -lqmmp
}

TTKMusicPlayer = 2.2.9.1

DEFINES += MUSIC_LIBRARY
DEFINES += USE_MULTIPLE_QUERY

contains(CONFIG, TTK_BUILD_LIB){
  include(TTKCore/musicUi/MusicUi.pri)
}
include(TTKCore/musicCore/MusicCore.pri)
include(TTKCore/musicWidget/MusicWidget.pri)
include(TTKCore/musicLocalsearch/MusicLocalSearch.pri)
include(TTKCore/musicLrcmanager/MusicLrc.pri)
include(TTKCore/musicRemotewidget/MusicRemote.pri)
include(TTKCore/musicToolsetswidget/MusicToolsSets.pri)
include(TTKCore/musicToolswidget/MusicToolsWidget.pri)
include(TTKCore/musicUsermanager/MusicUser.pri)
include(TTKCore/musicVideokits/MusicVideo.pri)

#-------------------------------------------------
#
# Project created by QtCreator 2014-08-08T23:19:41
#
#-------------------------------------------------

QT       += core gui xml sql

equals(QT_MAJOR_VERSION, 4){
QT       += network script
CONFIG   += gcc
include(TTKExtra/Qt4/qmmp.pri)
}
equals(QT_MAJOR_VERSION, 5){
QT       += widgets multimediawidgets
include(TTKExtra/Qt5/qmmp.pri)
}

UI_DIR = ./.build/ui/
MOC_DIR = ./.build/moc/
OBJECTS_DIR = ./.build/obj
RCC_DIR = ./.build/rcc

win32{
    LIBS += -lIphlpapi
    equals(QT_MAJOR_VERSION, 5){
        QT  += winextras
        msvc{
            LIBS += -L../bin -lqmmp1
            !contains(QMAKE_TARGET.arch, x86_64){
                 #support on windows XP
                 QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01
            }
        }

        gcc{
            LIBS += -L../bin -lqmmp1
            QMAKE_CXXFLAGS += -std=c++11
            QMAKE_CXXFLAGS += -Wunused-function
            QMAKE_CXXFLAGS += -Wswitch
        }
    }

    equals(QT_MAJOR_VERSION, 4){
        QT  += multimedia
        gcc{
            LIBS += -L../bin -lqmmp0
            QMAKE_CXXFLAGS += -std=c++11
            QMAKE_CXXFLAGS += -Wunused-function
            QMAKE_CXXFLAGS += -Wswitch
        }
    }
}

unix:!mac{
    equals(QT_MAJOR_VERSION, 4){
        QMAKE_CXXFLAGS += -I/usr/include/QtMultimediaKit \
                          -I/usr/include/QtMobility
        LIBS += -lQtMultimediaKit
    }

    QMAKE_CXXFLAGS += -std=c++11
    QMAKE_CXXFLAGS += -Wunused-function
    QMAKE_CXXFLAGS += -Wswitch
    LIBS += -L../lib -lqmmp
}

TTKMusicPlayer = 2.2.9.1

DEFINES += MUSIC_LIBRARY
DEFINES += USE_MULTIPLE_QUERY

contains(CONFIG, TTK_BUILD_LIB){
  include(TTKCore/musicUi/MusicUi.pri)
}
include(TTKCore/musicCore/MusicCore.pri)
include(TTKCore/musicWidget/MusicWidget.pri)
include(TTKCore/musicLocalsearch/MusicLocalSearch.pri)
include(TTKCore/musicLrcmanager/MusicLrc.pri)
include(TTKCore/musicRemotewidget/MusicRemote.pri)
include(TTKCore/musicToolsetswidget/MusicToolsSets.pri)
include(TTKCore/musicToolswidget/MusicToolsWidget.pri)
include(TTKCore/musicUsermanager/MusicUser.pri)
include(TTKCore/musicVideokits/MusicVideo.pri)


fix typo

fix typo

git-svn-id: e2fa1b4f04257a65cc3162f75ad5f19d327daceb@1737 85bd2434-ea95-11dd-8fb1-9960f2a117f8

# Common definitions

QT += network xml
QXMPP_INCLUDEPATH = $$PWD/src/base $$PWD/src/client $$PWD/src/server
QXMPP_LIBRARY_DIR = $$PWD/lib

CONFIG(debug, debug|release) {
    QXMPP_LIBRARY_NAME = qxmpp_d
} else {
    QXMPP_LIBRARY_NAME = qxmpp
}

# Libraries used internally by QXmpp
symbian {
    QXMPP_INTERNAL_INCLUDES = $$APP_LAYER_SYSTEMINCLUDE
    QXMPP_INTERNAL_LIBS = -lesock
} else:win32 {
    QXMPP_INTERNAL_LIBS = -lws2_32
}

# Libraries for apps which use QXmpp
symbian {
    # Symbian needs a .lib extension to recognise the library as static
    QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}.lib
} else {
    QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}
}

# FIXME: we should be able to use the link_prl option to automatically pull
# in the extra libraries which the qxmpp library needs, but this does not
# seem to work on win32, so we specify the dependencies here:
QXMPP_LIBS += $$QXMPP_INTERNAL_LIBS

# Path of the QXmpp library file, for expressing dependency.
symbian {
} else:unix {
    QXMPP_LIBRARY_FILE = $${QXMPP_LIBRARY_DIR}/lib$${QXMPP_LIBRARY_NAME}.a
}

# Installation prefix and library directory
isEmpty(PREFIX) {
    unix:PREFIX=/usr/local
}
isEmpty(LIBDIR) {
    LIBDIR=lib
}

# Common definitions

QT += network xml
QXMPP_INCLUDEPATH = $$PWD/src/base $$PWD/src/client $$PWD/src/server
QXMPP_LIBRARY_DIR = $$PWD/lib

CONFIG(debug, debug|release) {
    QXMPP_LIBRARY_NAME = qxmpp_d
} else {
    QXMPP_LIBRARY_NAME = qxmpp
}

# Libraries used internal by QXmpp
symbian {
    QXMPP_INTERNAL_INCLUDES = $$APP_LAYER_SYSTEMINCLUDE
    QXMPP_INTERNAL_LIBS = -lesock
} else:win32 {
    QXMPP_INTERNAL_LIBS = -lws2_32
}

# Libraries for apps which use QXmpp
symbian {
    # Symbian needs a .lib extension to recognise the library as static
    QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}.lib
} else {
    QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}
}

# FIXME: we should be able to use the link_prl option to automatically pull
# in the extra libraries which the qxmpp library needs, but this does not
# seem to work on win32, so we specify the dependencies here:
QXMPP_LIBS += $$QXMPP_INTERNAL_LIBS

# Path of the QXmpp library file, for expressing dependency.
symbian {
} else:unix {
    QXMPP_LIBRARY_FILE = $${QXMPP_LIBRARY_DIR}/lib$${QXMPP_LIBRARY_NAME}.a
}

# Installation prefix and library directory
isEmpty(PREFIX) {
    unix:PREFIX=/usr/local
}
isEmpty(LIBDIR) {
    LIBDIR=lib
}


Fixes: Add MALIIT_PLUGINS_QUICK_FACTORY to legacy defines, too

RevBy: TrustMe
Only had MALIIT_PLUGINS_QUICK_FACTORY in defines.pri, but not
defines-legacy.pri. Broke the build when using qmake CONFIG+=enable-legacy.

Full, original commit at fc8c4d30e2fb21a2c7b15ca60633d081c309319b in maliit-framework

MALIIT_PLUGINS = meego-im-plugins
MALIIT_SERVER = meego-im-uiserver
MALIIT_PLUGINS_LIB = meegoimframework
MALIIT_PLUGINS_HEADER = meegoimframework
MALIIT_PLUGINS_QUICK_LIB = meegoimquick
MALIIT_PLUGINS_QUICK_HEADER = meegoimquick
MALIIT_PLUGINS_QUICK_FACTORY = meegoimquickfactory-$${MALIIT_PLUGINS_QUICK_INTERFACE_VERSION}
MALIIT_TEST_SUITE = meego-im-framework-tests
MALIIT_PACKAGENAME = meego-im-framework
MALIIT_PACKAGE_BRIEF = Meego Touch Input Method Framework
MALIIT_ATTRIBUTE_EXTENSIONS = meegoimframework/imtoolbars
MALIIT_CONFIG_ROOT = /meegotouch/inputmethods/
MALIIT_INPUTCONTEXT_NAME = MInputContext
MALIIT_INPUTCONTEXT_TARGETNAME = minputcontext

MALIIT_PLUGINS = meego-im-plugins
MALIIT_SERVER = meego-im-uiserver
MALIIT_PLUGINS_LIB = meegoimframework
MALIIT_PLUGINS_HEADER = meegoimframework
MALIIT_PLUGINS_QUICK_LIB = meegoimquick
MALIIT_PLUGINS_QUICK_HEADER = meegoimquick
MALIIT_TEST_SUITE = meego-im-framework-tests
MALIIT_PACKAGENAME = meego-im-framework
MALIIT_PACKAGE_BRIEF = Meego Touch Input Method Framework
MALIIT_ATTRIBUTE_EXTENSIONS = meegoimframework/imtoolbars
MALIIT_CONFIG_ROOT = /meegotouch/inputmethods/
MALIIT_INPUTCONTEXT_NAME = MInputContext
MALIIT_INPUTCONTEXT_TARGETNAME = minputcontext


adding the new files for the linux build

# color picker dependency
COLOR_PICKER_HEADERS += ./thirdparty/qtcolorpicker-2.6/qtcolorpicker.h
COLOR_PICKER_SOURCES += ./thirdparty/qtcolorpicker-2.6/qtcolorpicker.cpp

# libqxt dependency
LIBQXT_HEADERS += ./thirdparty/libqxt-0.5.0/qxtlogstream.h \
	./thirdparty/libqxt-0.5.0/qxtlogger.h \
	./thirdparty/libqxt-0.5.0/qxtlogger_p.h
LIBQXT_SOURCES += ./thirdparty/libqxt-0.5.0/qxtlogstream.cpp \
	./thirdparty/libqxt-0.5.0/qxtlogger.cpp \
	./thirdparty/libqxt-0.5.0/qxtloggerengine.cpp \
	./thirdparty/libqxt-0.5.0/logengines/qxtabstractiologgerengine.cpp \
	./thirdparty/libqxt-0.5.0/logengines/qxtabstractfileloggerengine.cpp \
	./thirdparty/libqxt-0.5.0/logengines/qxtbasicstdloggerengine.cpp

#Header files
HEADERS += $$COLOR_PICKER_HEADERS \
	$$LIBQXT_HEADERS \
	./inc/customcolor.h \
    ./inc/models/dwarfmodel.h \
    ./inc/models/dwarfmodelproxy.h \
    ./inc/mainwindow.h \
    ./inc/docks/gridviewdock.h \
    ./inc/docks/skilllegenddock.h \
    ./inc/docks/viewcolumnsetdock.h \
    ./inc/aboutdialog.h \
    ./inc/customprofessionsexportdialog.h \
    ./inc/gridviewdialog.h \
    ./inc/optionsmenu.h \
    ./inc/viewcolumnsetdialog.h \
    ./inc/cp437codec.h \
    ./inc/defines.h \
    ./inc/dwarftherapist.h \
    ./inc/gamedatareader.h \
    ./inc/memorylayout.h \
    ./inc/truncatingfilelogger.h \
    ./inc/utils.h \
    ./inc/version.h \
    ./inc/win_structs.h \
    ./inc/customprofession.h \
    ./inc/dfinstance.h \
    ./inc/dwarf.h \
    ./inc/labor.h \
    ./inc/skill.h \
    ./inc/grid_view/columntypes.h \
    ./inc/grid_view/happinesscolumn.h \
    ./inc/grid_view/laborcolumn.h \
    ./inc/grid_view/skillcolumn.h \
    ./inc/grid_view/spacercolumn.h \
    ./inc/grid_view/viewcolumn.h \
    ./inc/grid_view/gridview.h \
    ./inc/statetableview.h \
    ./inc/grid_view/viewcolumnset.h \
    ./inc/viewmanager.h \
    ./inc/rotatedheader.h \
    ./inc/uberdelegate.h \
    ./inc/scannerthread.h \
    ./inc/scanner.h \
    ./inc/scannerjob.h \
    ./inc/translationvectorsearchjob.h \
    ./inc/memorysegment.h \

#Source files
SOURCES += $$COLOR_PICKER_SOURCES \
	$$LIBQXT_SOURCES \
	./src/customcolor.cpp \
    ./src/models/dwarfmodel.cpp \
    ./src/models/dwarfmodelproxy.cpp \
    ./src/mainwindow.cpp \
    ./src/docks/gridviewdock.cpp \
    ./src/docks/skilllegenddock.cpp \
    ./src/docks/viewcolumnsetdock.cpp \
    ./src/aboutdialog.cpp \
    ./src/customprofessionsexportdialog.cpp \
    ./src/gridviewdialog.cpp \
    ./src/optionsmenu.cpp \
    ./src/viewcolumnsetdialog.cpp \
    ./src/dwarftherapist.cpp \
    ./src/gamedatareader.cpp \
    ./src/main.cpp \
    ./src/memorylayout.cpp \
    ./src/customprofession.cpp \
    ./src/dfinstance.cpp \
    ./src/dwarf.cpp \
    ./src/grid_view/happinesscolumn.cpp \
    ./src/grid_view/laborcolumn.cpp \
    ./src/grid_view/skillcolumn.cpp \
    ./src/grid_view/spacercolumn.cpp \
    ./src/grid_view/viewcolumn.cpp \
    ./src/grid_view/gridview.cpp \
    ./src/statetableview.cpp \
    ./src/grid_view/viewcolumnset.cpp \
    ./src/viewmanager.cpp \
    ./src/rotatedheader.cpp \
    ./src/uberdelegate.cpp \
    ./src/scanner.cpp \
    ./src/scannerjob.cpp

#Forms
FORMS += ./ui/about.ui \
    ./ui/columneditdialog.ui \
    ./ui/customprofession.ui \
    ./ui/customprofessionsexportdialog.ui \
    ./ui/gridviewdialog.ui \
    ./ui/gridviewdock.ui \
    ./ui/mainwindow.ui \
    ./ui/optionsmenu.ui \
    ./ui/pendingchanges.ui \
    ./ui/scannerdialog.ui \
    ./ui/viewcolumnsetdialog.ui \
    ./ui/viewcolumnsetdock.ui

#Resource file(s)
RESOURCES += ./images.qrc

# color picker dependency
COLOR_PICKER_HEADERS += ./thirdparty/qtcolorpicker-2.6/qtcolorpicker.h
COLOR_PICKER_SOURCES += ./thirdparty/qtcolorpicker-2.6/qtcolorpicker.cpp

# libqxt dependency
LIBQXT_HEADERS += ./thirdparty/libqxt-0.5.0/qxtlogstream.h \
	./thirdparty/libqxt-0.5.0/qxtlogger.h \
	./thirdparty/libqxt-0.5.0/qxtlogger_p.h
LIBQXT_SOURCES += ./thirdparty/libqxt-0.5.0/qxtlogstream.cpp \
	./thirdparty/libqxt-0.5.0/qxtlogger.cpp \
	./thirdparty/libqxt-0.5.0/qxtloggerengine.cpp \
	./thirdparty/libqxt-0.5.0/logengines/qxtabstractiologgerengine.cpp \
	./thirdparty/libqxt-0.5.0/logengines/qxtabstractfileloggerengine.cpp \
	./thirdparty/libqxt-0.5.0/logengines/qxtbasicstdloggerengine.cpp

#Header files
HEADERS += $$COLOR_PICKER_HEADERS \
	$$LIBQXT_HEADERS \
	./inc/customcolor.h \
    ./inc/models/dwarfmodel.h \
    ./inc/models/dwarfmodelproxy.h \
    ./inc/mainwindow.h \
    ./inc/docks/gridviewdock.h \
    ./inc/docks/skilllegenddock.h \
    ./inc/docks/viewcolumnsetdock.h \
    ./inc/aboutdialog.h \
    ./inc/customprofessionsexportdialog.h \
    ./inc/gridviewdialog.h \
    ./inc/optionsmenu.h \
    ./inc/viewcolumnsetdialog.h \
    ./inc/cp437codec.h \
    ./inc/defines.h \
    ./inc/dwarftherapist.h \
    ./inc/gamedatareader.h \
    ./inc/memorylayout.h \
    ./inc/truncatingfilelogger.h \
    ./inc/utils.h \
    ./inc/version.h \
    ./inc/win_structs.h \
    ./inc/customprofession.h \
    ./inc/dfinstance.h \
    ./inc/dwarf.h \
    ./inc/labor.h \
    ./inc/skill.h \
    ./inc/grid_view/columntypes.h \
    ./inc/grid_view/happinesscolumn.h \
    ./inc/grid_view/laborcolumn.h \
    ./inc/grid_view/skillcolumn.h \
    ./inc/grid_view/spacercolumn.h \
    ./inc/grid_view/viewcolumn.h \
    ./inc/grid_view/gridview.h \
    ./inc/statetableview.h \
    ./inc/grid_view/viewcolumnset.h \
    ./inc/viewmanager.h \
    ./inc/rotatedheader.h \
    ./inc/uberdelegate.h \
    ./inc/scannerthread.h \
    ./inc/scanner.h \
    ./inc/memorysegment.h \

#Source files
SOURCES += $$COLOR_PICKER_SOURCES \
	$$LIBQXT_SOURCES \
	./src/customcolor.cpp \
    ./src/models/dwarfmodel.cpp \
    ./src/models/dwarfmodelproxy.cpp \
    ./src/mainwindow.cpp \
    ./src/docks/gridviewdock.cpp \
    ./src/docks/skilllegenddock.cpp \
    ./src/docks/viewcolumnsetdock.cpp \
    ./src/aboutdialog.cpp \
    ./src/customprofessionsexportdialog.cpp \
    ./src/gridviewdialog.cpp \
    ./src/optionsmenu.cpp \
    ./src/viewcolumnsetdialog.cpp \
    ./src/dwarftherapist.cpp \
    ./src/gamedatareader.cpp \
    ./src/main.cpp \
    ./src/memorylayout.cpp \
    ./src/customprofession.cpp \
    ./src/dfinstance.cpp \
    ./src/dwarf.cpp \
    ./src/grid_view/happinesscolumn.cpp \
    ./src/grid_view/laborcolumn.cpp \
    ./src/grid_view/skillcolumn.cpp \
    ./src/grid_view/spacercolumn.cpp \
    ./src/grid_view/viewcolumn.cpp \
    ./src/grid_view/gridview.cpp \
    ./src/statetableview.cpp \
    ./src/grid_view/viewcolumnset.cpp \
    ./src/viewmanager.cpp \
    ./src/rotatedheader.cpp \
    ./src/uberdelegate.cpp \
    ./src/scanner.cpp

#Forms
FORMS += ./ui/about.ui \
    ./ui/columneditdialog.ui \
    ./ui/customprofession.ui \
    ./ui/customprofessionsexportdialog.ui \
    ./ui/gridviewdialog.ui \
    ./ui/gridviewdock.ui \
    ./ui/mainwindow.ui \
    ./ui/optionsmenu.ui \
    ./ui/pendingchanges.ui \
    ./ui/scannerdialog.ui \
    ./ui/viewcolumnsetdialog.ui \
    ./ui/viewcolumnsetdock.ui

#Resource file(s)
RESOURCES += ./images.qrc


added missing api file include

added missing api file include

#
# GAMS - General Algebraic Modeling System C++ API
#
# Copyright (c) 2017-2020 GAMS Software GmbH <support@gams.com>
# Copyright (c) 2017-2020 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=/Library/Frameworks/GAMS.framework/Versions/'$$GAMS_DISTRIB_MAJOR'/Resources \
                      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/gcmt.c                 \
        $$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-2020 GAMS Software GmbH <support@gams.com>
# Copyright (c) 2017-2020 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=/Library/Frameworks/GAMS.framework/Versions/'$$GAMS_DISTRIB_MAJOR'/Resources \
                      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
    }
}


Fix docs build for out of tree builds

Fix docs build for out of tree builds

#-----------------------------------------------------------------------------
# doc.pri
#-----------------------------------------------------------------------------

# list of documentation folders to install
DOC_FOLDERS = doc/html \
              doc/qch

# files and folders listed in the installation target's .files section
# must exist _before_ qmake generates the Makefile...so, make sure our
# documentation target folders exist in the current build folder
for( folder, DOC_FOLDERS ) {
    system( mkdir -p $$OUT_PWD/$${folder} )
}

#-----------------------------------------------------------------------------
# extra build targets for generating and cleaning documentation
#-----------------------------------------------------------------------------
DOC_INPUT += $${_PRO_FILE_PWD_}/doc/src
DOC_INPUT += $${_PRO_FILE_PWD_}/src

# target for generating documentation
doctarget.target     = docs
doctarget.commands   = OUTPUT_DIRECTORY=doc \
                       PROJECT_NAME=\"$${PROJECT_NAME}\" \
                       PROJECT_NUMBER=\"$${PROJECT_VERSION}\" \
                       STRIP_FROM_PATH=\"$${_PRO_FILE_PWD_}\" \
                       INPUT=\"$${DOC_INPUT}\" \
                       QHP_NAMESPACE=\"com.nokia.example.$${TARGET}\" \
                       QHP_VIRTUAL_FOLDER=\"$${TARGET}\" \
                       TAGFILES=\"$$system(pwd)/qt.tags\" \
                       TAGFILE=\"doc/$${TARGET}.tags\" \
                       doxygen $$system(pwd)/doxy.conf
doctarget.depends    = FORCE
QMAKE_EXTRA_TARGETS += doctarget

# target for cleaning generated documentation
doccleantarget.target = cleandocs
for( folder, DOC_FOLDERS ) {
    doccleantarget.commands += rm -r -f $${folder};
}
doccleantarget.commands += rm -r -f doc/signon.tags;
doccleantarget.depends   = FORCE
QMAKE_EXTRA_TARGETS     += doccleantarget

#-----------------------------------------------------------------------------
# installation setup
# NOTE: remember to set headers.files before this include to have the headers
# properly setup.
#-----------------------------------------------------------------------------
include( ../common-project-config.pri )
include( ../common-installs-config.pri )

#-----------------------------------------------------------------------------
# Installation target setup for documentation
#-----------------------------------------------------------------------------
documentation.path = $${INSTALL_PREFIX}/share/doc/$${PROJECT_NAME}
for( folder, DOC_FOLDERS ) {
    documentation.files += $$OUT_PWD/$${folder}
}
# make sure docs are generated before trying to install anything
documentation.depends  = docs
INSTALLS              += documentation
message("====")
message("==== INSTALLS += documentation")

# End of File

#-----------------------------------------------------------------------------
# doc.pri
#-----------------------------------------------------------------------------

# list of documentation folders to install
DOC_FOLDERS = doc/html \
              doc/qch

# files and folders listed in the installation target's .files section
# must exist _before_ qmake generates the Makefile...so, make sure our
# documentation target folders exist in the current build folder
for( folder, DOC_FOLDERS ) {
    system( mkdir -p $$(PWD)/$${folder} )
}

#-----------------------------------------------------------------------------
# extra build targets for generating and cleaning documentation
#-----------------------------------------------------------------------------
DOC_INPUT += $${_PRO_FILE_PWD_}/doc/src
DOC_INPUT += $${_PRO_FILE_PWD_}/src

# target for generating documentation
doctarget.target     = docs
doctarget.commands   = OUTPUT_DIRECTORY=doc \
                       PROJECT_NAME=\"$${PROJECT_NAME}\" \
                       PROJECT_NUMBER=\"$${PROJECT_VERSION}\" \
                       STRIP_FROM_PATH=\"$${_PRO_FILE_PWD_}\" \
                       INPUT=\"$${DOC_INPUT}\" \
                       QHP_NAMESPACE=\"com.nokia.example.$${TARGET}\" \
                       QHP_VIRTUAL_FOLDER=\"$${TARGET}\" \
                       TAGFILES=\"$$system(pwd)/qt.tags\" \
                       TAGFILE=\"doc/$${TARGET}.tags\" \
                       doxygen $$system(pwd)/doxy.conf
doctarget.depends    = FORCE
QMAKE_EXTRA_TARGETS += doctarget

# target for cleaning generated documentation
doccleantarget.target = cleandocs
for( folder, DOC_FOLDERS ) {
    doccleantarget.commands += rm -r -f $${folder};
}
doccleantarget.commands += rm -r -f doc/signon.tags;
doccleantarget.depends   = FORCE
QMAKE_EXTRA_TARGETS     += doccleantarget

#-----------------------------------------------------------------------------
# installation setup
# NOTE: remember to set headers.files before this include to have the headers
# properly setup.
#-----------------------------------------------------------------------------
include( ../common-project-config.pri )
include( ../common-installs-config.pri )

#-----------------------------------------------------------------------------
# Installation target setup for documentation
#-----------------------------------------------------------------------------
documentation.path = $${INSTALL_PREFIX}/share/doc/$${PROJECT_NAME}
for( folder, DOC_FOLDERS ) {
    documentation.files += $${folder}
}
# make sure docs are generated before trying to install anything
documentation.depends  = docs
INSTALLS              += documentation
message("====")
message("==== INSTALLS += documentation")

# End of File


Fix build on non-G++ and non-X86 systems.

win32 { LIBS += -lwinmm }
linux* { LIBS += -lasound }
haiku* { LIBS += -lbe -lmidi -lmidi2 }

INCLUDEPATH += $$PWD

SOURCES += $$PWD/QMidiOut.cpp \
	$$PWD/QMidiFile.cpp

HEADERS += $$PWD/QMidiOut.h \
	$$PWD/QMidiFile.h

win32 { LIBS += -lwinmm }
linux-g++ { LIBS += -lasound }
haiku-g++ { LIBS += -lbe -lmidi -lmidi2 }

INCLUDEPATH += $$PWD

SOURCES += $$PWD/QMidiOut.cpp \
	$$PWD/QMidiFile.cpp

HEADERS += $$PWD/QMidiOut.h \
	$$PWD/QMidiFile.h