Build: Fixes for compiling for (RedHat-style) Linux, removed reference to SDL2main lib

Explicit linking against SDL2main breaks the build on RedHat/Fedora-style Linux distributions, and seems to be redundant on Ubuntu etc.

#
# Tell the Linux build to look in a few additional places for libs
#

LinuxBuild {
	INCLUDEPATH += \
        /usr/include \
        /usr/local/include

	LIBS += \
		-L/usr/lib

    linux-g++-64 {
        LIBS += \
            -L/usr/local/lib64 \
            -L/usr/lib64
	}
}

#
# Add in a few missing headers to windows
#

WindowsBuild {
    INCLUDEPATH += libs/lib/msinttypes
}

#
# QUpgrade
#

exists(qupgrade) {
    message(Including support for QUpgrade)

    DEFINES += QUPGRADE_SUPPORT

    INCLUDEPATH += qupgrade/src/apps/qupgrade

    FORMS += \
        qupgrade/src/apps/qupgrade/dialog_bare.ui \
        qupgrade/src/apps/qupgrade/boardwidget.ui

    HEADERS += \
        qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.h \
        qupgrade/src/apps/qupgrade/uploader.h \
        qupgrade/src/apps/qupgrade/dialog_bare.h \
        qupgrade/src/apps/qupgrade/boardwidget.h

    SOURCES += \
        qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.cpp \
        qupgrade/src/apps/qupgrade/uploader.cpp \
        qupgrade/src/apps/qupgrade/dialog_bare.cpp \
        qupgrade/src/apps/qupgrade/boardwidget.cpp

    RESOURCES += \
        qupgrade/qupgrade.qrc

    LinuxBuild:CONFIG += qesp_linux_udev

    include(qupgrade/libs/qextserialport/src/qextserialport.pri)
} else {
    message(Skipping support for QUpgrade)
}

#
# MAVLink
#

MAVLINK_CONF = ""
MAVLINKPATH = $$BASEDIR/libs/mavlink/include/mavlink/v1.0
DEFINES += MAVLINK_NO_DATA

# If the user config file exists, it will be included.
# if the variable MAVLINK_CONF contains the name of an
# additional project, QGroundControl includes the support
# of custom MAVLink messages of this project. It will also
# create a QGC_USE_{AUTOPILOT_NAME}_MESSAGES macro for use
# within the actual code.
exists(user_config.pri) {
    include(user_config.pri)
    message("----- USING CUSTOM USER QGROUNDCONTROL CONFIG FROM user_config.pri -----")
    message("Adding support for additional MAVLink messages for: " $$MAVLINK_CONF)
    message("------------------------------------------------------------------------")
} else {
    MAVLINK_CONF += ardupilotmega
}
INCLUDEPATH += $$MAVLINKPATH
isEmpty(MAVLINK_CONF) {
    INCLUDEPATH += $$MAVLINKPATH/common
message("Using mavlink common")
} else {
    INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
message("Using mavlink " + $$MAVLINK_CONF)
    DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
}

#
# MAVLink generator (deprecated)
#

DEPENDPATH += \
    src/apps/mavlinkgen

INCLUDEPATH += \
    src/apps/mavlinkgen \
    src/apps/mavlinkgen/ui \
    src/apps/mavlinkgen/generator

#include(src/apps/mavlinkgen/mavlinkgen.pri)

#
# OpenSceneGraph
#

#Remove OSG support, as it's only valid for Qt4, not Qt5
#MacBuild {
#    # GLUT and OpenSceneGraph are part of standard install on Mac
#	CONFIG += OSGDependency

#    INCLUDEPATH += \
#        $$BASEDIR/libs/lib/mac64/include

#	LIBS += \
#        -L$$BASEDIR/libs/lib/mac64/lib \
#        -losgWidget
#}

#Remove OSG support, as it's only valid for Qt4, not Qt5
#LinuxBuild {
#	exists(/usr/include/osg) | exists(/usr/local/include/osg) {
#        CONFIG += OSGDependency
#        exists(/usr/include/osg/osgQt) | exists(/usr/include/osgQt) | exists(/usr/local/include/osg/osgQt) | exists(/usr/local/include/osgQt) {
#            message("Including support for Linux OpenSceneGraph Qt")
#            LIBS += -losgQt
#            DEFINES += QGC_OSG_QT_ENABLED
#        } else {
#            message("Skipping support for Linux OpenSceneGraph Qt")
#        }
#	}
#}

WindowsBuild {
	exists($$BASEDIR/libs/lib/osg123) {
        CONFIG += OSGDependency

		INCLUDEPATH += \
            $$BASEDIR/libs/lib/osgEarth/win32/include \
			$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/include

		LIBS += -L$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/lib
	}
}

OSGDependency {
    message("Including support for OpenSceneGraph")

	DEFINES += QGC_OSG_ENABLED

    LIBS += \
        -losg \
        -losgViewer \
        -losgGA \
        -losgDB \
        -losgText \
        -lOpenThreads

    HEADERS += \
        src/ui/map3D/gpl.h \
        src/ui/map3D/CameraParams.h \
        src/ui/map3D/ViewParamWidget.h \
        src/ui/map3D/SystemContainer.h \
        src/ui/map3D/SystemViewParams.h \
        src/ui/map3D/GlobalViewParams.h \
        src/ui/map3D/SystemGroupNode.h \
        src/ui/map3D/Q3DWidget.h \
        src/ui/map3D/GCManipulator.h \
        src/ui/map3D/ImageWindowGeode.h \
        src/ui/map3D/PixhawkCheetahNode.h \
        src/ui/map3D/Pixhawk3DWidget.h \
        src/ui/map3D/Q3DWidgetFactory.h \
        src/ui/map3D/WebImageCache.h \
        src/ui/map3D/WebImage.h \
        src/ui/map3D/TextureCache.h \
        src/ui/map3D/Texture.h \
        src/ui/map3D/Imagery.h \
        src/ui/map3D/HUDScaleGeode.h \
        src/ui/map3D/WaypointGroupNode.h \
        src/ui/map3D/TerrainParamDialog.h \
        src/ui/map3D/ImageryParamDialog.h

    SOURCES += \
        src/ui/map3D/gpl.cc \
        src/ui/map3D/CameraParams.cc \
        src/ui/map3D/ViewParamWidget.cc \
        src/ui/map3D/SystemContainer.cc \
        src/ui/map3D/SystemViewParams.cc \
        src/ui/map3D/GlobalViewParams.cc \
        src/ui/map3D/SystemGroupNode.cc \
        src/ui/map3D/Q3DWidget.cc \
        src/ui/map3D/ImageWindowGeode.cc \
        src/ui/map3D/GCManipulator.cc \
        src/ui/map3D/PixhawkCheetahNode.cc \
        src/ui/map3D/Pixhawk3DWidget.cc \
        src/ui/map3D/Q3DWidgetFactory.cc \
        src/ui/map3D/WebImageCache.cc \
        src/ui/map3D/WebImage.cc \
        src/ui/map3D/TextureCache.cc \
        src/ui/map3D/Texture.cc \
        src/ui/map3D/Imagery.cc \
        src/ui/map3D/HUDScaleGeode.cc \
        src/ui/map3D/WaypointGroupNode.cc \
        src/ui/map3D/TerrainParamDialog.cc \
        src/ui/map3D/ImageryParamDialog.cc
} else {
    message("Skipping support for OpenSceneGraph")
}

#
# Google Earth
#

MacBuild | WindowsBuild : contains(GOOGLEEARTH, enable) { #fix this to make sense ;)
    message(Including support for Google Earth)

    HEADERS += src/ui/map3D/QGCGoogleEarthView.h
    SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
    WindowsBuild {
        CONFIG += qaxcontainer
    }
} else {
    message(Skipping support for Google Earth)
}

#
# Protcol Buffers for PixHawk
#

LinuxBuild : contains(MAVLINK_CONF, pixhawk) {
    exists(/usr/local/include/google/protobuf) | exists(/usr/include/google/protobuf) {
        message("Including support for Protocol Buffers")

        DEFINES += QGC_PROTOBUF_ENABLED

        LIBS += \
            -lprotobuf \
            -lprotobuf-lite \
            -lprotoc

        HEADERS += \
            libs/mavlink/include/mavlink/v1.0/pixhawk/pixhawk.pb.h \
            src/ui/map3D/ObstacleGroupNode.h \
            src/ui/map3D/GLOverlayGeode.h

        SOURCES += \
            libs/mavlink/share/mavlink/src/v1.0/pixhawk/pixhawk.pb.cc \
            src/ui/map3D/ObstacleGroupNode.cc \
            src/ui/map3D/GLOverlayGeode.cc
    } else {
        message("Skipping support for Protocol Buffers")
    }
} else {
    message("Skipping support for Protocol Buffers")
}

#
# libfreenect Kinect support
#

MacBuild | LinuxBuild {
    exists(/opt/local/include/libfreenect) | exists(/usr/local/include/libfreenect) {
        message("Including support for libfreenect")

        #INCLUDEPATH += /usr/include/libusb-1.0
        DEFINES += QGC_LIBFREENECT_ENABLED
        LIBS += -lfreenect
        HEADERS += src/input/Freenect.h
        SOURCES += src/input/Freenect.cc
    } else {
        message("Skipping support for libfreenect")
    }
} else {
    message("Skipping support for libfreenect")
}

#
# EIGEN matrix library (NOMINMAX needed to make internal min/max work)
#

INCLUDEPATH += libs/eigen
DEFINES += NOMINMAX

#
# AGLLIB math library
#
include(libs/alglib/alglib.pri)

#
# OPMapControl library (from OpenPilot)
#

#include(libs/utils/utils_external.pri)
include(libs/opmapcontrol/opmapcontrol_external.pri)

DEPENDPATH += \
    libs/utils \
    libs/utils/src \
    libs/opmapcontrol \
    libs/opmapcontrol/src \
    libs/opmapcontrol/src/mapwidget

INCLUDEPATH += \
    libs/utils \
    libs \
    libs/opmapcontrol

WindowsBuild {
    # Used to enumerate serial ports by QSerialPort
	LIBS += -lsetupapi
}

#
# Zip Access Tool (http://quazip.sourceforge.net)
#
include (libs/thirdParty/quazip/quazip.pri)

#
# XBee wireless
#

WindowsBuild {
    #message(Including support for XBee)

    #DEFINES += XBEELINK

    #INCLUDEPATH += libs/thirdParty/libxbee

    #HEADERS += \
    #    src/comm/XbeeLinkInterface.h \
    #    src/comm/XbeeLink.h \
    #    src/comm/HexSpinBox.h \
    #    src/ui/XbeeConfigurationWindow.h \
    #    src/comm/CallConv.h

    #SOURCES += \
    #    src/comm/XbeeLink.cpp \
    #    src/comm/HexSpinBox.cpp \
    #    src/ui/XbeeConfigurationWindow.cpp

    #WindowsBuild {
    #    LIBS += -llibs/thirdParty/libxbee/lib/libxbee
    #}

    #LinuxBuild {
    #    LIBS += -lxbee
    #}
} else:WindowsCrossBuild {
    #LIBS += -llibs/thirdParty/libxbee/lib/libxbee
    message(Skipping support for XBee)
} else {
    message(Skipping support for XBee)
}

#
# 3DConnexion 3d Mice support
#

LinuxBuild : exists(/usr/local/lib/libxdrvlib.so) {
    message("Including support for Magellan 3DxWare")

    DEFINES += MOUSE_ENABLED_LINUX
    DEFINES += ParameterCheck
# Hack: Has to be defined for magellan usage

    INCLUDEPATH *= /usr/local/include
    HEADERS += src/input/Mouse6dofInput.h
    SOURCES += src/input/Mouse6dofInput.cpp
    LIBS += -L/usr/local/lib/ -lxdrvlib
}

WindowsBuild {
    message("Including support for Magellan 3DxWare")

    DEFINES += MOUSE_ENABLED_WIN

    INCLUDEPATH += libs/thirdParty/3DMouse/win

    HEADERS += \
        libs/thirdParty/3DMouse/win/I3dMouseParams.h \
        libs/thirdParty/3DMouse/win/MouseParameters.h \
        libs/thirdParty/3DMouse/win/Mouse3DInput.h \
        src/input/Mouse6dofInput.h

    SOURCES += \
        libs/thirdParty/3DMouse/win/MouseParameters.cpp \
        libs/thirdParty/3DMouse/win/Mouse3DInput.cpp \
        src/input/Mouse6dofInput.cpp
}

#
# Opal RT-LAB Library
#

WindowsBuild : win32 : exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) {
    message("Including support for Opal-RT")

    DEFINES += OPAL_RT

    INCLUDEPATH +=
        src/lib/opalrt
        libs/lib/opal/include \

    FORMS += src/ui/OpalLinkSettings.ui

    HEADERS += \
        src/comm/OpalRT.h \
        src/comm/OpalLink.h \
        src/comm/Parameter.h \
        src/comm/QGCParamID.h \
        src/comm/ParameterList.h \
        src/ui/OpalLinkConfigurationWindow.h

    SOURCES += \
        src/comm/OpalRT.cc \
        src/comm/OpalLink.cc \
        src/comm/Parameter.cc \
        src/comm/QGCParamID.cc \
        src/comm/ParameterList.cc \
        src/ui/OpalLinkConfigurationWindow.cc

    LIBS += \
        -LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \
        -lOpalApi
} else {
    message("Skipping support for Opal-RT")
}

#
# SDL
#

MacBuild {
    INCLUDEPATH += \
        $$BASEDIR/libs/lib/Frameworks/SDL2.framework/Headers

    LIBS += \
        -F$$BASEDIR/libs/lib/Frameworks \
        -framework SDL2
}

LinuxBuild {
	LIBS += \
        -lSDL2
}

WindowsBuild {
	INCLUDEPATH += \
        $$BASEDIR/libs/lib/sdl/msvc/include \

	LIBS += \
        -L$$BASEDIR/libs/lib/sdl/msvc/lib \
        -lSDL2main \
        -lSDL2
}

WindowsCrossBuild {
        INCLUDEPATH += \
        $$BASEDIR/libs/lib/sdl/include \

        LIBS += \
        -Llibs/lib/sdl/win32 \
        -lSDL2.dll
}

#
# Festival Lite speech synthesis engine
#

LinuxBuild {
	LIBS += \
		-lflite_cmu_us_kal \
		-lflite_usenglish \
		-lflite_cmulex \
		-lflite
}

#
# Tell the Linux build to look in a few additional places for libs
#

LinuxBuild {
	INCLUDEPATH += \
        /usr/include \
        /usr/local/include

	LIBS += \
		-L/usr/lib

    linux-g++-64 {
        LIBS += \
            -L/usr/local/lib64 \
            -L/usr/lib64
	}
}

#
# Add in a few missing headers to windows
#

WindowsBuild {
    INCLUDEPATH += libs/lib/msinttypes
}

#
# QUpgrade
#

exists(qupgrade) {
    message(Including support for QUpgrade)

    DEFINES += QUPGRADE_SUPPORT

    INCLUDEPATH += qupgrade/src/apps/qupgrade

    FORMS += \
        qupgrade/src/apps/qupgrade/dialog_bare.ui \
        qupgrade/src/apps/qupgrade/boardwidget.ui

    HEADERS += \
        qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.h \
        qupgrade/src/apps/qupgrade/uploader.h \
        qupgrade/src/apps/qupgrade/dialog_bare.h \
        qupgrade/src/apps/qupgrade/boardwidget.h

    SOURCES += \
        qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.cpp \
        qupgrade/src/apps/qupgrade/uploader.cpp \
        qupgrade/src/apps/qupgrade/dialog_bare.cpp \
        qupgrade/src/apps/qupgrade/boardwidget.cpp

    RESOURCES += \
        qupgrade/qupgrade.qrc

    LinuxBuild:CONFIG += qesp_linux_udev

    include(qupgrade/libs/qextserialport/src/qextserialport.pri)
} else {
    message(Skipping support for QUpgrade)
}

#
# MAVLink
#

MAVLINK_CONF = ""
MAVLINKPATH = $$BASEDIR/libs/mavlink/include/mavlink/v1.0
DEFINES += MAVLINK_NO_DATA

# If the user config file exists, it will be included.
# if the variable MAVLINK_CONF contains the name of an
# additional project, QGroundControl includes the support
# of custom MAVLink messages of this project. It will also
# create a QGC_USE_{AUTOPILOT_NAME}_MESSAGES macro for use
# within the actual code.
exists(user_config.pri) {
    include(user_config.pri)
    message("----- USING CUSTOM USER QGROUNDCONTROL CONFIG FROM user_config.pri -----")
    message("Adding support for additional MAVLink messages for: " $$MAVLINK_CONF)
    message("------------------------------------------------------------------------")
} else {
    MAVLINK_CONF += ardupilotmega
}
INCLUDEPATH += $$MAVLINKPATH
isEmpty(MAVLINK_CONF) {
    INCLUDEPATH += $$MAVLINKPATH/common
message("Using mavlink common")
} else {
    INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
message("Using mavlink " + $$MAVLINK_CONF)
    DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
}

#
# MAVLink generator (deprecated)
#

DEPENDPATH += \
    src/apps/mavlinkgen

INCLUDEPATH += \
    src/apps/mavlinkgen \
    src/apps/mavlinkgen/ui \
    src/apps/mavlinkgen/generator

#include(src/apps/mavlinkgen/mavlinkgen.pri)

#
# OpenSceneGraph
#

#Remove OSG support, as it's only valid for Qt4, not Qt5
#MacBuild {
#    # GLUT and OpenSceneGraph are part of standard install on Mac
#	CONFIG += OSGDependency

#    INCLUDEPATH += \
#        $$BASEDIR/libs/lib/mac64/include

#	LIBS += \
#        -L$$BASEDIR/libs/lib/mac64/lib \
#        -losgWidget
#}

#Remove OSG support, as it's only valid for Qt4, not Qt5
#LinuxBuild {
#	exists(/usr/include/osg) | exists(/usr/local/include/osg) {
#        CONFIG += OSGDependency
#        exists(/usr/include/osg/osgQt) | exists(/usr/include/osgQt) | exists(/usr/local/include/osg/osgQt) | exists(/usr/local/include/osgQt) {
#            message("Including support for Linux OpenSceneGraph Qt")
#            LIBS += -losgQt
#            DEFINES += QGC_OSG_QT_ENABLED
#        } else {
#            message("Skipping support for Linux OpenSceneGraph Qt")
#        }
#	}
#}

WindowsBuild {
	exists($$BASEDIR/libs/lib/osg123) {
        CONFIG += OSGDependency

		INCLUDEPATH += \
            $$BASEDIR/libs/lib/osgEarth/win32/include \
			$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/include

		LIBS += -L$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/lib
	}
}

OSGDependency {
    message("Including support for OpenSceneGraph")

	DEFINES += QGC_OSG_ENABLED

    LIBS += \
        -losg \
        -losgViewer \
        -losgGA \
        -losgDB \
        -losgText \
        -lOpenThreads

    HEADERS += \
        src/ui/map3D/gpl.h \
        src/ui/map3D/CameraParams.h \
        src/ui/map3D/ViewParamWidget.h \
        src/ui/map3D/SystemContainer.h \
        src/ui/map3D/SystemViewParams.h \
        src/ui/map3D/GlobalViewParams.h \
        src/ui/map3D/SystemGroupNode.h \
        src/ui/map3D/Q3DWidget.h \
        src/ui/map3D/GCManipulator.h \
        src/ui/map3D/ImageWindowGeode.h \
        src/ui/map3D/PixhawkCheetahNode.h \
        src/ui/map3D/Pixhawk3DWidget.h \
        src/ui/map3D/Q3DWidgetFactory.h \
        src/ui/map3D/WebImageCache.h \
        src/ui/map3D/WebImage.h \
        src/ui/map3D/TextureCache.h \
        src/ui/map3D/Texture.h \
        src/ui/map3D/Imagery.h \
        src/ui/map3D/HUDScaleGeode.h \
        src/ui/map3D/WaypointGroupNode.h \
        src/ui/map3D/TerrainParamDialog.h \
        src/ui/map3D/ImageryParamDialog.h

    SOURCES += \
        src/ui/map3D/gpl.cc \
        src/ui/map3D/CameraParams.cc \
        src/ui/map3D/ViewParamWidget.cc \
        src/ui/map3D/SystemContainer.cc \
        src/ui/map3D/SystemViewParams.cc \
        src/ui/map3D/GlobalViewParams.cc \
        src/ui/map3D/SystemGroupNode.cc \
        src/ui/map3D/Q3DWidget.cc \
        src/ui/map3D/ImageWindowGeode.cc \
        src/ui/map3D/GCManipulator.cc \
        src/ui/map3D/PixhawkCheetahNode.cc \
        src/ui/map3D/Pixhawk3DWidget.cc \
        src/ui/map3D/Q3DWidgetFactory.cc \
        src/ui/map3D/WebImageCache.cc \
        src/ui/map3D/WebImage.cc \
        src/ui/map3D/TextureCache.cc \
        src/ui/map3D/Texture.cc \
        src/ui/map3D/Imagery.cc \
        src/ui/map3D/HUDScaleGeode.cc \
        src/ui/map3D/WaypointGroupNode.cc \
        src/ui/map3D/TerrainParamDialog.cc \
        src/ui/map3D/ImageryParamDialog.cc
} else {
    message("Skipping support for OpenSceneGraph")
}

#
# Google Earth
#

MacBuild | WindowsBuild : contains(GOOGLEEARTH, enable) { #fix this to make sense ;)
    message(Including support for Google Earth)

    HEADERS += src/ui/map3D/QGCGoogleEarthView.h
    SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
    WindowsBuild {
        CONFIG += qaxcontainer
    }
} else {
    message(Skipping support for Google Earth)
}

#
# Protcol Buffers for PixHawk
#

LinuxBuild : contains(MAVLINK_CONF, pixhawk) {
    exists(/usr/local/include/google/protobuf) | exists(/usr/include/google/protobuf) {
        message("Including support for Protocol Buffers")

        DEFINES += QGC_PROTOBUF_ENABLED

        LIBS += \
            -lprotobuf \
            -lprotobuf-lite \
            -lprotoc

        HEADERS += \
            libs/mavlink/include/mavlink/v1.0/pixhawk/pixhawk.pb.h \
            src/ui/map3D/ObstacleGroupNode.h \
            src/ui/map3D/GLOverlayGeode.h

        SOURCES += \
            libs/mavlink/share/mavlink/src/v1.0/pixhawk/pixhawk.pb.cc \
            src/ui/map3D/ObstacleGroupNode.cc \
            src/ui/map3D/GLOverlayGeode.cc
    } else {
        message("Skipping support for Protocol Buffers")
    }
} else {
    message("Skipping support for Protocol Buffers")
}

#
# libfreenect Kinect support
#

MacBuild | LinuxBuild {
    exists(/opt/local/include/libfreenect) | exists(/usr/local/include/libfreenect) {
        message("Including support for libfreenect")

        #INCLUDEPATH += /usr/include/libusb-1.0
        DEFINES += QGC_LIBFREENECT_ENABLED
        LIBS += -lfreenect
        HEADERS += src/input/Freenect.h
        SOURCES += src/input/Freenect.cc
    } else {
        message("Skipping support for libfreenect")
    }
} else {
    message("Skipping support for libfreenect")
}

#
# EIGEN matrix library (NOMINMAX needed to make internal min/max work)
#

INCLUDEPATH += libs/eigen
DEFINES += NOMINMAX

#
# AGLLIB math library
#
include(libs/alglib/alglib.pri)

#
# OPMapControl library (from OpenPilot)
#

#include(libs/utils/utils_external.pri)
include(libs/opmapcontrol/opmapcontrol_external.pri)

DEPENDPATH += \
    libs/utils \
    libs/utils/src \
    libs/opmapcontrol \
    libs/opmapcontrol/src \
    libs/opmapcontrol/src/mapwidget

INCLUDEPATH += \
    libs/utils \
    libs \
    libs/opmapcontrol

WindowsBuild {
    # Used to enumerate serial ports by QSerialPort
	LIBS += -lsetupapi
}

#
# Zip Access Tool (http://quazip.sourceforge.net)
#
include (libs/thirdParty/quazip/quazip.pri)

#
# XBee wireless
#

WindowsBuild {
    #message(Including support for XBee)

    #DEFINES += XBEELINK

    #INCLUDEPATH += libs/thirdParty/libxbee

    #HEADERS += \
    #    src/comm/XbeeLinkInterface.h \
    #    src/comm/XbeeLink.h \
    #    src/comm/HexSpinBox.h \
    #    src/ui/XbeeConfigurationWindow.h \
    #    src/comm/CallConv.h

    #SOURCES += \
    #    src/comm/XbeeLink.cpp \
    #    src/comm/HexSpinBox.cpp \
    #    src/ui/XbeeConfigurationWindow.cpp

    #WindowsBuild {
    #    LIBS += -llibs/thirdParty/libxbee/lib/libxbee
    #}

    #LinuxBuild {
    #    LIBS += -lxbee
    #}
} else:WindowsCrossBuild {
    #LIBS += -llibs/thirdParty/libxbee/lib/libxbee
    message(Skipping support for XBee)
} else {
    message(Skipping support for XBee)
}

#
# 3DConnexion 3d Mice support
#

LinuxBuild : exists(/usr/local/lib/libxdrvlib.so) {
    message("Including support for Magellan 3DxWare")

    DEFINES += MOUSE_ENABLED_LINUX
    DEFINES += ParameterCheck
# Hack: Has to be defined for magellan usage

    INCLUDEPATH *= /usr/local/include
    HEADERS += src/input/Mouse6dofInput.h
    SOURCES += src/input/Mouse6dofInput.cpp
    LIBS += -L/usr/local/lib/ -lxdrvlib
}

WindowsBuild {
    message("Including support for Magellan 3DxWare")

    DEFINES += MOUSE_ENABLED_WIN

    INCLUDEPATH += libs/thirdParty/3DMouse/win

    HEADERS += \
        libs/thirdParty/3DMouse/win/I3dMouseParams.h \
        libs/thirdParty/3DMouse/win/MouseParameters.h \
        libs/thirdParty/3DMouse/win/Mouse3DInput.h \
        src/input/Mouse6dofInput.h

    SOURCES += \
        libs/thirdParty/3DMouse/win/MouseParameters.cpp \
        libs/thirdParty/3DMouse/win/Mouse3DInput.cpp \
        src/input/Mouse6dofInput.cpp
}

#
# Opal RT-LAB Library
#

WindowsBuild : win32 : exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) {
    message("Including support for Opal-RT")

    DEFINES += OPAL_RT

    INCLUDEPATH +=
        src/lib/opalrt
        libs/lib/opal/include \

    FORMS += src/ui/OpalLinkSettings.ui

    HEADERS += \
        src/comm/OpalRT.h \
        src/comm/OpalLink.h \
        src/comm/Parameter.h \
        src/comm/QGCParamID.h \
        src/comm/ParameterList.h \
        src/ui/OpalLinkConfigurationWindow.h

    SOURCES += \
        src/comm/OpalRT.cc \
        src/comm/OpalLink.cc \
        src/comm/Parameter.cc \
        src/comm/QGCParamID.cc \
        src/comm/ParameterList.cc \
        src/ui/OpalLinkConfigurationWindow.cc

    LIBS += \
        -LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \
        -lOpalApi
} else {
    message("Skipping support for Opal-RT")
}

#
# SDL
#

MacBuild {
    INCLUDEPATH += \
        $$BASEDIR/libs/lib/Frameworks/SDL2.framework/Headers

    LIBS += \
        -F$$BASEDIR/libs/lib/Frameworks \
        -framework SDL2
}

LinuxBuild {
	LIBS += \
        -lSDL2 \
        -lSDL2main
}

WindowsBuild {
	INCLUDEPATH += \
        $$BASEDIR/libs/lib/sdl/msvc/include \

	LIBS += \
        -L$$BASEDIR/libs/lib/sdl/msvc/lib \
        -lSDL2main \
        -lSDL2
}

WindowsCrossBuild {
        INCLUDEPATH += \
        $$BASEDIR/libs/lib/sdl/include \

        LIBS += \
        -Llibs/lib/sdl/win32 \
        -lSDL2.dll
}

#
# Festival Lite speech synthesis engine
#

LinuxBuild {
	LIBS += \
		-lflite_cmu_us_kal \
		-lflite_usenglish \
		-lflite_cmulex \
		-lflite
}


Version 0.1.10

Version 0.1.10


increase version

increase version


Add syncdata.* to libqmatrixclient.pri

Add syncdata.* to libqmatrixclient.pri

QT += network
CONFIG += c++14 warn_on rtti_off create_prl object_parallel_to_source

win32-msvc* {
    QMAKE_CXXFLAGS_WARN_ON += -wd4100
} else {
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
}

SRCPATH = $$PWD/lib
INCLUDEPATH += $$SRCPATH

HEADERS += \
    $$SRCPATH/connectiondata.h \
    $$SRCPATH/connection.h \
    $$SRCPATH/eventitem.h \
    $$SRCPATH/room.h \
    $$SRCPATH/user.h \
    $$SRCPATH/avatar.h \
    $$SRCPATH/syncdata.h \
    $$SRCPATH/util.h \
    $$SRCPATH/events/event.h \
    $$SRCPATH/events/roomevent.h \
    $$SRCPATH/events/stateevent.h \
    $$SRCPATH/events/eventcontent.h \
    $$SRCPATH/events/roommessageevent.h \
    $$SRCPATH/events/simplestateevents.h \
    $$SRCPATH/events/roommemberevent.h \
    $$SRCPATH/events/roomavatarevent.h \
    $$SRCPATH/events/typingevent.h \
    $$SRCPATH/events/receiptevent.h \
    $$SRCPATH/events/callanswerevent.h \
    $$SRCPATH/events/callcandidatesevent.h \
    $$SRCPATH/events/callhangupevent.h \
    $$SRCPATH/events/callinviteevent.h \
    $$SRCPATH/events/accountdataevents.h \
    $$SRCPATH/events/directchatevent.h \
    $$SRCPATH/events/redactionevent.h \
    $$SRCPATH/events/eventloader.h \
    $$SRCPATH/jobs/requestdata.h \
    $$SRCPATH/jobs/basejob.h \
    $$SRCPATH/jobs/syncjob.h \
    $$SRCPATH/jobs/mediathumbnailjob.h \
    $$SRCPATH/jobs/downloadfilejob.h \
    $$SRCPATH/jobs/postreadmarkersjob.h \
    $$files($$SRCPATH/csapi/*.h, false) \
    $$files($$SRCPATH/csapi/definitions/*.h, false) \
    $$files($$SRCPATH/csapi/definitions/wellknown/*.h, false) \
    $$files($$SRCPATH/application-service/definitions/*.h, false) \
    $$files($$SRCPATH/identity/definitions/*.h, false) \
    $$SRCPATH/logging.h \
    $$SRCPATH/converters.h \
    $$SRCPATH/settings.h \
    $$SRCPATH/networksettings.h \
    $$SRCPATH/networkaccessmanager.h

SOURCES += \
    $$SRCPATH/connectiondata.cpp \
    $$SRCPATH/connection.cpp \
    $$SRCPATH/eventitem.cpp \
    $$SRCPATH/room.cpp \
    $$SRCPATH/user.cpp \
    $$SRCPATH/avatar.cpp \
    $$SRCPATH/syncdata.cpp \
    $$SRCPATH/util.cpp \
    $$SRCPATH/events/event.cpp \
    $$SRCPATH/events/roomevent.cpp \
    $$SRCPATH/events/stateevent.cpp \
    $$SRCPATH/events/eventcontent.cpp \
    $$SRCPATH/events/roommessageevent.cpp \
    $$SRCPATH/events/roommemberevent.cpp \
    $$SRCPATH/events/typingevent.cpp \
    $$SRCPATH/events/callanswerevent.cpp \
    $$SRCPATH/events/callcandidatesevent.cpp \
    $$SRCPATH/events/callhangupevent.cpp \
    $$SRCPATH/events/callinviteevent.cpp \
    $$SRCPATH/events/receiptevent.cpp \
    $$SRCPATH/events/directchatevent.cpp \
    $$SRCPATH/jobs/requestdata.cpp \
    $$SRCPATH/jobs/basejob.cpp \
    $$SRCPATH/jobs/syncjob.cpp \
    $$SRCPATH/jobs/mediathumbnailjob.cpp \
    $$SRCPATH/jobs/downloadfilejob.cpp \
    $$files($$SRCPATH/csapi/*.cpp, false) \
    $$files($$SRCPATH/csapi/definitions/*.cpp, false) \
    $$files($$SRCPATH/csapi/definitions/wellknown/*.cpp, false) \
    $$files($$SRCPATH/application-service/definitions/*.cpp, false) \
    $$files($$SRCPATH/identity/definitions/*.cpp, false) \
    $$SRCPATH/logging.cpp \
    $$SRCPATH/converters.cpp \
    $$SRCPATH/settings.cpp \
    $$SRCPATH/networksettings.cpp \
    $$SRCPATH/networkaccessmanager.cpp

QT += network
CONFIG += c++14 warn_on rtti_off create_prl object_parallel_to_source

win32-msvc* {
    QMAKE_CXXFLAGS_WARN_ON += -wd4100
} else {
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
}

SRCPATH = $$PWD/lib
INCLUDEPATH += $$SRCPATH

HEADERS += \
    $$SRCPATH/connectiondata.h \
    $$SRCPATH/connection.h \
    $$SRCPATH/eventitem.h \
    $$SRCPATH/room.h \
    $$SRCPATH/user.h \
    $$SRCPATH/avatar.h \
    $$SRCPATH/util.h \
    $$SRCPATH/events/event.h \
    $$SRCPATH/events/roomevent.h \
    $$SRCPATH/events/stateevent.h \
    $$SRCPATH/events/eventcontent.h \
    $$SRCPATH/events/roommessageevent.h \
    $$SRCPATH/events/simplestateevents.h \
    $$SRCPATH/events/roommemberevent.h \
    $$SRCPATH/events/roomavatarevent.h \
    $$SRCPATH/events/typingevent.h \
    $$SRCPATH/events/receiptevent.h \
    $$SRCPATH/events/callanswerevent.h \
    $$SRCPATH/events/callcandidatesevent.h \
    $$SRCPATH/events/callhangupevent.h \
    $$SRCPATH/events/callinviteevent.h \
    $$SRCPATH/events/accountdataevents.h \
    $$SRCPATH/events/directchatevent.h \
    $$SRCPATH/events/redactionevent.h \
    $$SRCPATH/events/eventloader.h \
    $$SRCPATH/jobs/requestdata.h \
    $$SRCPATH/jobs/basejob.h \
    $$SRCPATH/jobs/syncjob.h \
    $$SRCPATH/jobs/mediathumbnailjob.h \
    $$SRCPATH/jobs/downloadfilejob.h \
    $$SRCPATH/jobs/postreadmarkersjob.h \
    $$files($$SRCPATH/csapi/*.h, false) \
    $$files($$SRCPATH/csapi/definitions/*.h, false) \
    $$files($$SRCPATH/csapi/definitions/wellknown/*.h, false) \
    $$files($$SRCPATH/application-service/definitions/*.h, false) \
    $$files($$SRCPATH/identity/definitions/*.h, false) \
    $$SRCPATH/logging.h \
    $$SRCPATH/converters.h \
    $$SRCPATH/settings.h \
    $$SRCPATH/networksettings.h \
    $$SRCPATH/networkaccessmanager.h

SOURCES += \
    $$SRCPATH/connectiondata.cpp \
    $$SRCPATH/connection.cpp \
    $$SRCPATH/eventitem.cpp \
    $$SRCPATH/room.cpp \
    $$SRCPATH/user.cpp \
    $$SRCPATH/avatar.cpp \
    $$SRCPATH/util.cpp \
    $$SRCPATH/events/event.cpp \
    $$SRCPATH/events/roomevent.cpp \
    $$SRCPATH/events/stateevent.cpp \
    $$SRCPATH/events/eventcontent.cpp \
    $$SRCPATH/events/roommessageevent.cpp \
    $$SRCPATH/events/roommemberevent.cpp \
    $$SRCPATH/events/typingevent.cpp \
    $$SRCPATH/events/callanswerevent.cpp \
    $$SRCPATH/events/callcandidatesevent.cpp \
    $$SRCPATH/events/callhangupevent.cpp \
    $$SRCPATH/events/callinviteevent.cpp \
    $$SRCPATH/events/receiptevent.cpp \
    $$SRCPATH/events/directchatevent.cpp \
    $$SRCPATH/jobs/requestdata.cpp \
    $$SRCPATH/jobs/basejob.cpp \
    $$SRCPATH/jobs/syncjob.cpp \
    $$SRCPATH/jobs/mediathumbnailjob.cpp \
    $$SRCPATH/jobs/downloadfilejob.cpp \
    $$files($$SRCPATH/csapi/*.cpp, false) \
    $$files($$SRCPATH/csapi/definitions/*.cpp, false) \
    $$files($$SRCPATH/csapi/definitions/wellknown/*.cpp, false) \
    $$files($$SRCPATH/application-service/definitions/*.cpp, false) \
    $$files($$SRCPATH/identity/definitions/*.cpp, false) \
    $$SRCPATH/logging.cpp \
    $$SRCPATH/converters.cpp \
    $$SRCPATH/settings.cpp \
    $$SRCPATH/networksettings.cpp \
    $$SRCPATH/networkaccessmanager.cpp


bump version

bump version

# Common definitions

QXMPP_VERSION = 0.1.93
QXMPP_INCLUDE_DIR = $$PWD/src
QXMPP_LIBRARY_DIR = $$PWD/lib

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

# Common definitions

QXMPP_VERSION = 0.1.92
QXMPP_INCLUDE_DIR = $$PWD/src
QXMPP_LIBRARY_DIR = $$PWD/lib

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


QmlJSDebugger: Fix indentation in .pri file

# This file is part of Qt Creator
# It enables debugging of Qt Quick applications

QT += declarative script
INCLUDEPATH += $$PWD/include
DEPENDPATH += $$PWD $$PWD/include editor $$PWD/qt-private

contains(CONFIG, dll) {
    DEFINES += BUILD_QMLJSDEBUGGER_LIB
} else {
    DEFINES += BUILD_QMLJSDEBUGGER_STATIC_LIB
}

!contains(DEFINES, NO_JSDEBUGGER) {

    HEADERS += \
        include/jsdebuggeragent.h \
        include/qmljsdebugger_global.h

    SOURCES += \
        jsdebuggeragent.cpp
}

!contains(DEFINES, NO_QMLOBSERVER) {

    HEADERS += \
        include/qdeclarativeviewobserver.h \
        include/qdeclarativeobserverservice.h \
        include/qmlobserverconstants.h \
        editor/abstractformeditortool.h \
        editor/selectiontool.h \
        editor/layeritem.h \
        editor/singleselectionmanipulator.h \
        editor/rubberbandselectionmanipulator.h \
        editor/selectionrectangle.h \
        editor/selectionindicator.h \
        editor/boundingrecthighlighter.h \
        editor/subcomponenteditortool.h \
        editor/subcomponentmasklayeritem.h \
        editor/zoomtool.h \
        editor/colorpickertool.h \
        editor/qmltoolbar.h \
        editor/toolbarcolorbox.h \
        qdeclarativeviewobserver_p.h

    SOURCES += \
        qdeclarativeviewobserver.cpp \
        qdeclarativeobserverservice.cpp \
        editor/abstractformeditortool.cpp \
        editor/selectiontool.cpp \
        editor/layeritem.cpp \
        editor/singleselectionmanipulator.cpp \
        editor/rubberbandselectionmanipulator.cpp \
        editor/selectionrectangle.cpp \
        editor/selectionindicator.cpp \
        editor/boundingrecthighlighter.cpp \
        editor/subcomponenteditortool.cpp \
        editor/subcomponentmasklayeritem.cpp \
        editor/zoomtool.cpp \
        editor/colorpickertool.cpp \
        editor/qmltoolbar.cpp \
        editor/toolbarcolorbox.cpp

    RESOURCES += editor/editor.qrc
}

OTHER_FILES += qmljsdebugger.pri

# This file is part of Qt Creator
# It enables debugging of Qt Quick applications

QT += declarative script
INCLUDEPATH += $$PWD/include
DEPENDPATH += $$PWD $$PWD/include editor $$PWD/qt-private

contains(CONFIG, dll) {
    DEFINES += BUILD_QMLJSDEBUGGER_LIB
} else {
    DEFINES += BUILD_QMLJSDEBUGGER_STATIC_LIB
}

## Input
!contains(DEFINES, NO_JSDEBUGGER) {
HEADERS += \
    include/jsdebuggeragent.h \
    include/qmljsdebugger_global.h

SOURCES += \
    jsdebuggeragent.cpp
}

!contains(DEFINES, NO_QMLOBSERVER) {

    HEADERS += \
        include/qdeclarativeviewobserver.h \
        include/qdeclarativeobserverservice.h \
        include/qmlobserverconstants.h \
        editor/abstractformeditortool.h \
        editor/selectiontool.h \
        editor/layeritem.h \
        editor/singleselectionmanipulator.h \
        editor/rubberbandselectionmanipulator.h \
        editor/selectionrectangle.h \
        editor/selectionindicator.h \
        editor/boundingrecthighlighter.h \
        editor/subcomponenteditortool.h \
        editor/subcomponentmasklayeritem.h \
        editor/zoomtool.h \
        editor/colorpickertool.h \
        editor/qmltoolbar.h \
        editor/toolbarcolorbox.h \
        qdeclarativeviewobserver_p.h

    SOURCES += \
        qdeclarativeviewobserver.cpp \
        qdeclarativeobserverservice.cpp \
        editor/abstractformeditortool.cpp \
        editor/selectiontool.cpp \
        editor/layeritem.cpp \
        editor/singleselectionmanipulator.cpp \
        editor/rubberbandselectionmanipulator.cpp \
        editor/selectionrectangle.cpp \
        editor/selectionindicator.cpp \
        editor/boundingrecthighlighter.cpp \
        editor/subcomponenteditortool.cpp \
        editor/subcomponentmasklayeritem.cpp \
        editor/zoomtool.cpp \
        editor/colorpickertool.cpp \
        editor/qmltoolbar.cpp \
        editor/toolbarcolorbox.cpp

    RESOURCES += editor/editor.qrc
}

OTHER_FILES += qmljsdebugger.pri


Add sodium sources

Add sodium sources

MEGASDK_BASE_PATH = $$PWD/../../

VPATH += $$MEGASDK_BASE_PATH
SOURCES += src/attrmap.cpp \
    src/backofftimer.cpp \
    src/base64.cpp \
    src/command.cpp \
    src/commands.cpp \
    src/db.cpp \
    src/gfx.cpp \
    src/file.cpp \
    src/fileattributefetch.cpp \
    src/filefingerprint.cpp \
    src/filesystem.cpp \
    src/http.cpp \
    src/json.cpp \
    src/megaclient.cpp \
    src/node.cpp \
    src/pubkeyaction.cpp \
    src/request.cpp \
    src/serialize64.cpp \
    src/share.cpp \
    src/sharenodekeys.cpp \
    src/sync.cpp \
    src/transfer.cpp \
    src/transferslot.cpp \
    src/treeproc.cpp \
    src/user.cpp \
    src/utils.cpp \
    src/logging.cpp \
    src/waiterbase.cpp  \
    src/proxy.cpp \
    src/pendingcontactrequest.cpp \
    src/crypto/cryptopp.cpp  \
    src/crypto/sodium.cpp  \
    src/db/sqlite.cpp  \
    src/gfx/qt.cpp \
    src/gfx/external.cpp \
    src/thread/qtthread.cpp \
    src/mega_utf8proc.cpp

CONFIG(USE_MEGAAPI) {
    SOURCES += src/megaapi.cpp src/megaapi_impl.cpp \
        bindings/qt/QTMegaRequestListener.cpp \
        bindings/qt/QTMegaTransferListener.cpp \
        bindings/qt//QTMegaGlobalListener.cpp \
        bindings/qt/QTMegaSyncListener.cpp \
        bindings/qt/QTMegaListener.cpp \
        bindings/qt/QTMegaEvent.cpp
}

# CONFIG += USE_LIBUV
CONFIG(USE_LIBUV) {
    SOURCES += src/mega_http_parser.cpp
    DEFINES += HAVE_LIBUV
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libuv
    win32 {
        LIBS += -llibuv
    }
    else {
        LIBS += -luv
    }
}

win32 {
    # comment this line to use WinHTTP on Windows
    CONFIG += USE_CURL

    CONFIG(USE_CURL) {
        SOURCES += src/wincurl/net.cpp  \
            src/wincurl/fs.cpp  \
            src/wincurl/waiter.cpp
        HEADERS += include/mega/wincurl/meganet.h
        DEFINES += USE_CURL
        LIBS +=  -llibcurl -lcares -llibeay32 -lssleay32
    }
    else {
        SOURCES += src/win32/net.cpp \
            src/win32/fs.cpp \
            src/win32/waiter.cpp
        HEADERS += include/mega/win32/meganet.h
    }

    # link winhttp anyway (required for automatic proxy detection)
    LIBS += -lwinhttp
}

unix {
SOURCES += src/posix/net.cpp  \
    src/posix/fs.cpp  \
    src/posix/waiter.cpp
}

HEADERS  += include/mega.h \
            include/mega/account.h \
            include/mega/attrmap.h \
            include/mega/backofftimer.h \
            include/mega/base64.h \
            include/mega/command.h \
            include/mega/console.h \
            include/mega/db.h \
            include/mega/gfx.h \
            include/mega/file.h \
            include/mega/fileattributefetch.h \
            include/mega/filefingerprint.h \
            include/mega/filesystem.h \
            include/mega/http.h \
            include/mega/json.h \
            include/mega/megaapp.h \
            include/mega/megaclient.h \
            include/mega/node.h \
            include/mega/pubkeyaction.h \
            include/mega/request.h \
            include/mega/serialize64.h \
            include/mega/share.h \
            include/mega/sharenodekeys.h \
            include/mega/sync.h \
            include/mega/transfer.h \
            include/mega/transferslot.h \
            include/mega/treeproc.h \
            include/mega/types.h \
            include/mega/user.h \
            include/mega/utils.h \
            include/mega/logging.h \
            include/mega/waiter.h \
            include/mega/proxy.h \
            include/mega/pendingcontactrequest.h \
            include/mega/crypto/cryptopp.h  \
            include/mega/crypto/sodium.h  \
            include/mega/db/sqlite.h  \
            include/mega/gfx/qt.h \
            include/mega/gfx/external.h \
            include/mega/thread.h \
            include/mega/thread/qtthread.h \
            include/megaapi.h \
            include/megaapi_impl.h \
            include/mega/mega_utf8proc.h

CONFIG(USE_MEGAAPI) {
    HEADERS += bindings/qt/QTMegaRequestListener.h \
            bindings/qt/QTMegaTransferListener.h \
            bindings/qt//QTMegaGlobalListener.h \
            bindings/qt/QTMegaSyncListener.h \
            bindings/qt/QTMegaListener.h \
            bindings/qt/QTMegaEvent.h
}

win32 {
    HEADERS  += include/mega/win32/megasys.h  \
            include/mega/win32/megafs.h  \
            include/mega/win32/megawaiter.h

    SOURCES += bindings/qt/3rdparty/libs/sqlite3.c
}

unix {
    !exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
        error("Configuration file not found! Please re-run configure script located in the project's root directory!")
    }
    HEADERS  += include/mega/posix/meganet.h  \
            include/mega/posix/megasys.h  \
            include/mega/posix/megafs.h  \
            include/mega/posix/megawaiter.h \
            include/mega/config.h
}

DEFINES += USE_SQLITE USE_CRYPTOPP USE_QT MEGA_QT_LOGGING ENABLE_SYNC
LIBS += -lcryptopp
INCLUDEPATH += $$MEGASDK_BASE_PATH/include
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include

!release {
    DEFINES += SQLITE_DEBUG DEBUG
}
else {
    DEFINES += NDEBUG
}

win32 {
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib

    CONFIG(USE_CURL) {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/wincurl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/openssl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cares
    }
    else {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/win32
    }

    DEFINES += PCRE_STATIC

    contains(CONFIG, BUILDX64) {
       release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64"
        }
        else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64d"
        }
    }

    !contains(CONFIG, BUILDX64) {
        release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32"
        }
        else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32d"
        }
    }

    LIBS += -lshlwapi -lws2_32 -luser32
}

unix:!macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix

   LIBS += -lsqlite3 -lrt

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a) {
    LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a -lz -lssl -lcrypto -lcares
   }
   else {
    LIBS += -lcurl -lz -lssl -lcrypto -lcares
   }
}

macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   SOURCES += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/sqlite3.c
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/curl
   DEFINES += PCRE_STATIC _DARWIN_FEATURE_64_BIT_INODE
   LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a -lz -lssl -lcrypto
}

MEGASDK_BASE_PATH = $$PWD/../../

VPATH += $$MEGASDK_BASE_PATH
SOURCES += src/attrmap.cpp \
    src/backofftimer.cpp \
    src/base64.cpp \
    src/command.cpp \
    src/commands.cpp \
    src/db.cpp \
    src/gfx.cpp \
    src/file.cpp \
    src/fileattributefetch.cpp \
    src/filefingerprint.cpp \
    src/filesystem.cpp \
    src/http.cpp \
    src/json.cpp \
    src/megaclient.cpp \
    src/node.cpp \
    src/pubkeyaction.cpp \
    src/request.cpp \
    src/serialize64.cpp \
    src/share.cpp \
    src/sharenodekeys.cpp \
    src/sync.cpp \
    src/transfer.cpp \
    src/transferslot.cpp \
    src/treeproc.cpp \
    src/user.cpp \
    src/utils.cpp \
    src/logging.cpp \
    src/waiterbase.cpp  \
    src/proxy.cpp \
    src/pendingcontactrequest.cpp \
    src/crypto/cryptopp.cpp  \
    src/db/sqlite.cpp  \
    src/gfx/qt.cpp \
    src/gfx/external.cpp \
    src/thread/qtthread.cpp \
    src/mega_utf8proc.cpp

CONFIG(USE_MEGAAPI) {
    SOURCES += src/megaapi.cpp src/megaapi_impl.cpp \
        bindings/qt/QTMegaRequestListener.cpp \
        bindings/qt/QTMegaTransferListener.cpp \
        bindings/qt//QTMegaGlobalListener.cpp \
        bindings/qt/QTMegaSyncListener.cpp \
        bindings/qt/QTMegaListener.cpp \
        bindings/qt/QTMegaEvent.cpp
}

# CONFIG += USE_LIBUV
CONFIG(USE_LIBUV) {
    SOURCES += src/mega_http_parser.cpp
    DEFINES += HAVE_LIBUV
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libuv
    win32 {
        LIBS += -llibuv
    }
    else {
        LIBS += -luv
    }
}

win32 {
    # comment this line to use WinHTTP on Windows
    CONFIG += USE_CURL

    CONFIG(USE_CURL) {
        SOURCES += src/wincurl/net.cpp  \
            src/wincurl/fs.cpp  \
            src/wincurl/waiter.cpp
        HEADERS += include/mega/wincurl/meganet.h
        DEFINES += USE_CURL
        LIBS +=  -llibcurl -lcares -llibeay32 -lssleay32
    }
    else {
        SOURCES += src/win32/net.cpp \
            src/win32/fs.cpp \
            src/win32/waiter.cpp
        HEADERS += include/mega/win32/meganet.h
    }

    # link winhttp anyway (required for automatic proxy detection)
    LIBS += -lwinhttp
}

unix {
SOURCES += src/posix/net.cpp  \
    src/posix/fs.cpp  \
    src/posix/waiter.cpp
}

HEADERS  += include/mega.h \
            include/mega/account.h \
            include/mega/attrmap.h \
            include/mega/backofftimer.h \
            include/mega/base64.h \
            include/mega/command.h \
            include/mega/console.h \
            include/mega/db.h \
            include/mega/gfx.h \
            include/mega/file.h \
            include/mega/fileattributefetch.h \
            include/mega/filefingerprint.h \
            include/mega/filesystem.h \
            include/mega/http.h \
            include/mega/json.h \
            include/mega/megaapp.h \
            include/mega/megaclient.h \
            include/mega/node.h \
            include/mega/pubkeyaction.h \
            include/mega/request.h \
            include/mega/serialize64.h \
            include/mega/share.h \
            include/mega/sharenodekeys.h \
            include/mega/sync.h \
            include/mega/transfer.h \
            include/mega/transferslot.h \
            include/mega/treeproc.h \
            include/mega/types.h \
            include/mega/user.h \
            include/mega/utils.h \
            include/mega/logging.h \
            include/mega/waiter.h \
            include/mega/proxy.h \
            include/mega/pendingcontactrequest.h \
            include/mega/crypto/cryptopp.h  \
            include/mega/db/sqlite.h  \
            include/mega/gfx/qt.h \
            include/mega/gfx/external.h \
            include/mega/thread.h \
            include/mega/thread/qtthread.h \
            include/megaapi.h \
            include/megaapi_impl.h \
            include/mega/mega_utf8proc.h

CONFIG(USE_MEGAAPI) {
    HEADERS += bindings/qt/QTMegaRequestListener.h \
            bindings/qt/QTMegaTransferListener.h \
            bindings/qt//QTMegaGlobalListener.h \
            bindings/qt/QTMegaSyncListener.h \
            bindings/qt/QTMegaListener.h \
            bindings/qt/QTMegaEvent.h
}

win32 {
    HEADERS  += include/mega/win32/megasys.h  \
            include/mega/win32/megafs.h  \
            include/mega/win32/megawaiter.h

    SOURCES += bindings/qt/3rdparty/libs/sqlite3.c
}

unix {
    !exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
        error("Configuration file not found! Please re-run configure script located in the project's root directory!")
    }
    HEADERS  += include/mega/posix/meganet.h  \
            include/mega/posix/megasys.h  \
            include/mega/posix/megafs.h  \
            include/mega/posix/megawaiter.h \
            include/mega/config.h
}

DEFINES += USE_SQLITE USE_CRYPTOPP USE_QT MEGA_QT_LOGGING ENABLE_SYNC
LIBS += -lcryptopp
INCLUDEPATH += $$MEGASDK_BASE_PATH/include
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include

!release {
    DEFINES += SQLITE_DEBUG DEBUG
}
else {
    DEFINES += NDEBUG
}

win32 {
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib

    CONFIG(USE_CURL) {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/wincurl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/openssl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cares
    }
    else {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/win32
    }

    DEFINES += PCRE_STATIC

    contains(CONFIG, BUILDX64) {
       release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64"
        }
        else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64d"
        }
    }

    !contains(CONFIG, BUILDX64) {
        release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32"
        }
        else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32d"
        }
    }

    LIBS += -lshlwapi -lws2_32 -luser32
}

unix:!macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix

   LIBS += -lsqlite3 -lrt

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a) {
    LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a -lz -lssl -lcrypto -lcares
   }
   else {
    LIBS += -lcurl -lz -lssl -lcrypto -lcares
   }
}

macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   SOURCES += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/sqlite3.c
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/curl
   DEFINES += PCRE_STATIC _DARWIN_FEATURE_64_BIT_INODE
   LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a -lz -lssl -lcrypto
}


Update qtfirebase_target.pri

Update qtfirebase_target.pri

Closes #106

message("QtFirebase: configuring build for supported Firebase target platform...")

isEmpty(QTFIREBASE_SDK_PATH){
    QTFIREBASE_SDK_PATH = $$PWD/firebase_cpp_sdk
    message("No QTFIREBASE_SDK_PATH path sat. Using default (firebase_cpp_sdk) $$QTFIREBASE_SDK_PATH")
} else {
    message("Using QTFIREBASE_SDK_PATH ($$QTFIREBASE_SDK_PATH)")
}

QTFIREBASE_SDK_LIBS_PREFIX = "firebase_"

QML_IMPORT_PATH += $$PWD

INCLUDEPATH += $$PWD

INCLUDEPATH += \
    $$QTFIREBASE_SDK_PATH/include \
    \

HEADERS += \
    $$PWD/src/platformutils.h \
    $$PWD/src/qtfirebase.h \
    $$PWD/src/qtfirebaseservice.h \
    \

SOURCES += \
    $$PWD/src/qtfirebase.cpp \
    $$PWD/src/qtfirebaseservice.cpp \
    \

contains(QTPLUGIN,qtfirebase) {
    HEADERS += $$PWD/src/qtfirebase_plugin.h
    SOURCES += $$PWD/src/qtfirebase_plugin.cpp
}

!ios: {
    SOURCES += \
        $$PWD/src/platformutils.cpp \
    \
}

RESOURCES += \
    $$PWD/qtfirebase.qrc \
    \

android: {

    # Setup tips
    #
    # Add services to xml file
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/AndroidManifest.xml
    #
    # Add the 'onNewIntent' function to your Qt Activity
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/src/android/java/com/google/firebase/example/TestappNativeActivity.java

    message("QtFirebase Android base")
    QT += androidextras gui-private

    # Specify the STL variant that is to be used in the app .pro file with the $$QTFIREBASE_STL_VARIANT variable
    # c++:      LLVM libc++ runtime
    # gnustl:   GNU STL
    # stlport:  STLPort runtime
    android-clang {
        QTFIREBASE_STL_VARIANT = c++
    }

    isEmpty(QTFIREBASE_STL_VARIANT){
        QTFIREBASE_STL_VARIANT = gnustl
    }

    message("Using QTFIREBASE_STL_VARIANT ($$QTFIREBASE_STL_VARIANT)")
    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/android/$$ANDROID_TARGET_ARCH/$$QTFIREBASE_STL_VARIANT

    DEPENDPATH += $$QTFIREBASE_SDK_LIBS_PATH
}

ios: {

    # Setup tips
    #
    # Download the Google Firebase Framework link for Ios
    # and extract the files to this folder $$PWD/src/ios/Firebase/
    # or use your own folder QTFIREBASE_FRAMEWORKS_ROOT = YOUR/PWD
    # https://firebase.google.com/docs/ios/setup#frameworks

    message("QtFirebase iOS base")
    QT += gui_private

    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/ios/universal/

    QTFIREBASE_FRAMEWORKS_ROOT = $$PWD/src/ios/Firebase/

    QMAKE_LFLAGS += -ObjC

    HEADERS += \
        $$PWD/src/ios/AppDelegate.h \
        \

    OBJECTIVE_SOURCES += \
        $$PWD/src/ios/platformutils.mm \
        $$PWD/src/ios/AppDelegate.mm \
        \

    LIBS += \
        -ObjC \
        -lsqlite3 \
        -lz \
        -L$$QTFIREBASE_SDK_LIBS_PATH \
        -framework MediaPlayer \
        -framework CoreMotion \
        -framework CoreTelephony \
        -framework MessageUI \
        -framework GLKit \
        -framework AddressBook \
        -framework UIKit \
        -framework SystemConfiguration \
        \

    INCLUDEPATH += \
        $$QTFIREBASE_SDK_PATH/include \
        $$QTFIREBASE_FRAMEWORKS_ROOT/../ \
        $$PWD/src \
        $$PWD/src/ios \
        \
}

# NOTE the order of linking is important!

PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}app.a
LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app

# AdMob
contains(DEFINES,QTFIREBASE_BUILD_ADMOB) {
    message( "QtFirebase including AdMob" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/AdMob \
            -framework GoogleMobileAds \
            -framework AdSupport \
            -framework StoreKit \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseadmob.h
    SOURCES += $$PWD/src/qtfirebaseadmob.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}admob.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}admob
}

# Remote Config
contains(DEFINES,QTFIREBASE_BUILD_REMOTE_CONFIG) {
    message( "QtFirebase including RemoteConfig" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/RemoteConfig \
            -framework FirebaseABTesting \ # Required for Firebase iOS >= 4.5.0
            -framework FirebaseRemoteConfig \
            -framework Protobuf \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseremoteconfig.h
    SOURCES += $$PWD/src/qtfirebaseremoteconfig.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config
}

# Messaging
contains(DEFINES,QTFIREBASE_BUILD_MESSAGING) {
    message( "QtFirebase including Messaging" )

    ios: {
        message( "QtFirebase Messaging requires iOS v10.x+ to build." )
        message( "Remember to set QMAKE_IOS_DEPLOYMENT_TARGET in your .pro" )
        # Removed due to Qt 5.12 - see https://github.com/Larpon/QtFirebase/issues/106
        # QMAKE_IOS_DEPLOYMENT_TARGET = 10.0

        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Messaging \
            -framework FirebaseMessaging \
            -framework Protobuf \
            -framework UserNotifications \
            \
    }

    HEADERS += $$PWD/src/qtfirebasemessaging.h
    SOURCES += $$PWD/src/qtfirebasemessaging.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}messaging.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}messaging
}

# Analytics
contains(DEFINES,QTFIREBASE_BUILD_ANALYTICS) {
    message( "QtFirebase including Analytics" )

    ios: {
        LIBS += \
            -framework StoreKit \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Analytics \
            -framework FirebaseAnalytics \
            -framework FirebaseCore \
            -framework FirebaseCoreDiagnostics \
            -framework FirebaseInstanceID \
            -framework GoogleAppMeasurement \
            -framework GoogleUtilities \
            -framework nanopb \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseanalytics.h
    SOURCES += $$PWD/src/qtfirebaseanalytics.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}analytics.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}analytics
}

# Auth
contains(DEFINES,QTFIREBASE_BUILD_AUTH) {
    message( "QtFirebase including Auth" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Auth \
            -framework FirebaseAuth \
            -framework GTMSessionFetcher \
            -framework SafariServices \ # Required for Firebase iOS >= 4.4.0
        \
    }

    HEADERS += $$PWD/src/qtfirebaseauth.h
    SOURCES += $$PWD/src/qtfirebaseauth.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}auth.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}auth
}

# Database
contains(DEFINES,QTFIREBASE_BUILD_DATABASE) {
    message( "QtFirebase including Database" )

    ios: {
        LIBS += \
            -licucore \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Database \
            -framework FirebaseDatabase \
            -framework leveldb-library \
        \
    }

    HEADERS += $$PWD/src/qtfirebasedatabase.h
    SOURCES += $$PWD/src/qtfirebasedatabase.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}database.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}database
}

LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app

message("QtFirebase: configuring build for supported Firebase target platform...")

isEmpty(QTFIREBASE_SDK_PATH){
    QTFIREBASE_SDK_PATH = $$PWD/firebase_cpp_sdk
    message("No QTFIREBASE_SDK_PATH path sat. Using default (firebase_cpp_sdk) $$QTFIREBASE_SDK_PATH")
} else {
    message("Using QTFIREBASE_SDK_PATH ($$QTFIREBASE_SDK_PATH)")
}

QTFIREBASE_SDK_LIBS_PREFIX = "firebase_"

QML_IMPORT_PATH += $$PWD

INCLUDEPATH += $$PWD

INCLUDEPATH += \
    $$QTFIREBASE_SDK_PATH/include \
    \

HEADERS += \
    $$PWD/src/platformutils.h \
    $$PWD/src/qtfirebase.h \
    $$PWD/src/qtfirebaseservice.h \
    \

SOURCES += \
    $$PWD/src/qtfirebase.cpp \
    $$PWD/src/qtfirebaseservice.cpp \
    \

contains(QTPLUGIN,qtfirebase) {
    HEADERS += $$PWD/src/qtfirebase_plugin.h
    SOURCES += $$PWD/src/qtfirebase_plugin.cpp
}

!ios: {
    SOURCES += \
        $$PWD/src/platformutils.cpp \
    \
}

RESOURCES += \
    $$PWD/qtfirebase.qrc \
    \

android: {

    # Setup tips
    #
    # Add services to xml file
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/AndroidManifest.xml
    #
    # Add the 'onNewIntent' function to your Qt Activity
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/src/android/java/com/google/firebase/example/TestappNativeActivity.java

    message("QtFirebase Android base")
    QT += androidextras gui-private

    # Specify the STL variant that is to be used in the app .pro file with the $$QTFIREBASE_STL_VARIANT variable
    # c++:      LLVM libc++ runtime
    # gnustl:   GNU STL
    # stlport:  STLPort runtime
    android-clang {
        QTFIREBASE_STL_VARIANT = c++
    }

    isEmpty(QTFIREBASE_STL_VARIANT){
        QTFIREBASE_STL_VARIANT = gnustl
    }

    message("Using QTFIREBASE_STL_VARIANT ($$QTFIREBASE_STL_VARIANT)")
    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/android/$$ANDROID_TARGET_ARCH/$$QTFIREBASE_STL_VARIANT

    DEPENDPATH += $$QTFIREBASE_SDK_LIBS_PATH
}

ios: {

    # Setup tips
    #
    # Download the Google Firebase Framework link for Ios
    # and extract the files to this folder $$PWD/src/ios/Firebase/
    # or use your own folder QTFIREBASE_FRAMEWORKS_ROOT = YOUR/PWD
    # https://firebase.google.com/docs/ios/setup#frameworks

    message("QtFirebase iOS base")
    QT += gui_private

    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/ios/universal/

    QTFIREBASE_FRAMEWORKS_ROOT = $$PWD/src/ios/Firebase/

    QMAKE_LFLAGS += -ObjC

    HEADERS += \
        $$PWD/src/ios/AppDelegate.h \
        \

    OBJECTIVE_SOURCES += \
        $$PWD/src/ios/platformutils.mm \
        $$PWD/src/ios/AppDelegate.mm \
        \

    LIBS += \
        -ObjC \
        -lsqlite3 \
        -lz \
        -L$$QTFIREBASE_SDK_LIBS_PATH \
        -framework MediaPlayer \
        -framework CoreMotion \
        -framework CoreTelephony \
        -framework MessageUI \
        -framework GLKit \
        -framework AddressBook \
        -framework UIKit \
        -framework SystemConfiguration \
        \

    INCLUDEPATH += \
        $$QTFIREBASE_SDK_PATH/include \
        $$QTFIREBASE_FRAMEWORKS_ROOT/../ \
        $$PWD/src \
        $$PWD/src/ios \
        \
}

# NOTE the order of linking is important!

PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}app.a
LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app

# AdMob
contains(DEFINES,QTFIREBASE_BUILD_ADMOB) {
    message( "QtFirebase including AdMob" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/AdMob \
            -framework GoogleMobileAds \
            -framework AdSupport \
            -framework StoreKit \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseadmob.h
    SOURCES += $$PWD/src/qtfirebaseadmob.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}admob.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}admob
}

# Remote Config
contains(DEFINES,QTFIREBASE_BUILD_REMOTE_CONFIG) {
    message( "QtFirebase including RemoteConfig" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/RemoteConfig \
            -framework FirebaseABTesting \ # Required for Firebase iOS >= 4.5.0
            -framework FirebaseRemoteConfig \
            -framework Protobuf \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseremoteconfig.h
    SOURCES += $$PWD/src/qtfirebaseremoteconfig.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config
}

# Messaging
contains(DEFINES,QTFIREBASE_BUILD_MESSAGING) {
    message( "QtFirebase including Messaging" )

    ios: {
        message( "QtFirebase Messaging requires iOS v10.x to build. Setting QMAKE_IOS_DEPLOYMENT_TARGET = 10.0" )
        QMAKE_IOS_DEPLOYMENT_TARGET = 10.0

        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Messaging \
            -framework FirebaseMessaging \
            -framework Protobuf \
            -framework UserNotifications \
            \
    }

    HEADERS += $$PWD/src/qtfirebasemessaging.h
    SOURCES += $$PWD/src/qtfirebasemessaging.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}messaging.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}messaging
}

# Analytics
contains(DEFINES,QTFIREBASE_BUILD_ANALYTICS) {
    message( "QtFirebase including Analytics" )

    ios: {
        LIBS += \
            -framework StoreKit \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Analytics \
            -framework FirebaseAnalytics \
            -framework FirebaseCore \
            -framework FirebaseCoreDiagnostics \
            -framework FirebaseInstanceID \
            -framework GoogleAppMeasurement \
            -framework GoogleUtilities \
            -framework nanopb \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseanalytics.h
    SOURCES += $$PWD/src/qtfirebaseanalytics.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}analytics.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}analytics
}

# Auth
contains(DEFINES,QTFIREBASE_BUILD_AUTH) {
    message( "QtFirebase including Auth" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Auth \
            -framework FirebaseAuth \
            -framework GTMSessionFetcher \
            -framework SafariServices \ # Required for Firebase iOS >= 4.4.0
        \
    }

    HEADERS += $$PWD/src/qtfirebaseauth.h
    SOURCES += $$PWD/src/qtfirebaseauth.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}auth.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}auth
}

# Database
contains(DEFINES,QTFIREBASE_BUILD_DATABASE) {
    message( "QtFirebase including Database" )

    ios: {
        LIBS += \
            -licucore \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Database \
            -framework FirebaseDatabase \
            -framework leveldb-library \
        \
    }

    HEADERS += $$PWD/src/qtfirebasedatabase.h
    SOURCES += $$PWD/src/qtfirebasedatabase.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}database.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}database
}

LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app


Added prefix lib to win32 gcc build LIBS+= #13

# Load this from any subproject to link shared libs properly and easy.
#
# Takes a list of paths of shared libs (customLibs). The used list must
# contain 'path/to/lib/name's with path/to/lib relative to the caller.
#
# Example:
# - customLibs = ../path/to/lib/mylib ../other/path/to/otherlib
# - include(loadlibs.pri)
#
# Make sure to provide all libname.pri to set INCLUDEPATH & DEPENDPATH!
#
# Note: include(loadlibs.pri) will setup all given custom libs ->
# -> INCLUDEPATH, DEPENDPATH, LIBS, PRE_TARGETDEPS & QMAKE_LFLAGS.

include($$PWD/win32.pri)

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

for(lib, customLibs) {
    !isEmpty(lib) {
        LIBDIR = $$dirname(lib)
        LIBNAME = $$basename(lib)
        #message("$${TARGET} is loading $$LIBNAME -> from: $$LIBDIR")

        # Load lib.pri to set INCLUDEPATH & DEPENDPATH
        exists($$_PRO_FILE_PWD_/$$LIBDIR/$$LIBNAME.pri) {
            include($$_PRO_FILE_PWD_/$$LIBDIR/$${LIBNAME}.pri)
        }
        #message($${INCLUDEPATH})

        #  Set library file extension
        LIB_EXTENSION = $$QMAKE_EXTENSION_SHLIB
        isEmpty(LIB_EXTENSION) {
            macx: LIB_EXTENSION = dylib
            unix:!macx: LIB_EXTENSION = so
        }
        win32 {
            LIB_EXTENSION = $$QMAKE_EXTENSION_STATICLIB
            isEmpty(LIB_EXTENSION) {
                LIB_EXTENSION = lib
            }
        }
        #message($${LIB_EXTENSION})

        # Get library's binary directory
        OUTDIR = $$clean_path($$OUT_PWD/$${LIBDIR})

        macx {
            frameworks += $$files($${OUTDIR}/$${LIBNAME}.framework)
            LIBS += -F$${OUTDIR}/ -framework $${LIBNAME}
            PRE_TARGETDEPS += $${OUTDIR}/$${LIBNAME}.framework
            INCLUDEPATH += -F$${LIBDIR}
        }
        win32 {
            msvc {
                LIBS += $${OUTDIR}/$${WINDIR}/$${LIBNAME}.$${LIB_EXTENSION}
                PRE_TARGETDEPS += $${OUTDIR}/$${WINDIR}/$${LIBNAME}.$${LIB_EXTENSION}
                message(msvc setup for lib --> $${LIBNAME}.$${LIB_EXTENSION})
            }
            gcc {
                LIBS += -L$${OUTDIR}/$${WINDIR}/ -llib$${LIBNAME}
                PRE_TARGETDEPS += $${OUTDIR}/$${WINDIR}/lib$${LIBNAME}.$${LIB_EXTENSION}
                QMAKE_LFLAGS += "-Wl,-rpath,\'$$OUTDIR/$$WINDIR\'"
                message(gcc setup for lib --> lib$${LIBNAME}.$${LIB_EXTENSION})
            }
        }
        unix:!macx {
            LIBS += -L$${OUTDIR}/ -l$${LIBNAME}
            PRE_TARGETDEPS += $${OUTDIR}/lib$${LIBNAME}.$${LIB_EXTENSION}
            QMAKE_LFLAGS += "-Wl,-rpath,\'$$OUTDIR\'"
        }
    }
}

macx { # Deploy all linked frameworks to target bundle
    APP_LIB_FILES.files = $$frameworks
    APP_LIB_FILES.path = Contents/Frameworks/
    QMAKE_BUNDLE_DATA += APP_LIB_FILES
}

# Load this from any subproject to link shared libs properly and easy.
#
# Takes a list of paths of shared libs (customLibs). The used list must
# contain 'path/to/lib/name's with path/to/lib relative to the caller.
#
# Example:
# - customLibs = ../path/to/lib/mylib ../other/path/to/otherlib
# - include(loadlibs.pri)
#
# Make sure to provide all libname.pri to set INCLUDEPATH & DEPENDPATH!
#
# Note: include(loadlibs.pri) will setup all given custom libs ->
# -> INCLUDEPATH, DEPENDPATH, LIBS, PRE_TARGETDEPS & QMAKE_LFLAGS.

include($$PWD/win32.pri)

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

for(lib, customLibs) {
    !isEmpty(lib) {
        LIBDIR = $$dirname(lib)
        LIBNAME = $$basename(lib)
        #message("$${TARGET} is loading $$LIBNAME -> from: $$LIBDIR")

        # Load lib.pri to set INCLUDEPATH & DEPENDPATH
        exists($$_PRO_FILE_PWD_/$$LIBDIR/$$LIBNAME.pri) {
            include($$_PRO_FILE_PWD_/$$LIBDIR/$${LIBNAME}.pri)
        }
        #message($${INCLUDEPATH})

        #  Set library file extension
        LIB_EXTENSION = $$QMAKE_EXTENSION_SHLIB
        isEmpty(LIB_EXTENSION) {
            macx: LIB_EXTENSION = dylib
            unix:!macx: LIB_EXTENSION = so
        }
        win32 {
            LIB_EXTENSION = $$QMAKE_EXTENSION_STATICLIB
            isEmpty(LIB_EXTENSION) {
                LIB_EXTENSION = lib
            }
        }
        #message($${LIB_EXTENSION})

        # Get library's binary directory
        OUTDIR = $$clean_path($$OUT_PWD/$${LIBDIR})

        macx {
            frameworks += $$files($${OUTDIR}/$${LIBNAME}.framework)
            LIBS += -F$${OUTDIR}/ -framework $${LIBNAME}
            PRE_TARGETDEPS += $${OUTDIR}/$${LIBNAME}.framework
            INCLUDEPATH += -F$${LIBDIR}
        }
        win32 {
            msvc {
                LIBS += $${OUTDIR}/$${WINDIR}/$${LIBNAME}.$${LIB_EXTENSION}
                PRE_TARGETDEPS += $${OUTDIR}/$${WINDIR}/$${LIBNAME}.$${LIB_EXTENSION}
                message(msvc setup for lib --> $${LIBNAME}.$${LIB_EXTENSION})
            }
            gcc {
                LIBS += -L$${OUTDIR}/$${WINDIR}/ -l$${LIBNAME}
                PRE_TARGETDEPS += $${OUTDIR}/$${WINDIR}/$${LIBNAME}.$${LIB_EXTENSION}
                QMAKE_LFLAGS += "-Wl,-rpath,\'$$OUTDIR/$$WINDIR\'"
                message(gcc setup for lib --> lib$${LIBNAME}.$${LIB_EXTENSION})
            }
        }
        unix:!macx {
            LIBS += -L$${OUTDIR}/ -l$${LIBNAME}
            PRE_TARGETDEPS += $${OUTDIR}/lib$${LIBNAME}.$${LIB_EXTENSION}
            QMAKE_LFLAGS += "-Wl,-rpath,\'$$OUTDIR\'"
        }
    }
}

macx { # Deploy all linked frameworks to target bundle
    APP_LIB_FILES.files = $$frameworks
    APP_LIB_FILES.path = Contents/Frameworks/
    QMAKE_BUNDLE_DATA += APP_LIB_FILES
}


Fix build mobile target

Fix build mobile target

core_mac:CONFIG += apple_platform
core_ios:CONFIG += apple_platform

apple_platform {
	CONFIG += socketrocket
} else {
	CONFIG += ixwebsocket
}

HEADERS += \
	$$PWD/include/websocket.h \
	$$PWD/src/websocketbase.h

SOURCES += $$PWD/src/managerwebsocket.cpp

ixwebsocket {

    DEFINES += USE_IXWEBSOCKET
    include($$PWD/../../3dParty/ixwebsocket/ixwebsocket.pri)

    HEADERS += $$PWD/src/ixwebsocket/ixwebsocket_internal.h
    SOURCES += $$PWD/src/ixwebsocket/ixwebsocket_internal.cpp

    CONFIG += use_zlib

}

use_zlib {
    ZLIB_SOURCES = $$PWD/../../../OfficeUtils/src/zlib-1.2.11
    INCLUDEPATH += \
        $$ZLIB_SOURCES \
        $$ZLIB_SOURCES/..
    SOURCES += \
        $$ZLIB_SOURCES/adler32.c \
        $$ZLIB_SOURCES/compress.c \
        $$ZLIB_SOURCES/crc32.c \
        $$ZLIB_SOURCES/deflate.c \
        $$ZLIB_SOURCES/gzclose.c \
        $$ZLIB_SOURCES/gzlib.c \
        $$ZLIB_SOURCES/gzread.c \
        $$ZLIB_SOURCES/gzwrite.c \
        $$ZLIB_SOURCES/infback.c \
        $$ZLIB_SOURCES/inffast.c \
        $$ZLIB_SOURCES/inflate.c \
        $$ZLIB_SOURCES/inftrees.c \
        $$ZLIB_SOURCES/trees.c \
        $$ZLIB_SOURCES/uncompr.c \
        $$ZLIB_SOURCES/zutil.c \
        $$ZLIB_SOURCES/../zlib_addon.c
}

socketrocket {

    DEFINES += USE_SOCKETROCKET
    include($$PWD/../../3dParty/socketrocket/socketrocket.pri)

    HEADERS += \
        $$PWD/src/socketrocket/socketRocket_objc.h \
        $$PWD/src/socketrocket/socketRocket_internal.h \

    OBJECTIVE_SOURCES += \
        $$PWD/src/socketrocket/socketRocket_objc.mm \
        $$PWD/src/socketrocket/socketRocket_internal.mm

}

core_mac:CONFIG += apple_platform
core_ios:CONFIG += apple_platform

apple_platform {
	CONFIG += socketrocket
} else {
	CONFIG += ixwebsocket
}

HEADERS += \
	$$PWD/include/websocket.h \
	$$PWD/src/websocketbase.h

SOURCES += $$PWD/src/managerwebsocket.cpp

ixwebsocket {

    DEFINES += USE_IXWEBSOCKET
    include($$PWD/../../3dParty/ixwebsocket/ixwebsocket.pri)

    HEADERS += $$PWD/src/ixwebsocket/ixwebsocket_internal.h
    SOURCES += $$PWD/src/ixwebsocket/ixwebsocket_internal.cpp

    CONFIG += use_zlib

}

use_zlib {
    ZLIB_SOURCES = $$PWD/../../../OfficeUtils/src/zlib-1.2.11
    INCLUDEPATH += $$ZLIB_SOURCES
    SOURCES += \
        $$ZLIB_SOURCES/adler32.c \
        $$ZLIB_SOURCES/compress.c \
        $$ZLIB_SOURCES/crc32.c \
        $$ZLIB_SOURCES/deflate.c \
        $$ZLIB_SOURCES/gzclose.c \
        $$ZLIB_SOURCES/gzlib.c \
        $$ZLIB_SOURCES/gzread.c \
        $$ZLIB_SOURCES/gzwrite.c \
        $$ZLIB_SOURCES/infback.c \
        $$ZLIB_SOURCES/inffast.c \
        $$ZLIB_SOURCES/inflate.c \
        $$ZLIB_SOURCES/inftrees.c \
        $$ZLIB_SOURCES/trees.c \
        $$ZLIB_SOURCES/uncompr.c \
        $$ZLIB_SOURCES/zutil.c
}

socketrocket {

    DEFINES += USE_SOCKETROCKET
    include($$PWD/../../3dParty/socketrocket/socketrocket.pri)

    HEADERS += \
        $$PWD/src/socketrocket/socketRocket_objc.h \
        $$PWD/src/socketrocket/socketRocket_internal.h \

    OBJECTIVE_SOURCES += \
        $$PWD/src/socketrocket/socketRocket_objc.mm \
        $$PWD/src/socketrocket/socketRocket_internal.mm

}


Fixed qmake warning when processing mouse gestures module

HEADERS += \
	$$PWD/gesturesPainterInterface.h \
	$$PWD/mouseMovementManager.h \
	$$PWD/gesturesWidget.h \
	$$PWD/gesturePainter.h \
	$$PWD/private/geometricForms.h \
	$$PWD/private/pathCorrector.h \
	$$PWD/private/levenshteinDistance.h \
	$$PWD/private/keyManager.h \
	$$PWD/private/abstractRecognizer.h \
	$$PWD/private/mixedgesturesmanager.h \
	$$PWD/private/rectanglegesturesmanager.h \
	$$PWD/private/nearestposgridgesturesmanager.h \
	$$PWD/private/curveKeyBuilder.h \
	$$PWD/private/sorts.h \

SOURCES += \
	$$PWD/mouseMovementManager.cpp \
	$$PWD/gesturesWidget.cpp \
	$$PWD/gesturePainter.cpp \
	$$PWD/private/pathCorrector.cpp \
	$$PWD/private/levenshteinDistance.cpp \
	$$PWD/private/keyManager.cpp \
	$$PWD/private/mixedgesturesmanager.cpp \
	$$PWD/private/rectanglegesturesmanager.cpp \
	$$PWD/private/nearestposgridgesturesmanager.cpp \

FORMS += \
	$$PWD/gesturesWidget.ui \

HEADERS += \
	$$PWD/gesturePainterInterface.h \
	$$PWD/mouseMovementManager.h \
	$$PWD/gesturesWidget.h \
	$$PWD/gesturePainter.h \
	$$PWD/private/geometricForms.h \
	$$PWD/private/pathCorrector.h \
	$$PWD/private/levenshteinDistance.h \
	$$PWD/private/keyManager.h \
	$$PWD/private/abstractRecognizer.h \
	$$PWD/private/mixedgesturesmanager.h \
	$$PWD/private/rectanglegesturesmanager.h \
	$$PWD/private/nearestposgridgesturesmanager.h \
	$$PWD/private/curveKeyBuilder.h \
	$$PWD/private/sorts.h \

SOURCES += \
	$$PWD/mouseMovementManager.cpp \
	$$PWD/gesturesWidget.cpp \
	$$PWD/gesturePainter.cpp \
	$$PWD/private/pathCorrector.cpp \
	$$PWD/private/levenshteinDistance.cpp \
	$$PWD/private/keyManager.cpp \
	$$PWD/private/mixedgesturesmanager.cpp \
	$$PWD/private/rectanglegesturesmanager.cpp \
	$$PWD/private/nearestposgridgesturesmanager.cpp \

FORMS += \
	$$PWD/gesturesWidget.ui \


Fix project path to use seed/games structure.

TEMPLATE = app
CONFIG += console
CONFIG -= qt
CONFIG += sdl2

BASE = ../../
INCLUDEPATH += $${BASE}/include
include($${BASE}/compiler.pri)
include($${BASE}/platform.pri)

unix:!macx {
		DEFINES += LINUX PHYSFS_NO_CDROM_SUPPORT
		LIBS += -lseed -lseedcontrib -lGL -lopenal -ldl -lpthread

		#Configs
		APP_CONFIG_FILES.files = $$files($${PWD}/resources/configs/*.*)
		APP_CONFIG_FILES.path = $${OUT_PWD}/$${DESTDIR}/configs
		APP_CONFIG_FILES.commands += test -d $${APP_CONFIG_FILES.path} || mkdir -p $${APP_CONFIG_FILES.path} &&
		APP_CONFIG_FILES.commands += ${COPY_FILE} $$APP_CONFIG_FILES.files $${APP_CONFIG_FILES.path}
		#Fonts
		APP_FONT_FILES.files = $$files($${PWD}/resources/fonts/*.*)
		APP_FONT_FILES.path = $${OUT_PWD}/$${DESTDIR}/fonts
		APP_FONT_FILES.commands += test -d $${APP_FONT_FILES.path} || mkdir -p $${APP_FONT_FILES.path} &&
		APP_FONT_FILES.commands += ${COPY_FILE} $$APP_FONT_FILES.files $${APP_FONT_FILES.path}
		#Scenes
		APP_SCENE_FILES.files = $$files($${PWD}/resources/scenes/*.*)
		APP_SCENE_FILES.path = $${OUT_PWD}/$${DESTDIR}/scenes
		APP_SCENE_FILES.commands += test -d $${APP_SCENE_FILES.path} || mkdir -p $${APP_SCENE_FILES.path} &&
		APP_SCENE_FILES.commands += ${COPY_FILE} $$APP_SCENE_FILES.files $${APP_SCENE_FILES.path}
		#Textures
		APP_TEXTURE_FILES.files = $$files($${PWD}/resources/textures/*.*)
		APP_TEXTURE_FILES.path = $${OUT_PWD}/$${DESTDIR}/textures
		APP_TEXTURE_FILES.commands += test -d $${APP_TEXTURE_FILES.path} || mkdir -p $${APP_TEXTURE_FILES.path} &&
		APP_TEXTURE_FILES.commands += ${COPY_FILE} $$APP_TEXTURE_FILES.files $${APP_TEXTURE_FILES.path}
		#Gui
				#Styles
				APP_GUI_STYLE_FILES.files = $$files($${PWD}/resources/gui/styles/*.*)
				APP_GUI_STYLE_FILES.path = $${OUT_PWD}/$${DESTDIR}/gui/styles
				APP_GUI_STYLE_FILES.commands += test -d $${APP_GUI_STYLE_FILES.path} || mkdir -p $${APP_GUI_STYLE_FILES.path} &&
				APP_GUI_STYLE_FILES.commands += ${COPY_FILE} $$APP_GUI_STYLE_FILES.files $${APP_GUI_STYLE_FILES.path}
				#Views
				APP_GUI_VIEW_FILES.files = $$files($${PWD}/resources/gui/views/*.*)
				APP_GUI_VIEW_FILES.path = $${OUT_PWD}/$${DESTDIR}/gui/views
				APP_GUI_VIEW_FILES.commands += test -d $${APP_GUI_VIEW_FILES.path} || mkdir -p $${APP_GUI_VIEW_FILES.path} &&
				APP_GUI_VIEW_FILES.commands += ${COPY_FILE} $$APP_GUI_VIEW_FILES.files $${APP_GUI_VIEW_FILES.path}
		#Sounds
		APP_SOUND_FILES.files = $$files($${PWD}/resources/sounds/*.*)
		APP_SOUND_FILES.path = $${OUT_PWD}/$${DESTDIR}/sounds
		APP_SOUND_FILES.commands += test -d $${APP_SOUND_FILES.path} || mkdir -p $${APP_SOUND_FILES.path} &&
		APP_SOUND_FILES.commands += ${COPY_FILE} $$APP_SOUND_FILES.files $${APP_SOUND_FILES.path}
		#Maps
		APP_MAPS_FILES.files = $$files($${PWD}/resources/*.*)
		APP_MAPS_FILES.path = $${OUT_PWD}/$${DESTDIR}/
		APP_MAPS_FILES.commands += test -d $${APP_MAPS_FILES.path} || mkdir -p $${APP_MAPS_FILES.path} &&
		APP_MAPS_FILES.commands += ${COPY_FILE} $$APP_MAPS_FILES.files $${APP_MAPS_FILES.path}

		QMAKE_EXTRA_TARGETS += APP_CONFIG_FILES APP_FONT_FILES APP_SCENE_FILES APP_TEXTURE_FILES APP_GUI_STYLE_FILES \
							APP_GUI_VIEW_FILES APP_SOUND_FILES APP_MAPS_FILES
		POST_TARGETDEPS += APP_CONFIG_FILES APP_FONT_FILES APP_SCENE_FILES APP_TEXTURE_FILES APP_GUI_STYLE_FILES \
							APP_GUI_VIEW_FILES APP_SOUND_FILES APP_MAPS_FILES
}

macx {
		DEFINES += LINUX TARGET_API_MAC_CARBON TARGET_API_MAC_OSX _THREAD_SAFE USE_API_SOIL
		LIBS += -lseed -lseedcontrib -framework OpenAL -framework OpenGL -framework Cocoa -framework IOKit -framework QTKit -framework CoreFoundation -framework CoreAudio -framework AudioUnit -framework ForceFeedback -framework Carbon -framework AudioToolbox
		CONFIG -= sdl
		CONFIG -= glfw
		CONFIG += sdl2

		#Configs
		APP_CONFIG_FILES.files = $$OTHER_FILES_CONFIG
		APP_CONFIG_FILES.path = Contents/Resources/configs
		#Fonts
		APP_FONT_FILES.files = $$OTHER_FILES_FONT
		APP_FONT_FILES.path = Contents/Resources/fonts
		#Scenes
		APP_SCENE_FILES.files = $$OTHER_FILES_SCENE
		APP_SCENE_FILES.path = Contents/Resources/scenes
		#Textures
		APP_TEXTURE_FILES.files = $$OTHER_FILES_TEXTURE
		APP_TEXTURE_FILES.path = Contents/Resources/textures
		#Gui
			#Styles
			APP_GUI_STYLE_FILES.files = $$OTHER_FILES_GUI_STYLE
			APP_GUI_STYLE_FILES.path = Contents/Resources/gui/styles
			#Views
			APP_GUI_VIEW_FILES.files = $$OTHER_FILES_GUI_VIEW
			APP_GUI_VIEW_FILES.path = Contents/Resources/gui/views
		#Sounds
		APP_SOUND_FILES.files = $$OTHER_FILES_SOUND
		APP_SOUND_FILES.path = Contents/Resources/sounds
		#Maps
		APP_MAPS_FILES.files = $$OTHER_FILES_MAPS
		APP_MAPS_FILES.path = Contents/Resources/

		QMAKE_BUNDLE_DATA += APP_CONFIG_FILES APP_FONT_FILES APP_SCENE_FILES \
						APP_TEXTURE_FILES APP_GUI_STYLE_FILES APP_GUI_VIEW_FILES \
						APP_SOUND_FILES APP_MAPS_FILES
}

TEMPLATE = app
CONFIG += console
CONFIG -= qt
CONFIG += sdl2

BASE = ../seed/
INCLUDEPATH += $${BASE}/include
include("../seed/compiler.pri")
include("../seed/platform.pri")

unix:!macx {
		DEFINES += LINUX PHYSFS_NO_CDROM_SUPPORT
		LIBS += -lseed -lseedcontrib -lGL -lopenal -ldl -lpthread

		#Configs
		APP_CONFIG_FILES.files = $$files($${PWD}/resources/configs/*.*)
		APP_CONFIG_FILES.path = $${OUT_PWD}/$${DESTDIR}/configs
		APP_CONFIG_FILES.commands += test -d $${APP_CONFIG_FILES.path} || mkdir -p $${APP_CONFIG_FILES.path} &&
		APP_CONFIG_FILES.commands += ${COPY_FILE} $$APP_CONFIG_FILES.files $${APP_CONFIG_FILES.path}
		#Fonts
		APP_FONT_FILES.files = $$files($${PWD}/resources/fonts/*.*)
		APP_FONT_FILES.path = $${OUT_PWD}/$${DESTDIR}/fonts
		APP_FONT_FILES.commands += test -d $${APP_FONT_FILES.path} || mkdir -p $${APP_FONT_FILES.path} &&
		APP_FONT_FILES.commands += ${COPY_FILE} $$APP_FONT_FILES.files $${APP_FONT_FILES.path}
		#Scenes
		APP_SCENE_FILES.files = $$files($${PWD}/resources/scenes/*.*)
		APP_SCENE_FILES.path = $${OUT_PWD}/$${DESTDIR}/scenes
		APP_SCENE_FILES.commands += test -d $${APP_SCENE_FILES.path} || mkdir -p $${APP_SCENE_FILES.path} &&
		APP_SCENE_FILES.commands += ${COPY_FILE} $$APP_SCENE_FILES.files $${APP_SCENE_FILES.path}
		#Textures
		APP_TEXTURE_FILES.files = $$files($${PWD}/resources/textures/*.*)
		APP_TEXTURE_FILES.path = $${OUT_PWD}/$${DESTDIR}/textures
		APP_TEXTURE_FILES.commands += test -d $${APP_TEXTURE_FILES.path} || mkdir -p $${APP_TEXTURE_FILES.path} &&
		APP_TEXTURE_FILES.commands += ${COPY_FILE} $$APP_TEXTURE_FILES.files $${APP_TEXTURE_FILES.path}
		#Gui
				#Styles
				APP_GUI_STYLE_FILES.files = $$files($${PWD}/resources/gui/styles/*.*)
				APP_GUI_STYLE_FILES.path = $${OUT_PWD}/$${DESTDIR}/gui/styles
				APP_GUI_STYLE_FILES.commands += test -d $${APP_GUI_STYLE_FILES.path} || mkdir -p $${APP_GUI_STYLE_FILES.path} &&
				APP_GUI_STYLE_FILES.commands += ${COPY_FILE} $$APP_GUI_STYLE_FILES.files $${APP_GUI_STYLE_FILES.path}
				#Views
				APP_GUI_VIEW_FILES.files = $$files($${PWD}/resources/gui/views/*.*)
				APP_GUI_VIEW_FILES.path = $${OUT_PWD}/$${DESTDIR}/gui/views
				APP_GUI_VIEW_FILES.commands += test -d $${APP_GUI_VIEW_FILES.path} || mkdir -p $${APP_GUI_VIEW_FILES.path} &&
				APP_GUI_VIEW_FILES.commands += ${COPY_FILE} $$APP_GUI_VIEW_FILES.files $${APP_GUI_VIEW_FILES.path}
		#Sounds
		APP_SOUND_FILES.files = $$files($${PWD}/resources/sounds/*.*)
		APP_SOUND_FILES.path = $${OUT_PWD}/$${DESTDIR}/sounds
		APP_SOUND_FILES.commands += test -d $${APP_SOUND_FILES.path} || mkdir -p $${APP_SOUND_FILES.path} &&
		APP_SOUND_FILES.commands += ${COPY_FILE} $$APP_SOUND_FILES.files $${APP_SOUND_FILES.path}
		#Maps
		APP_MAPS_FILES.files = $$files($${PWD}/resources/*.*)
		APP_MAPS_FILES.path = $${OUT_PWD}/$${DESTDIR}/
		APP_MAPS_FILES.commands += test -d $${APP_MAPS_FILES.path} || mkdir -p $${APP_MAPS_FILES.path} &&
		APP_MAPS_FILES.commands += ${COPY_FILE} $$APP_MAPS_FILES.files $${APP_MAPS_FILES.path}

		QMAKE_EXTRA_TARGETS += APP_CONFIG_FILES APP_FONT_FILES APP_SCENE_FILES APP_TEXTURE_FILES APP_GUI_STYLE_FILES \
							APP_GUI_VIEW_FILES APP_SOUND_FILES APP_MAPS_FILES
		POST_TARGETDEPS += APP_CONFIG_FILES APP_FONT_FILES APP_SCENE_FILES APP_TEXTURE_FILES APP_GUI_STYLE_FILES \
							APP_GUI_VIEW_FILES APP_SOUND_FILES APP_MAPS_FILES
}

macx {
		DEFINES += LINUX TARGET_API_MAC_CARBON TARGET_API_MAC_OSX _THREAD_SAFE USE_API_SOIL
		LIBS += -lseed -lseedcontrib -framework OpenAL -framework OpenGL -framework Cocoa -framework IOKit -framework QTKit -framework CoreFoundation -framework CoreAudio -framework AudioUnit -framework ForceFeedback -framework Carbon -framework AudioToolbox
		CONFIG -= sdl
		CONFIG -= glfw
		CONFIG += sdl2

		#Configs
		APP_CONFIG_FILES.files = $$OTHER_FILES_CONFIG
		APP_CONFIG_FILES.path = Contents/Resources/configs
		#Fonts
		APP_FONT_FILES.files = $$OTHER_FILES_FONT
		APP_FONT_FILES.path = Contents/Resources/fonts
		#Scenes
		APP_SCENE_FILES.files = $$OTHER_FILES_SCENE
		APP_SCENE_FILES.path = Contents/Resources/scenes
		#Textures
		APP_TEXTURE_FILES.files = $$OTHER_FILES_TEXTURE
		APP_TEXTURE_FILES.path = Contents/Resources/textures
		#Gui
			#Styles
			APP_GUI_STYLE_FILES.files = $$OTHER_FILES_GUI_STYLE
			APP_GUI_STYLE_FILES.path = Contents/Resources/gui/styles
			#Views
			APP_GUI_VIEW_FILES.files = $$OTHER_FILES_GUI_VIEW
			APP_GUI_VIEW_FILES.path = Contents/Resources/gui/views
		#Sounds
		APP_SOUND_FILES.files = $$OTHER_FILES_SOUND
		APP_SOUND_FILES.path = Contents/Resources/sounds
		#Maps
		APP_MAPS_FILES.files = $$OTHER_FILES_MAPS
		APP_MAPS_FILES.path = Contents/Resources/

		QMAKE_BUNDLE_DATA += APP_CONFIG_FILES APP_FONT_FILES APP_SCENE_FILES \
						APP_TEXTURE_FILES APP_GUI_STYLE_FILES APP_GUI_VIEW_FILES \
						APP_SOUND_FILES APP_MAPS_FILES
}


Removing -lm line as it seems to break symbian...

INCLUDEPATH += $$PWD/proj/include

SOURCES += $$PWD/proj/PJ_aeqd.c \
        $$PWD/proj/PJ_gnom.c \
        $$PWD/proj/PJ_laea.c \
        $$PWD/proj/PJ_mod_ster.c \
        $$PWD/proj/PJ_nsper.c \
        $$PWD/proj/PJ_nzmg.c \
        $$PWD/proj/PJ_ortho.c \
        $$PWD/proj/PJ_stere.c \
        $$PWD/proj/PJ_sterea.c \
        $$PWD/proj/PJ_aea.c \
        $$PWD/proj/PJ_bipc.c \
        $$PWD/proj/PJ_bonne.c \
        $$PWD/proj/PJ_eqdc.c \
        $$PWD/proj/PJ_imw_p.c \
        $$PWD/proj/PJ_krovak.c \
        $$PWD/proj/PJ_lcc.c \
        $$PWD/proj/PJ_poly.c \
        $$PWD/proj/PJ_rpoly.c \
        $$PWD/proj/PJ_sconics.c \
        $$PWD/proj/proj_rouss.c \
        $$PWD/proj/PJ_cass.c \
        $$PWD/proj/PJ_cc.c \
        $$PWD/proj/PJ_cea.c \
        $$PWD/proj/PJ_eqc.c \
        $$PWD/proj/PJ_gall.c \
        $$PWD/proj/PJ_labrd.c \
        $$PWD/proj/PJ_lsat.c \
        $$PWD/proj/PJ_merc.c \
        $$PWD/proj/PJ_mill.c \
        $$PWD/proj/PJ_ocea.c \
        $$PWD/proj/PJ_omerc.c \
        $$PWD/proj/PJ_somerc.c \
        $$PWD/proj/PJ_tcc.c \
        $$PWD/proj/PJ_tcea.c \
        $$PWD/proj/PJ_tmerc.c \
        $$PWD/proj/PJ_airy.c \
        $$PWD/proj/PJ_aitoff.c \
        $$PWD/proj/PJ_august.c \
        $$PWD/proj/PJ_bacon.c \
        $$PWD/proj/PJ_chamb.c \
        $$PWD/proj/PJ_hammer.c \
        $$PWD/proj/PJ_lagrng.c \
        $$PWD/proj/PJ_larr.c \
        $$PWD/proj/PJ_lask.c \
        $$PWD/proj/PJ_nocol.c \
        $$PWD/proj/PJ_ob_tran.c \
        $$PWD/proj/PJ_oea.c \
        $$PWD/proj/PJ_tpeqd.c \
        $$PWD/proj/PJ_vandg.c \
        $$PWD/proj/PJ_vandg2.c \
        $$PWD/proj/PJ_vandg4.c \
        $$PWD/proj/PJ_wag7.c \
        $$PWD/proj/PJ_lcca.c \
        $$PWD/proj/PJ_geos.c \
        $$PWD/proj/PJ_boggs.c \
        $$PWD/proj/PJ_collg.c \
        $$PWD/proj/PJ_crast.c \
        $$PWD/proj/PJ_denoy.c \
        $$PWD/proj/PJ_eck1.c \
        $$PWD/proj/PJ_eck2.c \
        $$PWD/proj/PJ_eck3.c \
        $$PWD/proj/PJ_eck4.c \
        $$PWD/proj/PJ_eck5.c \
        $$PWD/proj/PJ_fahey.c \
        $$PWD/proj/PJ_fouc_s.c \
        $$PWD/proj/PJ_gins8.c \
        $$PWD/proj/PJ_gstmerc.c \
        $$PWD/proj/PJ_gn_sinu.c \
        $$PWD/proj/PJ_goode.c \
        $$PWD/proj/PJ_hatano.c \
        $$PWD/proj/PJ_loxim.c \
        $$PWD/proj/PJ_mbt_fps.c \
        $$PWD/proj/PJ_mbtfpp.c \
        $$PWD/proj/PJ_mbtfpq.c \
        $$PWD/proj/PJ_moll.c \
        $$PWD/proj/PJ_nell.c \
        $$PWD/proj/PJ_nell_h.c \
        $$PWD/proj/PJ_putp2.c \
        $$PWD/proj/PJ_putp3.c \
        $$PWD/proj/PJ_putp4p.c \
        $$PWD/proj/PJ_putp5.c \
        $$PWD/proj/PJ_putp6.c \
        $$PWD/proj/PJ_robin.c \
        $$PWD/proj/PJ_sts.c \
        $$PWD/proj/PJ_urm5.c \
        $$PWD/proj/PJ_urmfps.c \
        $$PWD/proj/PJ_wag2.c \
        $$PWD/proj/PJ_wag3.c \
        $$PWD/proj/PJ_wink1.c \
        $$PWD/proj/PJ_wink2.c \
        $$PWD/proj/pj_latlong.c \
        $$PWD/proj/pj_geocent.c \
        $$PWD/proj/aasincos.c \
        $$PWD/proj/adjlon.c \
        $$PWD/proj/bch2bps.c \
        $$PWD/proj/bchgen.c \
        $$PWD/proj/biveval.c \
        $$PWD/proj/dmstor.c \
        $$PWD/proj/mk_cheby.c \
        $$PWD/proj/pj_auth.c \
        $$PWD/proj/pj_deriv.c \
        $$PWD/proj/pj_ell_set.c \
        $$PWD/proj/pj_ellps.c \
        $$PWD/proj/pj_errno.c \
        $$PWD/proj/pj_factors.c \
        $$PWD/proj/pj_fwd.c \
        $$PWD/proj/pj_init.c \
        $$PWD/proj/pj_inv.c \
        $$PWD/proj/pj_list.c \
        $$PWD/proj/pj_malloc.c \
        $$PWD/proj/pj_mlfn.c \
        $$PWD/proj/pj_msfn.c \
        $$PWD/proj/proj_mdist.c \
        $$PWD/proj/pj_open_lib_qt.cpp \
	$$PWD/proj/pj_param.c \
        $$PWD/proj/pj_phi2.c \
        $$PWD/proj/pj_pr_list.c \
        $$PWD/proj/pj_qsfn.c \
        $$PWD/proj/pj_strerrno.c \
        $$PWD/proj/pj_tsfn.c \
        $$PWD/proj/pj_units.c \
        $$PWD/proj/pj_zpoly1.c \
        $$PWD/proj/rtodms.c \
        $$PWD/proj/vector1.c \
        $$PWD/proj/pj_release.c \
        $$PWD/proj/pj_gauss.c \
        $$PWD/proj/nad_cvt.c \
        $$PWD/proj/nad_init.c \
        $$PWD/proj/nad_intr.c \
        $$PWD/proj/emess.c \
        $$PWD/proj/pj_apply_gridshift.c \
        $$PWD/proj/pj_datums.c \
        $$PWD/proj/pj_datum_set.c \
        $$PWD/proj/pj_transform.c \
        $$PWD/proj/geocent.c \
        $$PWD/proj/pj_utils.c \
        $$PWD/proj/pj_gridinfo.c \
        $$PWD/proj/pj_gridlist.c \
        $$PWD/proj/pj_mutex.c \
        $$PWD/proj/pj_initcache.c

unix {
  DEFINES += MUTEX_pthread
}

win32 {
  DEFINES += MUTEX_win32
}

RESOURCES += $$PWD/proj/data.qrc

INCLUDEPATH += $$PWD/proj/include

SOURCES += $$PWD/proj/PJ_aeqd.c \
        $$PWD/proj/PJ_gnom.c \
        $$PWD/proj/PJ_laea.c \
        $$PWD/proj/PJ_mod_ster.c \
        $$PWD/proj/PJ_nsper.c \
        $$PWD/proj/PJ_nzmg.c \
        $$PWD/proj/PJ_ortho.c \
        $$PWD/proj/PJ_stere.c \
        $$PWD/proj/PJ_sterea.c \
        $$PWD/proj/PJ_aea.c \
        $$PWD/proj/PJ_bipc.c \
        $$PWD/proj/PJ_bonne.c \
        $$PWD/proj/PJ_eqdc.c \
        $$PWD/proj/PJ_imw_p.c \
        $$PWD/proj/PJ_krovak.c \
        $$PWD/proj/PJ_lcc.c \
        $$PWD/proj/PJ_poly.c \
        $$PWD/proj/PJ_rpoly.c \
        $$PWD/proj/PJ_sconics.c \
        $$PWD/proj/proj_rouss.c \
        $$PWD/proj/PJ_cass.c \
        $$PWD/proj/PJ_cc.c \
        $$PWD/proj/PJ_cea.c \
        $$PWD/proj/PJ_eqc.c \
        $$PWD/proj/PJ_gall.c \
        $$PWD/proj/PJ_labrd.c \
        $$PWD/proj/PJ_lsat.c \
        $$PWD/proj/PJ_merc.c \
        $$PWD/proj/PJ_mill.c \
        $$PWD/proj/PJ_ocea.c \
        $$PWD/proj/PJ_omerc.c \
        $$PWD/proj/PJ_somerc.c \
        $$PWD/proj/PJ_tcc.c \
        $$PWD/proj/PJ_tcea.c \
        $$PWD/proj/PJ_tmerc.c \
        $$PWD/proj/PJ_airy.c \
        $$PWD/proj/PJ_aitoff.c \
        $$PWD/proj/PJ_august.c \
        $$PWD/proj/PJ_bacon.c \
        $$PWD/proj/PJ_chamb.c \
        $$PWD/proj/PJ_hammer.c \
        $$PWD/proj/PJ_lagrng.c \
        $$PWD/proj/PJ_larr.c \
        $$PWD/proj/PJ_lask.c \
        $$PWD/proj/PJ_nocol.c \
        $$PWD/proj/PJ_ob_tran.c \
        $$PWD/proj/PJ_oea.c \
        $$PWD/proj/PJ_tpeqd.c \
        $$PWD/proj/PJ_vandg.c \
        $$PWD/proj/PJ_vandg2.c \
        $$PWD/proj/PJ_vandg4.c \
        $$PWD/proj/PJ_wag7.c \
        $$PWD/proj/PJ_lcca.c \
        $$PWD/proj/PJ_geos.c \
        $$PWD/proj/PJ_boggs.c \
        $$PWD/proj/PJ_collg.c \
        $$PWD/proj/PJ_crast.c \
        $$PWD/proj/PJ_denoy.c \
        $$PWD/proj/PJ_eck1.c \
        $$PWD/proj/PJ_eck2.c \
        $$PWD/proj/PJ_eck3.c \
        $$PWD/proj/PJ_eck4.c \
        $$PWD/proj/PJ_eck5.c \
        $$PWD/proj/PJ_fahey.c \
        $$PWD/proj/PJ_fouc_s.c \
        $$PWD/proj/PJ_gins8.c \
        $$PWD/proj/PJ_gstmerc.c \
        $$PWD/proj/PJ_gn_sinu.c \
        $$PWD/proj/PJ_goode.c \
        $$PWD/proj/PJ_hatano.c \
        $$PWD/proj/PJ_loxim.c \
        $$PWD/proj/PJ_mbt_fps.c \
        $$PWD/proj/PJ_mbtfpp.c \
        $$PWD/proj/PJ_mbtfpq.c \
        $$PWD/proj/PJ_moll.c \
        $$PWD/proj/PJ_nell.c \
        $$PWD/proj/PJ_nell_h.c \
        $$PWD/proj/PJ_putp2.c \
        $$PWD/proj/PJ_putp3.c \
        $$PWD/proj/PJ_putp4p.c \
        $$PWD/proj/PJ_putp5.c \
        $$PWD/proj/PJ_putp6.c \
        $$PWD/proj/PJ_robin.c \
        $$PWD/proj/PJ_sts.c \
        $$PWD/proj/PJ_urm5.c \
        $$PWD/proj/PJ_urmfps.c \
        $$PWD/proj/PJ_wag2.c \
        $$PWD/proj/PJ_wag3.c \
        $$PWD/proj/PJ_wink1.c \
        $$PWD/proj/PJ_wink2.c \
        $$PWD/proj/pj_latlong.c \
        $$PWD/proj/pj_geocent.c \
        $$PWD/proj/aasincos.c \
        $$PWD/proj/adjlon.c \
        $$PWD/proj/bch2bps.c \
        $$PWD/proj/bchgen.c \
        $$PWD/proj/biveval.c \
        $$PWD/proj/dmstor.c \
        $$PWD/proj/mk_cheby.c \
        $$PWD/proj/pj_auth.c \
        $$PWD/proj/pj_deriv.c \
        $$PWD/proj/pj_ell_set.c \
        $$PWD/proj/pj_ellps.c \
        $$PWD/proj/pj_errno.c \
        $$PWD/proj/pj_factors.c \
        $$PWD/proj/pj_fwd.c \
        $$PWD/proj/pj_init.c \
        $$PWD/proj/pj_inv.c \
        $$PWD/proj/pj_list.c \
        $$PWD/proj/pj_malloc.c \
        $$PWD/proj/pj_mlfn.c \
        $$PWD/proj/pj_msfn.c \
        $$PWD/proj/proj_mdist.c \
        $$PWD/proj/pj_open_lib_qt.cpp \
	$$PWD/proj/pj_param.c \
        $$PWD/proj/pj_phi2.c \
        $$PWD/proj/pj_pr_list.c \
        $$PWD/proj/pj_qsfn.c \
        $$PWD/proj/pj_strerrno.c \
        $$PWD/proj/pj_tsfn.c \
        $$PWD/proj/pj_units.c \
        $$PWD/proj/pj_zpoly1.c \
        $$PWD/proj/rtodms.c \
        $$PWD/proj/vector1.c \
        $$PWD/proj/pj_release.c \
        $$PWD/proj/pj_gauss.c \
        $$PWD/proj/nad_cvt.c \
        $$PWD/proj/nad_init.c \
        $$PWD/proj/nad_intr.c \
        $$PWD/proj/emess.c \
        $$PWD/proj/pj_apply_gridshift.c \
        $$PWD/proj/pj_datums.c \
        $$PWD/proj/pj_datum_set.c \
        $$PWD/proj/pj_transform.c \
        $$PWD/proj/geocent.c \
        $$PWD/proj/pj_utils.c \
        $$PWD/proj/pj_gridinfo.c \
        $$PWD/proj/pj_gridlist.c \
        $$PWD/proj/pj_mutex.c \
        $$PWD/proj/pj_initcache.c

unix {
  DEFINES += MUTEX_pthread
  LIBS += -lm
}

win32 {
  DEFINES += MUTEX_win32
}

RESOURCES += $$PWD/proj/data.qrc