Fixes for qmake project.

Fixes for qmake project.

HEADERS += ../../../lib/src/qnetmap_arrowpoint.h \
    ../../../lib/src/qnetmap_arbitraryfigure.h\
    ../../../lib/src/qnetmap_base.h \
    ../../../lib/src/qnetmap_checkproxy.h \
    ../../../lib/src/qnetmap_circlepoint.h \
    ../../../lib/src/qnetmap_coordinatesdialog.h \
    ../../../lib/src/qnetmap_currentcoordinate.h \
    ../../../lib/src/qnetmap_curve.h \
    ../../../lib/src/qnetmap_emptymapadapter.h \
    ../../../lib/src/qnetmap_fixedimageoverlay.h \
    ../../../lib/src/qnetmap_geometry.h \
    ../../../lib/src/qnetmap_geometrylayer.h \
    ../../../lib/src/qnetmap_geometryobject.h \
    ../../../lib/src/qnetmap_global.h \
    ../../../lib/src/qnetmap_gps_position.h \
    ../../../lib/src/qnetmap_imagemanager.h \
    ../../../lib/src/qnetmap_imagepoint.h \
    ../../../lib/src/qnetmap_interfaces.h \
    ../../../lib/src/qnetmap_layer.h \
    ../../../lib/src/qnetmap_layermanager.h \
    ../../../lib/src/qnetmap_linestring.h \
    ../../../lib/src/qnetmap_loaddialogwizard.h \
    ../../../lib/src/qnetmap_loadprogressbar.h \
    ../../../lib/src/qnetmap_mapadapter.h \
    ../../../lib/src/qnetmap_mapadapterparameters.h \
    ../../../lib/src/qnetmap_mapcontrol.h \
    ../../../lib/src/qnetmap_maplayer.h \
    ../../../lib/src/qnetmap_mapnetwork.h \
    ../../../lib/src/qnetmap_mapplugin.h \
    ../../../lib/src/qnetmap_pngimage.h \
    ../../../lib/src/qnetmap_point.h \
    ../../../lib/src/qnetmap_polygon.h \
    ../../../lib/src/qnetmap_polyline.h \
    ../../../lib/src/qnetmap_rastermap.h \
    ../../../lib/src/qnetmap_rastermapadapter.h \
    ../../../lib/src/qnetmap_rastermapsdialog.h \
    ../../../lib/src/qnetmap_rulerscaling.h \
    ../../../lib/src/qnetmap_shape.h \
    ../../../lib/src/qnetmap_tilemapadapter.h \
    ../../../lib/src/qnetmap_tilemapadapterparameters.h \
    ../../../lib/src/qnetmap_translator.h \
    ../../../lib/src/qnetmap_universaltilemapadapter.h \
    ../../../lib/src/qnetmap_universaltilemapxmlhandler.h \
    ../../../lib/src/qnetmap_utmpoint.h \
    ../../../lib/src/qnetmap_visual_elments.h \
    ../../../lib/src/qnetmap_widget.h \
    ../../../lib/src/qnetmap_xmltagnames.h

SOURCES += ../../../lib/src/qnetmap_arrowpoint.cpp \
    ../../../lib/src/qnetmap_arbitraryfigure.cpp\
    ../../../lib/src/qnetmap_base.cpp \
    ../../../lib/src/qnetmap_basepoint.cpp \
    ../../../lib/src/qnetmap_checkproxy.cpp \
    ../../../lib/src/qnetmap_circlepoint.cpp \
    ../../../lib/src/qnetmap_coordinatesdialog.cpp \
    ../../../lib/src/qnetmap_currentcoordinate.cpp \
    ../../../lib/src/qnetmap_curve.cpp \
    ../../../lib/src/qnetmap_emptymapadapter.cpp \
    ../../../lib/src/qnetmap_fixedimageoverlay.cpp \
    ../../../lib/src/qnetmap_geometry.cpp \
    ../../../lib/src/qnetmap_geometrylayer.cpp \
    ../../../lib/src/qnetmap_geometryobject.cpp \
    ../../../lib/src/qnetmap_global.cpp \
    ../../../lib/src/qnetmap_gps_position.cpp \
    ../../../lib/src/qnetmap_httpparameters.cpp \
    ../../../lib/src/qnetmap_imagemanager.cpp \
    ../../../lib/src/qnetmap_layer.cpp \
    ../../../lib/src/qnetmap_layermanager.cpp \
    ../../../lib/src/qnetmap_linestring.cpp \
    ../../../lib/src/qnetmap_loaddialogwizard.cpp \
    ../../../lib/src/qnetmap_loadprogressbar.cpp \
    ../../../lib/src/qnetmap_mapadapter.cpp \
    ../../../lib/src/qnetmap_mapadapterparameters.cpp \
    ../../../lib/src/qnetmap_mapcontrol.cpp \
    ../../../lib/src/qnetmap_maplayer.cpp \
    ../../../lib/src/qnetmap_mapnetwork.cpp \
    ../../../lib/src/qnetmap_pngimage.cpp \
    ../../../lib/src/qnetmap_point.cpp \
    ../../../lib/src/qnetmap_polygon.cpp \
    ../../../lib/src/qnetmap_polyline.cpp \
    ../../../lib/src/qnetmap_rastermap.cpp \
    ../../../lib/src/qnetmap_rastermapadapter.cpp \
    ../../../lib/src/qnetmap_rastermapsdialog.cpp \
    ../../../lib/src/qnetmap_rulerscaling.cpp \
    ../../../lib/src/qnetmap_shape.cpp \
    ../../../lib/src/qnetmap_tilemapadapter.cpp \
    ../../../lib/src/qnetmap_tilemapadapterparameters.cpp \
    ../../../lib/src/qnetmap_universaltilemapadapter.cpp \
    ../../../lib/src/qnetmap_universaltilemapxmlhandler.cpp \
    ../../../lib/src/qnetmap_utmpoint.cpp \
    ../../../lib/src/qnetmap_widget.cpp \
    ../../../lib/src/qnetmap_version.cpp

HEADERS += ../../../lib/src/qnetmap_arrowpoint.h \
    ../../../lib/src/qnetmap_arbitraryfigure.h\
    ../../../lib/src/qnetmap_base.h \
    ../../../lib/src/qnetmap_checkproxy.h \
    ../../../lib/src/qnetmap_circlepoint.h \
    ../../../lib/src/qnetmap_coordinatesdialog.h \
    ../../../lib/src/qnetmap_currentcoordinate.h \
    ../../../lib/src/qnetmap_curve.h \
    ../../../lib/src/qnetmap_emptymapadapter.h \
    ../../../lib/src/qnetmap_fixedimageoverlay.h \
    ../../../lib/src/qnetmap_geometry.h \
    ../../../lib/src/qnetmap_geometrylayer.h \
    ../../../lib/src/qnetmap_geometryobject.h \
    ../../../lib/src/qnetmap_global.h \
    ../../../lib/src/qnetmap_gps_position.h \
    ../../../lib/src/qnetmap_imagemanager.h \
    ../../../lib/src/qnetmap_imagepoint.h \
    ../../../lib/src/qnetmap_interfaces.h \
    ../../../lib/src/qnetmap_layer.h \
    ../../../lib/src/qnetmap_layermanager.h \
    ../../../lib/src/qnetmap_linestring.h \
    ../../../lib/src/qnetmap_loaddialogwizard.h \
    ../../../lib/src/qnetmap_loadprogressbar.h \
    ../../../lib/src/qnetmap_mapadapter.h \
    ../../../lib/src/qnetmap_mapadapterparameters.h \
    ../../../lib/src/qnetmap_mapcontrol.h \
    ../../../lib/src/qnetmap_maplayer.h \
    ../../../lib/src/qnetmap_mapnetwork.h \
    ../../../lib/src/qnetmap_mapplugin.h \
    ../../../lib/src/qnetmap_pngimage.h \
    ../../../lib/src/qnetmap_point.h \
    ../../../lib/src/qnetmap_polygon.h \
    ../../../lib/src/qnetmap_rastermap.h \
    ../../../lib/src/qnetmap_rastermapadapter.h \
    ../../../lib/src/qnetmap_rastermapsdialog.h \
    ../../../lib/src/qnetmap_rulerscaling.h \
    ../../../lib/src/qnetmap_shape.h \
    ../../../lib/src/qnetmap_tilemapadapter.h \
    ../../../lib/src/qnetmap_tilemapadapterparameters.h \
    ../../../lib/src/qnetmap_translator.h \
    ../../../lib/src/qnetmap_universaltilemapadapter.h \
    ../../../lib/src/qnetmap_universaltilemapxmlhandler.h \
    ../../../lib/src/qnetmap_utmpoint.h \
    ../../../lib/src/qnetmap_visual_elments.h \
    ../../../lib/src/qnetmap_widget.h \
    ../../../lib/src/qnetmap_xmltagnames.h

SOURCES += ../../../lib/src/qnetmap_arrowpoint.cpp \
    ../../../lib/src/qnetmap_arbitraryfigure.cpp\
    ../../../lib/src/qnetmap_base.cpp \
    ../../../lib/src/qnetmap_basepoint.cpp \
    ../../../lib/src/qnetmap_checkproxy.cpp \
    ../../../lib/src/qnetmap_circlepoint.cpp \
    ../../../lib/src/qnetmap_coordinatesdialog.cpp \
    ../../../lib/src/qnetmap_currentcoordinate.cpp \
    ../../../lib/src/qnetmap_curve.cpp \
    ../../../lib/src/qnetmap_emptymapadapter.cpp \
    ../../../lib/src/qnetmap_fixedimageoverlay.cpp \
    ../../../lib/src/qnetmap_geometry.cpp \
    ../../../lib/src/qnetmap_geometrylayer.cpp \
    ../../../lib/src/qnetmap_geometryobject.cpp \
    ../../../lib/src/qnetmap_global.cpp \
    ../../../lib/src/qnetmap_gps_position.cpp \
    ../../../lib/src/qnetmap_httpparameters.cpp \
    ../../../lib/src/qnetmap_imagemanager.cpp \
    ../../../lib/src/qnetmap_layer.cpp \
    ../../../lib/src/qnetmap_layermanager.cpp \
    ../../../lib/src/qnetmap_linestring.cpp \
    ../../../lib/src/qnetmap_loaddialogwizard.cpp \
    ../../../lib/src/qnetmap_loadprogressbar.cpp \
    ../../../lib/src/qnetmap_mapadapter.cpp \
    ../../../lib/src/qnetmap_mapadapterparameters.cpp \
    ../../../lib/src/qnetmap_mapcontrol.cpp \
    ../../../lib/src/qnetmap_maplayer.cpp \
    ../../../lib/src/qnetmap_mapnetwork.cpp \
    ../../../lib/src/qnetmap_pngimage.cpp \
    ../../../lib/src/qnetmap_point.cpp \
    ../../../lib/src/qnetmap_polygon.cpp \
    ../../../lib/src/qnetmap_rastermap.cpp \
    ../../../lib/src/qnetmap_rastermapadapter.cpp \
    ../../../lib/src/qnetmap_rastermapsdialog.cpp \
    ../../../lib/src/qnetmap_rulerscaling.cpp \
    ../../../lib/src/qnetmap_shape.cpp \
    ../../../lib/src/qnetmap_tilemapadapter.cpp \
    ../../../lib/src/qnetmap_tilemapadapterparameters.cpp \
    ../../../lib/src/qnetmap_universaltilemapadapter.cpp \
    ../../../lib/src/qnetmap_universaltilemapxmlhandler.cpp \
    ../../../lib/src/qnetmap_utmpoint.cpp \
    ../../../lib/src/qnetmap_widget.cpp \
    ../../../lib/src/qnetmap_version.cpp


Copy frameworks to correct location

Copy frameworks to correct location

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
# This file is part of the open groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------

QMAKE_POST_LINK += echo "Copying files"

#
# Copy the application resources to the associated place alongside the application
#

LinuxBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
}

MacBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
}

# Windows version of QMAKE_COPY_DIR of course doesn't work the same as Mac/Linux. It will only
# copy the contents of the source directory. It doesn't create the top level source directory
# in the target.
WindowsBuild {
    # Make sure to keep both side of this if using the same set of directories
	DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
	BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\files\" \"$$DESTDIR_COPY_RESOURCE_LIST\\files\"
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\data\" \"$$DESTDIR_COPY_RESOURCE_LIST\\data\"
} else {
    # Make sure to keep both side of this if using the same set of directories
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/files $$DESTDIR_COPY_RESOURCE_LIST
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/data $$DESTDIR_COPY_RESOURCE_LIST
}

#
# Perform platform specific setup
#

MacBuild {
	# Copy non-standard libraries and frameworks into app package
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/libs/lib/mac64/lib $$DESTDIR/$${TARGET}.app/Contents/libs
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR -L $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents

	# Fix library paths inside executable

    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgViewer.dylib \
        libosgGA.dylib \
        libosgDB.dylib \
        libosgText.dylib \
        libosgWidget.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

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

	# OSG GA LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgGA.dylib \
        libosgDB.dylib \
        libosgUtil.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG DB LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgDB.dylib \
        libosgUtil.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG TEXT LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgDB.dylib \
        libosgUtil.dylib \
        libosgText.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG UTIL LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgUtil.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG VIEWER LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgGA.dylib \
        libosgDB.dylib \
        libosgUtil.dylib \
        libosgText.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG WIDGET LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgGA.dylib \
        libosgDB.dylib \
        libosgUtil.dylib \
        libosgText.dylib \
        libosgViewer.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# CORE OSG LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$DESTDIR/$${TARGET}.app/Contents/libs/libosg.dylib

    # SDL Framework
    QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}

}

WindowsBuild {
	BASEDIR_WIN = $$replace(BASEDIR, "/", "\\")
	DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
	D_DIR = $$[QT_INSTALL_LIBEXECS]
	DLL_DIR = $$replace(D_DIR, "/", "\\")

	# Copy dependencies
	DebugBuild: DLL_QT_DEBUGCHAR = "d"
    ReleaseBuild: DLL_QT_DEBUGCHAR = ""
    COPY_FILE_LIST = \
        $$BASEDIR\\libs\\lib\\sdl\\win32\\SDL.dll \
        $$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
        $$DLL_DIR\\icu*.dll \
        $$DLL_DIR\\Qt5Core$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Gui$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Multimedia$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5MultimediaWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Network$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5OpenGL$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Positioning$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5PrintSupport$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Qml$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Quick$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5QuickWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Sensors$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5SerialPort$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5OpenGL$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Sql$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Svg$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Test$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5WebKit$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5WebKitWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Widgets$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Xml$${DLL_QT_DEBUGCHAR}.dll
    for(COPY_FILE, COPY_FILE_LIST) {
		QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\"
    }

	# Copy platform plugins
	P_DIR = $$[QT_INSTALL_PLUGINS]
	PLUGINS_DIR_WIN = $$replace(P_DIR, "/", "\\")
	QMAKE_POST_LINK += $$escape_expand(\\n) mkdir release\\platforms
	QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$PLUGINS_DIR_WIN\\platforms\\qwindows$${DLL_QT_DEBUGCHAR}.dll\" \"$$DESTDIR_WIN\\platforms\\qwindows$${DLL_QT_DEBUGCHAR}.dll\"
	QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\imageformats\" \"$$DESTDIR_WIN\\imageformats\"
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\sqldrivers\" \"$$DESTDIR_WIN\\sqldrivers\"

	ReleaseBuild {
		# Copy Visual Studio DLLs
		# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
		win32-msvc2010 {
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp100.dll\"  \"$$DESTDIR_WIN\"
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr100.dll\"  \"$$DESTDIR_WIN\"
		}
		else:win32-msvc2012 {
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp110.dll\"  \"$$DESTDIR_WIN\"
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr110.dll\"  \"$$DESTDIR_WIN\"
		}
		else:win32-msvc2013 {
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp120.dll\"  \"$$DESTDIR_WIN\"
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr120.dll\"  \"$$DESTDIR_WIN\"
		}
		else {
			error("Visual studio version not supported, installation cannot be completed.")
		}
	}
}

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
# This file is part of the open groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------

QMAKE_POST_LINK += echo "Copying files"

#
# Copy the application resources to the associated place alongside the application
#

LinuxBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
}

MacBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
}

# Windows version of QMAKE_COPY_DIR of course doesn't work the same as Mac/Linux. It will only
# copy the contents of the source directory. It doesn't create the top level source directory
# in the target.
WindowsBuild {
    # Make sure to keep both side of this if using the same set of directories
	DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
	BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\files\" \"$$DESTDIR_COPY_RESOURCE_LIST\\files\"
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\data\" \"$$DESTDIR_COPY_RESOURCE_LIST\\data\"
} else {
    # Make sure to keep both side of this if using the same set of directories
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/files $$DESTDIR_COPY_RESOURCE_LIST
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/data $$DESTDIR_COPY_RESOURCE_LIST
}

#
# Perform platform specific setup
#

MacBuild {
	# Copy non-standard libraries and frameworks into app package
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/libs/lib/mac64/lib $$DESTDIR/$${TARGET}.app/Contents/libs
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR -L $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/Frameworks

	# Fix library paths inside executable

    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgViewer.dylib \
        libosgGA.dylib \
        libosgDB.dylib \
        libosgText.dylib \
        libosgWidget.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

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

	# OSG GA LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgGA.dylib \
        libosgDB.dylib \
        libosgUtil.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG DB LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgDB.dylib \
        libosgUtil.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG TEXT LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgDB.dylib \
        libosgUtil.dylib \
        libosgText.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG UTIL LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgUtil.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG VIEWER LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgGA.dylib \
        libosgDB.dylib \
        libosgUtil.dylib \
        libosgText.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# OSG WIDGET LIBRARY
    INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
    INSTALL_NAME_LIB_LIST = \
        libOpenThreads.dylib \
        libosg.dylib \
        libosgGA.dylib \
        libosgDB.dylib \
        libosgUtil.dylib \
        libosgText.dylib \
        libosgViewer.dylib
    for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
        QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
    }

	# CORE OSG LIBRARY
    QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$DESTDIR/$${TARGET}.app/Contents/libs/libosg.dylib

    # SDL Framework
    QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}

}

WindowsBuild {
	BASEDIR_WIN = $$replace(BASEDIR, "/", "\\")
	DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
	D_DIR = $$[QT_INSTALL_LIBEXECS]
	DLL_DIR = $$replace(D_DIR, "/", "\\")

	# Copy dependencies
	DebugBuild: DLL_QT_DEBUGCHAR = "d"
    ReleaseBuild: DLL_QT_DEBUGCHAR = ""
    COPY_FILE_LIST = \
        $$BASEDIR\\libs\\lib\\sdl\\win32\\SDL.dll \
        $$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
        $$DLL_DIR\\icu*.dll \
        $$DLL_DIR\\Qt5Core$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Gui$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Multimedia$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5MultimediaWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Network$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5OpenGL$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Positioning$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5PrintSupport$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Qml$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Quick$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5QuickWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Sensors$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5SerialPort$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5OpenGL$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Sql$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Svg$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Test$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5WebKit$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5WebKitWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Widgets$${DLL_QT_DEBUGCHAR}.dll \
        $$DLL_DIR\\Qt5Xml$${DLL_QT_DEBUGCHAR}.dll
    for(COPY_FILE, COPY_FILE_LIST) {
		QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\"
    }

	# Copy platform plugins
	P_DIR = $$[QT_INSTALL_PLUGINS]
	PLUGINS_DIR_WIN = $$replace(P_DIR, "/", "\\")
	QMAKE_POST_LINK += $$escape_expand(\\n) mkdir release\\platforms
	QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$PLUGINS_DIR_WIN\\platforms\\qwindows$${DLL_QT_DEBUGCHAR}.dll\" \"$$DESTDIR_WIN\\platforms\\qwindows$${DLL_QT_DEBUGCHAR}.dll\"
	QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\imageformats\" \"$$DESTDIR_WIN\\imageformats\"
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\sqldrivers\" \"$$DESTDIR_WIN\\sqldrivers\"

	ReleaseBuild {
		# Copy Visual Studio DLLs
		# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
		win32-msvc2010 {
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp100.dll\"  \"$$DESTDIR_WIN\"
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr100.dll\"  \"$$DESTDIR_WIN\"
		}
		else:win32-msvc2012 {
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp110.dll\"  \"$$DESTDIR_WIN\"
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr110.dll\"  \"$$DESTDIR_WIN\"
		}
		else:win32-msvc2013 {
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp120.dll\"  \"$$DESTDIR_WIN\"
			QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr120.dll\"  \"$$DESTDIR_WIN\"
		}
		else {
			error("Visual studio version not supported, installation cannot be completed.")
		}
	}
}


linux package always include libQt5Multimedia (#4122)

- fixes #4105

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
# License terms set in COPYING.md
# -------------------------------------------------

QMAKE_POST_LINK += echo "Copying files"

#
# Copy the application resources to the associated place alongside the application
#

LinuxBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
}

MacBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
}

# Windows version of QMAKE_COPY_DIR of course doesn't work the same as Mac/Linux. It will only
# copy the contents of the source directory. It doesn't create the top level source directory
# in the target.
WindowsBuild {
    # Make sure to keep both side of this if using the same set of directories
    DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
    BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\resources\\flightgear\" \"$$DESTDIR_COPY_RESOURCE_LIST\\flightgear\"
} else {
    !MobileBuild {
        # Make sure to keep both sides of this if using the same set of directories
        QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/resources/flightgear $$DESTDIR_COPY_RESOURCE_LIST
    }
}

#
# Perform platform specific setup
#

iOSBuild | MacBuild {
    # Update version info in bundle
    QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $${MAC_VERSION}\" $$DESTDIR/$${TARGET}.app/Contents/Info.plist
    QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $${MAC_BUILD}\" $$DESTDIR/$${TARGET}.app/Contents/Info.plist
}

MacBuild {
    # Copy non-standard frameworks into app package
    QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/
    # SDL2 Framework
    QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}

WindowsBuild {
    BASEDIR_WIN = $$replace(BASEDIR, "/", "\\")
    DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
    QT_BIN_DIR  = $$dirname(QMAKE_QMAKE)

    # Copy dependencies
    DebugBuild: DLL_QT_DEBUGCHAR = "d"
    ReleaseBuild: DLL_QT_DEBUGCHAR = ""
    COPY_FILE_LIST = \
        $$BASEDIR\\libs\\lib\\sdl2\\msvc\\lib\\x86\\SDL2.dll \
        $$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
        $$BASEDIR\\deploy\\libeay32.dll

    for(COPY_FILE, COPY_FILE_LIST) {
        QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\"
    }

        ReleaseBuild {
        # Copy Visual Studio DLLs
        # Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
        win32-msvc2010 {
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp100.dll\"  \"$$DESTDIR_WIN\"
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr100.dll\"  \"$$DESTDIR_WIN\"
        }
        else:win32-msvc2012 {
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp110.dll\"  \"$$DESTDIR_WIN\"
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr110.dll\"  \"$$DESTDIR_WIN\"
        }
        else:win32-msvc2013 {
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp120.dll\"  \"$$DESTDIR_WIN\"
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr120.dll\"  \"$$DESTDIR_WIN\"
        }
        else {
            error("Visual studio version not supported, installation cannot be completed.")
        }
    }

    DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR_WIN\\$${TARGET}.exe))
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QT_BIN_DIR\\windeployqt --no-compiler-runtime --qmldir=$${BASEDIR_WIN}\\src $${DEPLOY_TARGET}

}

LinuxBuild {
    installer {
        QMAKE_POST_LINK += && mkdir -p $$DESTDIR/Qt/libs && mkdir -p $$DESTDIR/Qt/plugins

        # QT_INSTALL_LIBS
        QT_LIB_LIST = \
            libQt5Core.so.5 \
            libQt5DBus.so.5 \
            libQt5Gui.so.5 \
            libQt5Location.so.5 \
            libQt5Multimedia.so.5 \
            libQt5MultimediaQuick_p.so.5 \
            libQt5Network.so.5 \
            libQt5OpenGL.so.5 \
            libQt5Positioning.so.5 \
            libQt5PrintSupport.so.5 \
            libQt5Qml.so.5 \
            libQt5Quick.so.5 \
            libQt5QuickWidgets.so.5 \
            libQt5SerialPort.so.5 \
            libQt5Sql.so.5 \
            libQt5Svg.so.5 \
            libQt5Test.so.5 \
            libQt5Widgets.so.5 \
            libQt5XcbQpa.so.5

        !contains(DEFINES, __rasp_pi2__) {
            QT_LIB_LIST += \
                libicudata.so.54 \
                libicui18n.so.54 \
                libicuuc.so.54
        }

        for(QT_LIB, QT_LIB_LIST) {
            QMAKE_POST_LINK += && $$QMAKE_COPY --dereference $$[QT_INSTALL_LIBS]/$$QT_LIB $$DESTDIR/Qt/libs/
        }

        # QT_INSTALL_PLUGINS
        QT_PLUGIN_LIST = \
            bearer \
            geoservices \
            iconengines \
            imageformats \
            platforminputcontexts \
            platforms \
            platformthemes \
            position \
            sqldrivers

        !contains(DEFINES, __rasp_pi2__) {
            QT_PLUGIN_LIST += xcbglintegrations
        }

        for(QT_PLUGIN, QT_PLUGIN_LIST) {
            QMAKE_POST_LINK += && $$QMAKE_COPY --dereference --recursive $$[QT_INSTALL_PLUGINS]/$$QT_PLUGIN $$DESTDIR/Qt/plugins/
        }

        # QT_INSTALL_QML
        QMAKE_POST_LINK += && $$QMAKE_COPY --dereference --recursive $$[QT_INSTALL_QML] $$DESTDIR/Qt/

        # QGroundControl start script
        QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol-start.sh $$DESTDIR
        QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol.desktop $$DESTDIR
        QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/resources/icons/qgroundcontrol.png $$DESTDIR
    }
}

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
# License terms set in COPYING.md
# -------------------------------------------------

QMAKE_POST_LINK += echo "Copying files"

#
# Copy the application resources to the associated place alongside the application
#

LinuxBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
}

MacBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
}

# Windows version of QMAKE_COPY_DIR of course doesn't work the same as Mac/Linux. It will only
# copy the contents of the source directory. It doesn't create the top level source directory
# in the target.
WindowsBuild {
    # Make sure to keep both side of this if using the same set of directories
    DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
    BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\resources\\flightgear\" \"$$DESTDIR_COPY_RESOURCE_LIST\\flightgear\"
} else {
    !MobileBuild {
        # Make sure to keep both sides of this if using the same set of directories
        QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/resources/flightgear $$DESTDIR_COPY_RESOURCE_LIST
    }
}

#
# Perform platform specific setup
#

iOSBuild | MacBuild {
    # Update version info in bundle
    QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $${MAC_VERSION}\" $$DESTDIR/$${TARGET}.app/Contents/Info.plist
    QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $${MAC_BUILD}\" $$DESTDIR/$${TARGET}.app/Contents/Info.plist
}

MacBuild {
    # Copy non-standard frameworks into app package
    QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/
    # SDL2 Framework
    QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}

WindowsBuild {
    BASEDIR_WIN = $$replace(BASEDIR, "/", "\\")
    DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
    QT_BIN_DIR  = $$dirname(QMAKE_QMAKE)

    # Copy dependencies
    DebugBuild: DLL_QT_DEBUGCHAR = "d"
    ReleaseBuild: DLL_QT_DEBUGCHAR = ""
    COPY_FILE_LIST = \
        $$BASEDIR\\libs\\lib\\sdl2\\msvc\\lib\\x86\\SDL2.dll \
        $$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
        $$BASEDIR\\deploy\\libeay32.dll

    for(COPY_FILE, COPY_FILE_LIST) {
        QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\"
    }

        ReleaseBuild {
        # Copy Visual Studio DLLs
        # Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
        win32-msvc2010 {
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp100.dll\"  \"$$DESTDIR_WIN\"
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr100.dll\"  \"$$DESTDIR_WIN\"
        }
        else:win32-msvc2012 {
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp110.dll\"  \"$$DESTDIR_WIN\"
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr110.dll\"  \"$$DESTDIR_WIN\"
        }
        else:win32-msvc2013 {
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp120.dll\"  \"$$DESTDIR_WIN\"
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr120.dll\"  \"$$DESTDIR_WIN\"
        }
        else {
            error("Visual studio version not supported, installation cannot be completed.")
        }
    }

    DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR_WIN\\$${TARGET}.exe))
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QT_BIN_DIR\\windeployqt --no-compiler-runtime --qmldir=$${BASEDIR_WIN}\\src $${DEPLOY_TARGET}

}

LinuxBuild {
    installer {
        QMAKE_POST_LINK += && mkdir -p $$DESTDIR/Qt/libs && mkdir -p $$DESTDIR/Qt/plugins

        # QT_INSTALL_LIBS
        QT_LIB_LIST = \
            libQt5Core.so.5 \
            libQt5DBus.so.5 \
            libQt5Gui.so.5 \
            libQt5Location.so.5 \
            libQt5Network.so.5 \
            libQt5OpenGL.so.5 \
            libQt5Positioning.so.5 \
            libQt5PrintSupport.so.5 \
            libQt5Qml.so.5 \
            libQt5Quick.so.5 \
            libQt5QuickWidgets.so.5 \
            libQt5SerialPort.so.5 \
            libQt5Sql.so.5 \
            libQt5Svg.so.5 \
            libQt5Test.so.5 \
            libQt5Widgets.so.5 \
            libQt5XcbQpa.so.5

        !contains (DEFINES, QGC_DISABLE_UVC) {
            QT_LIB_LIST += \
                libQt5Multimedia.so.5 \
                libQt5MultimediaQuick_p.so.5
        }

        !contains(DEFINES, __rasp_pi2__) {
            QT_LIB_LIST += \
                libicudata.so.54 \
                libicui18n.so.54 \
                libicuuc.so.54
        }

        for(QT_LIB, QT_LIB_LIST) {
            QMAKE_POST_LINK += && $$QMAKE_COPY --dereference $$[QT_INSTALL_LIBS]/$$QT_LIB $$DESTDIR/Qt/libs/
        }

        # QT_INSTALL_PLUGINS
        QT_PLUGIN_LIST = \
            bearer \
            geoservices \
            iconengines \
            imageformats \
            platforminputcontexts \
            platforms \
            platformthemes \
            position \
            sqldrivers

        !contains(DEFINES, __rasp_pi2__) {
            QT_PLUGIN_LIST += xcbglintegrations
        }

        for(QT_PLUGIN, QT_PLUGIN_LIST) {
            QMAKE_POST_LINK += && $$QMAKE_COPY --dereference --recursive $$[QT_INSTALL_PLUGINS]/$$QT_PLUGIN $$DESTDIR/Qt/plugins/
        }

        # QT_INSTALL_QML
        QMAKE_POST_LINK += && $$QMAKE_COPY --dereference --recursive $$[QT_INSTALL_QML] $$DESTDIR/Qt/

        # QGroundControl start script
        QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol-start.sh $$DESTDIR
        QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol.desktop $$DESTDIR
        QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/resources/icons/qgroundcontrol.png $$DESTDIR
    }
}


Attempt to fix build for gcc-4

Attempt to fix build for gcc-4

# Copyright 2007-2015 QReal Research Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

win32 {
	PLATFORM = windows
}

unix:!macx {
	PLATFORM = linux
}

macx {
	PLATFORM = mac
}

CONFIG(debug, debug | release) {
	CONFIGURATION = debug
	CONFIGURATION_SUFFIX = -d
	unix {
		QMAKE_CXXFLAGS += -coverage
		QMAKE_LFLAGS += -coverage
	}
} else {
	CONFIGURATION = release
	CONFIGURATION_SUFFIX =
}

DESTDIR = $$PWD/bin/$$CONFIGURATION

PROJECT_BASENAME = $$basename(_PRO_FILE_)
PROJECT_NAME = $$section(PROJECT_BASENAME, ".", 0, 0)

isEmpty(TARGET) {
	TARGET = $$PROJECT_NAME$$CONFIGURATION_SUFFIX
} else {
	TARGET = $$TARGET$$CONFIGURATION_SUFFIX
}

equals(TEMPLATE, app) {
	unix:!macx {
		QMAKE_LFLAGS += -Wl,-rpath-link,$$DESTDIR
		!CONFIG(no_rpath) QMAKE_LFLAGS += -Wl,-O1,-rpath,.
	}
}

macx-clang {
	QMAKE_CXXFLAGS += -stdlib=libc++
	QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../../../
}

unix {

	# seems like we want USan always, but are afraid of ....
	!CONFIG(sanitize_address):!CONFIG(sanitize_thread):!CONFIG(sanitize_memory):!CONFIG(sanitize_kernel_address) {
		# Ubsan is turned on by default into debug build
		CONFIG += sanitizer sanitize_undefined
		macx-clang {
			# sometimes runtime is missing in clang. this hack allows to avoid runtime dependency.
			QMAKE_SANITIZE_UNDEFINED_CFLAGS += -fsanitize-trap=undefined
			QMAKE_SANITIZE_UNDEFINED_CXXFLAGS += -fsanitize-trap=undefined
			QMAKE_SANITIZE_UNDEFINED_LFLAGS += -fsanitize-trap=undefined
		}
	}

	!CONFIG(sanitize_address):!macx-clang { CONFIG += sanitize_leak }

	CONFIG(sanitize_leak) {
		#LSan can be used without performance degrade even in release build
		QMAKE_CFLAGS += -fsanitize=leak
		QMAKE_CXXFLAGS += -fsanitize=leak
		QMAKE_LFLAGS += -fsanitize=leak
	}

	*-g++*:system($$QMAKE_CXX --version | grep -e "\\<[45]\\.[0-9]" ){
		CONFIG(sanitize_undefined){
		# Ubsan has (had at least) known issues with false errors about calls of methods of the base class.
		# That must be disabled. Variables for confguring ubsan are taken from here:
		# https://codereview.qt-project.org/#/c/43420/17/mkspecs/common/sanitize.conf
		# They can change in some version of Qt, keep track of it.
		# By the way, simply setting QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS instead of those used below
		# will not work due to arguments order ("-fsanitize=undefined" must be declared before "-fno-sanitize=vptr").
			QMAKE_SANITIZE_UNDEFINED_CFLAGS += -fno-sanitize=vptr
			QMAKE_SANITIZE_UNDEFINED_CXXFLAGS += -fno-sanitize=vptr
			QMAKE_SANITIZE_UNDEFINED_LFLAGS += -fno-sanitize=vptr
		}
	}

	CONFIG(release, debug | release){
		!clang:gcc:*-g++*:system($$QMAKE_CXX --version | grep -e "\\<4\\.[0-9]" ){
			message("Too old compiler $$QMAKE_CXX")
		} else {
			QMAKE_CFLAGS += -fsanitize-recover=all
			QMAKE_CXXFLAGS += -fsanitize-recover=all
		}
	}

}

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

INCLUDEPATH += $$_PRO_FILE_PWD_ \
	$$_PRO_FILE_PWD_/include \
	$$PWD \

LIBS += -L$$DESTDIR

CONFIG += c++11
QMAKE_CXXFLAGS += -Wextra -Wcast-qual -Wwrite-strings -Wredundant-decls -Wunreachable-code -Wnon-virtual-dtor

GLOBAL_PWD = $$PWD

# Useful function to copy additional files to destination,
# from http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output
defineTest(copyToDestdir) {
	FILES = $$1
	NOW = $$2

	for(FILE, FILES) {
		DESTDIR_SUFFIX =
		isEmpty(QMAKE_SH) {
		# This ugly code is needed because xcopy requires to add source directory name to target directory name when copying directories
			win32 {
				AFTER_SLASH = $$section(FILE, "/", -1, -1)
				BASE_NAME = $$section(FILE, "/", -2, -2)
				equals(AFTER_SLASH, ""):DESTDIR_SUFFIX = /$$BASE_NAME

				FILE ~= s,/$,,g

				FILE ~= s,/,\\,g
			}
			DDIR = $$DESTDIR$$DESTDIR_SUFFIX/$$3
			win32:DDIR ~= s,/,\\,g
		} else {
			DDIR = $$DESTDIR$$DESTDIR_SUFFIX/$$3
		}

		isEmpty(NOW) {
			# In case this is directory add "*" to copy contents of a directory instead of directory itself under linux.
			!win32:equals(AFTER_SLASH, ""):FILE = $$FILE*
			QMAKE_POST_LINK += $(COPY_DIR) $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
		} else {
			win32 {
				system("cmd /C "xcopy $$quote($$FILE) $$quote($$DDIR) /s /e /q /y /i"")
			}

			unix:!macx {
				system("cp -r -f $$FILE $$DDIR")
			}

			macx {
				system("cp -R $$FILE $$DDIR/$$FILE")
			}
		}
	}

	export(QMAKE_POST_LINK)
}

defineTest(includes) {
	PROJECTS = $$1

	for(PROJECT, PROJECTS) {
		INCLUDEPATH += $$GLOBAL_PWD/$$PROJECT $$GLOBAL_PWD/$$PROJECT/include
	}

	export(INCLUDEPATH)
}

defineTest(links) {
	PROJECTS = $$1

	for(PROJECT, PROJECTS) {
		LIBS += -l$$PROJECT$$CONFIGURATION_SUFFIX
	}

	export(LIBS)
}

# Copyright 2007-2015 QReal Research Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

win32 {
	PLATFORM = windows
}

unix:!macx {
	PLATFORM = linux
}

macx {
	PLATFORM = mac
}

CONFIG(debug, debug | release) {
	CONFIGURATION = debug
	CONFIGURATION_SUFFIX = -d
	unix {
		QMAKE_CXXFLAGS += -coverage
		QMAKE_LFLAGS += -coverage
	}
} else {
	CONFIGURATION = release
	CONFIGURATION_SUFFIX =
}

DESTDIR = $$PWD/bin/$$CONFIGURATION

PROJECT_BASENAME = $$basename(_PRO_FILE_)
PROJECT_NAME = $$section(PROJECT_BASENAME, ".", 0, 0)

isEmpty(TARGET) {
	TARGET = $$PROJECT_NAME$$CONFIGURATION_SUFFIX
} else {
	TARGET = $$TARGET$$CONFIGURATION_SUFFIX
}

equals(TEMPLATE, app) {
	unix:!macx {
		QMAKE_LFLAGS += -Wl,-rpath-link,$$DESTDIR
		!CONFIG(no_rpath) QMAKE_LFLAGS += -Wl,-O1,-rpath,.
	}
}

macx-clang {
	QMAKE_CXXFLAGS += -stdlib=libc++
	QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../../../
}

unix {

	# seems like we want USan always, but are afraid of ....
	!CONFIG(sanitize_address):!CONFIG(sanitize_thread):!CONFIG(sanitize_memory):!CONFIG(sanitize_kernel_address) {
		# Ubsan is turned on by default into debug build
		CONFIG += sanitizer sanitize_undefined
		macx-clang {
			# sometimes runtime is missing in clang. this hack allows to avoid runtime dependency.
			QMAKE_SANITIZE_UNDEFINED_CFLAGS += -fsanitize-trap=undefined
			QMAKE_SANITIZE_UNDEFINED_CXXFLAGS += -fsanitize-trap=undefined
			QMAKE_SANITIZE_UNDEFINED_LFLAGS += -fsanitize-trap=undefined
		}
	}

	!CONFIG(sanitize_address):!macx-clang { CONFIG += sanitize_leak }

	CONFIG(sanitize_leak) {
		#LSan can be used without performance degrade even in release build
		QMAKE_CFLAGS += -fsanitize=leak
		QMAKE_CXXFLAGS += -fsanitize=leak
		QMAKE_LFLAGS += -fsanitize=leak
	}

	linux-g++:system( g++ --version | grep -e "\<5.[0-9]" ){
		CONFIG(sanitize_undefined){
		# Ubsan has (had at least) known issues with false errors about calls of methods of the base class.
		# That must be disabled. Variables for confguring ubsan are taken from here:
		# https://codereview.qt-project.org/#/c/43420/17/mkspecs/common/sanitize.conf
		# They can change in some version of Qt, keep track of it.
		# By the way, simply setting QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS instead of those used below
		# will not work due to arguments order ("-fsanitize=undefined" must be declared before "-fno-sanitize=vptr").
			QMAKE_SANITIZE_UNDEFINED_CFLAGS += -fno-sanitize=vptr
			QMAKE_SANITIZE_UNDEFINED_CXXFLAGS += -fno-sanitize=vptr
			QMAKE_SANITIZE_UNDEFINED_LFLAGS += -fno-sanitize=vptr
		}

	} else {
		CONFIG(release, debug | release) {
			QMAKE_CFLAGS += -fsanitize-recover=all
			QMAKE_CXXFLAGS += -fsanitize-recover=all
		}
	}

}

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

INCLUDEPATH += $$_PRO_FILE_PWD_ \
	$$_PRO_FILE_PWD_/include \
	$$PWD \

LIBS += -L$$DESTDIR

CONFIG += c++11
QMAKE_CXXFLAGS += -Wextra -Wcast-qual -Wwrite-strings -Wredundant-decls -Wunreachable-code -Wnon-virtual-dtor

GLOBAL_PWD = $$PWD

# Useful function to copy additional files to destination,
# from http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output
defineTest(copyToDestdir) {
	FILES = $$1
	NOW = $$2

	for(FILE, FILES) {
		DESTDIR_SUFFIX =
		isEmpty(QMAKE_SH) {
		# This ugly code is needed because xcopy requires to add source directory name to target directory name when copying directories
			win32 {
				AFTER_SLASH = $$section(FILE, "/", -1, -1)
				BASE_NAME = $$section(FILE, "/", -2, -2)
				equals(AFTER_SLASH, ""):DESTDIR_SUFFIX = /$$BASE_NAME

				FILE ~= s,/$,,g

				FILE ~= s,/,\\,g
			}
			DDIR = $$DESTDIR$$DESTDIR_SUFFIX/$$3
			win32:DDIR ~= s,/,\\,g
		} else {
			DDIR = $$DESTDIR$$DESTDIR_SUFFIX/$$3
		}

		isEmpty(NOW) {
			# In case this is directory add "*" to copy contents of a directory instead of directory itself under linux.
			!win32:equals(AFTER_SLASH, ""):FILE = $$FILE*
			QMAKE_POST_LINK += $(COPY_DIR) $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
		} else {
			win32 {
				system("cmd /C "xcopy $$quote($$FILE) $$quote($$DDIR) /s /e /q /y /i"")
			}

			unix:!macx {
				system("cp -r -f $$FILE $$DDIR")
			}

			macx {
				system("cp -R $$FILE $$DDIR/$$FILE")
			}
		}
	}

	export(QMAKE_POST_LINK)
}

defineTest(includes) {
	PROJECTS = $$1

	for(PROJECT, PROJECTS) {
		INCLUDEPATH += $$GLOBAL_PWD/$$PROJECT $$GLOBAL_PWD/$$PROJECT/include
	}

	export(INCLUDEPATH)
}

defineTest(links) {
	PROJECTS = $$1

	for(PROJECT, PROJECTS) {
		LIBS += -l$$PROJECT$$CONFIGURATION_SUFFIX
	}

	export(LIBS)
}


Fix version.pri

Fix version.pri

# Define version numbers here
VER_MAJ= 0
VER_MIN = 1
VER_PAT= 0

# NEXT PART TAKEN FROM

# If there is no version tag in git this one will be used
#VERSION = 0.1.0

# Need to discard STDERR so get path to NULL device
win32 {
    NULL_DEVICE = NUL # Windows doesn't have /dev/null but has NUL
} else {
    NULL_DEVICE = /dev/null
}

# Need to call git with manually specified paths to repository
BASE_GIT_COMMAND = git --git-dir $$PWD/../.git --work-tree $$PWD/../

# Trying to get version from git tag / revision
GIT_VERSION = $$system($$BASE_GIT_COMMAND describe --always --tags 2> $$NULL_DEVICE)

# Check if we only have hash without version number
#!contains(GIT_VERSION,\d+\.\d+\.\d+) {
#    # If there is nothing we simply use version defined manually
#    isEmpty(GIT_VERSION) {
#        GIT_VERSION = $$VERSION
#    } else { # otherwise construct proper git describe string
#        GIT_COMMIT_COUNT = $$system($$BASE_GIT_COMMAND rev-list HEAD --count 2> $$NULL_DEVICE)
#        isEmpty(GIT_COMMIT_COUNT) {
#            GIT_COMMIT_COUNT = 0
#        }
#        GIT_VERSION = $$VERSION-$$GIT_COMMIT_COUNT-g$$GIT_VERSION
#    }
#}

# Turns describe output like 0.1.5-42-g652c397 into "0.1.5.42.652c397"
#GIT_VERSION ~= s/-/"."
#GIT_VERSION ~= s/g/""

# Now we are ready to pass parsed version to Qt
#VERSION = $$GIT_VERSION
win32 { # On windows version can only be numerical so remove commit hash
    VERSION ~= s/\.\d+\.[a-f0-9]{6,}//
}

# Adding C preprocessor #DEFINE so we can use it in C++ code
# also here we want full version on every system so using GIT_VERSION
DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\"

# By default Qt only uses major and minor version for Info.plist on Mac.
# This will rewrite Info.plist with full version
macx {
    INFO_PLIST_PATH = $$shell_quote($${OUT_PWD}/$${TARGET}.app/Contents/Info.plist)
    QMAKE_POST_LINK += /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $${VERSION}\" $${INFO_PLIST_PATH}
}

VERSIONS = $$GIT_VERSION
VERSIONS ~= s/-/"."
VERSIONS ~= s/g/""
VERSIONS = $$split(VERSIONS, ".")
VER_MAJ = $$member(VERSIONS, 0)
VER_MIN = $$member(VERSIONS, 1)
VER_PAT = $$member(VERSIONS, 2)

#VERSION = $$GIT_VERSION
#VERSION ~= s/-/"."
#VERSION ~= s/g/""
#VERSIONS = $$split(VERSION, ".")
#VER_MAJ = $$member(VERSIONS, 0)
#VER_MIN = $$member(VERSIONS, 1)
#VER_PAT = $$member(VERSIONS, 2)

message($$GIT_VERSION)
message($$VER_MAJ)
message($$VER_MIN)
message($$VER_PAT)

PROJECT_VERSION = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}

DEFINES += LIBQDARK_VERSION_MAJOR=$${VER_MAJ}
DEFINES += LIBQDARK_VERSION_MINOR=$${VER_MIN}
DEFINES += LIBQDARK_VERSION_PATCH=$${VER_PAT}

DEFINES += LIBQDARK_VERSION=\\\"v$${PROJECT_VERSION}\\\"

# Define version numbers here
VER_MAJ= 0
VER_MIN = 1
VER_PAT= 0

# NEXT PART TAKEN FROM https://gist.github.com/grassator/11405930

# If there is no version tag in git this one will be used
#VERSION = 0.1.0

## Need to discard STDERR so get path to NULL device
#win32 {
#    NULL_DEVICE = NUL # Windows doesn't have /dev/null but has NUL
#} else {
#    NULL_DEVICE = /dev/null
#}

# Need to call git with manually specified paths to repository
BASE_GIT_COMMAND = git --git-dir $$PWD/../.git --work-tree $$PWD/../

# Trying to get version from git tag / revision
GIT_VERSION = $$system($$BASE_GIT_COMMAND describe --always --tags 2> $$NULL_DEVICE)

# Check if we only have hash without version number
#!contains(GIT_VERSION,\d+\.\d+\.\d+) {
#    # If there is nothing we simply use version defined manually
#    isEmpty(GIT_VERSION) {
#        GIT_VERSION = $$VERSION
#    } else { # otherwise construct proper git describe string
#        GIT_COMMIT_COUNT = $$system($$BASE_GIT_COMMAND rev-list HEAD --count 2> $$NULL_DEVICE)
#        isEmpty(GIT_COMMIT_COUNT) {
#            GIT_COMMIT_COUNT = 0
#        }
#        GIT_VERSION = $$VERSION-$$GIT_COMMIT_COUNT-g$$GIT_VERSION
#    }
#}

# Turns describe output like 0.1.5-42-g652c397 into "0.1.5.42.652c397"
#GIT_VERSION ~= s/-/"."
#GIT_VERSION ~= s/g/""

## Now we are ready to pass parsed version to Qt
#VERSION = $$GIT_VERSION
#win32 { # On windows version can only be numerical so remove commit hash
#    VERSION ~= s/\.\d+\.[a-f0-9]{6,}//
#}

# Adding C preprocessor #DEFINE so we can use it in C++ code
# also here we want full version on every system so using GIT_VERSION
DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\"

## By default Qt only uses major and minor version for Info.plist on Mac.
## This will rewrite Info.plist with full version
#macx {
#    INFO_PLIST_PATH = $$shell_quote($${OUT_PWD}/$${TARGET}.app/Contents/Info.plist)
#    QMAKE_POST_LINK += /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $${VERSION}\" $${INFO_PLIST_PATH}
#}

VERSIONS = $$GIT_VERSION
VERSIONS ~= s/-/"."
VERSIONS ~= s/g/""
VERSIONS = $$split(VERSIONS, ".")
VER_MAJ = $$member(VERSIONS, 0)
VER_MIN = $$member(VERSIONS, 1)
VER_PAT = $$member(VERSIONS, 2)

PROJECT_VERSION = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}

DEFINES += LIBQDARK_VERSION_MAJOR=$${VER_MAJ}
DEFINES += LIBQDARK_VERSION_MINOR=$${VER_MIN}
DEFINES += LIBQDARK_VERSION_PATCH=$${VER_PAT}

DEFINES += LIBQDARK_VERSION=\\\"v$${PROJECT_VERSION}\\\"


Add ability to customize openssl directory

win32 {
    isEmpty(OPENSSL_DIRECTORY) {
        message(Using default openssl directory C:\\local\\openssl)
        OPENSSL_DIRECTORY = C:\local\openssl
    }

    INCLUDEPATH += $$OPENSSL_DIRECTORY\\include

    LIBS += -L$$OPENSSL_DIRECTORY\lib

    LIBS += -llibssl
    LIBS += -llibcrypto
} else {
    PKGCONFIG += openssl

    LIBS += -lssl -lcrypto
}

win32 {
    INCLUDEPATH += C:/local/openssl/include

    LIBS += -LC:\local\openssl\lib

    LIBS += -llibssl
    LIBS += -llibcrypto
} else {
    PKGCONFIG += openssl

    LIBS += -lssl -lcrypto
}


Version 0.141

Version 0.141


Version 2.13

Version 2.13


Add translation to INSTALL_ROOT/locales if there are any.

win32 {
} else: osx {
} else: ios {
} else: android {
} else: linux {
    # Set the rpath, otherwise we can't load the client applications without changing LD_LIBRARY_PATH
    QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,\$\$ORIGIN\'

    target.path = /opt/glimpse
    INSTALLS += target
} else {
    error(No distribution for this platform defined)
}

# Setup universal translations
trs.path = $${target.path}/locales

for(locale, TRANSLATIONS) {
    qmfile = $$locale
    qmfile ~= s/\.ts/.qm/i

    trs.files += qmfile

    # Add only once but don't add if we don't run in the loop
    # otherwise make will throw errors
    INSTALLS *= trs
}


Update version to 0.16

Update version to 0.16

#Used for common JASP qmake build settings

#Jasp-R-Interface
JASP_R_INTERFACE_TARGET = R-Interface

JASP_R_INTERFACE_MAJOR_VERSION =  11  # Interface changes or whenever you feel majorlike
JASP_R_INTERFACE_MINOR_VERSION =  6   # Code changes

JASP_R_INTERFACE_NAME = $$JASP_R_INTERFACE_TARGET$$JASP_R_INTERFACE_MAJOR_VERSION'.'$$JASP_R_INTERFACE_MINOR_VERSION

GITHUB_PAT_DEF=$$(GITHUB_PAT_DEF)						#First check if we set this special env var (on buildbot)
isEmpty(GITHUB_PAT_DEF): GITHUB_PAT_DEF=$$(GITHUB_PAT)	#Otherwise use the one we are using
exists(/app/lib/*){
	# Note: this crashes is the env variables aren't base64 encoded
	GITHUB_PAT_DEF	= $$system(echo $${GITHUB_PAT_DEF}	| base64 -d)
	GITHUB_PAT		= $$system(echo $${GITHUB_PAT}		| base64 -d)
}

isEmpty(GITHUB_PAT_DEF){
	error("No GITHUB_PAT or GITHUB_PAT_DEF found!  Follow the steps at https://github.com/jasp-stats/jasp-desktop/blob/development/Docs/development/jasp-building-guide.md$${LITERAL_HASH}github_pat")
	GITHUB_PAT_DEF="NO_GITHUB_PAT_FOUND"	#To indicate a clearer error
}
#R settings
CURRENT_R_VERSION = "4.1"
DEFINES += "CURRENT_R_VERSION=\\\"$$CURRENT_R_VERSION\\\""
DEFINES += "GITHUB_PAT_DEFINE=\\\"$$GITHUB_PAT_DEF\\\""
DEFINES += BUILDING_JASP

#JASP Version
JASP_VERSION_MAJOR      = 0
JASP_VERSION_MINOR      = 16
JASP_VERSION_REVISION   = 0
JASP_VERSION_BUILD      = 0 #Should be ignored because the code handling it is buggy as hell (aka https://www.youtube.com/watch?v=otCpCn0l4Wo )

DEFINES +=    "JASP_VERSION_MAJOR=$$JASP_VERSION_MAJOR"
DEFINES +=    "JASP_VERSION_MINOR=$$JASP_VERSION_MINOR"
DEFINES +=    "JASP_VERSION_BUILD=$$JASP_VERSION_BUILD"
DEFINES += "JASP_VERSION_REVISION=$$JASP_VERSION_REVISION"

GIT_EXEC=git #Unix knows where to find things
windows { #Windows is not so sure
	_GIT_LOCATION = $$(GIT_LOCATION)
	isEmpty(_GIT_LOCATION): _GIT_LOCATION="C:\Program Files\Git" #default assumption, if you want to change it then set the GIT_LOCATION environment variable (For instance under Projects->Run)

	GIT_EXEC = $${_GIT_LOCATION}\bin\git.exe

        DEFINES += WIN32_LEAN_AND_MEAN
}

GIT_BRANCH=$$system(\"$$GIT_EXEC\" rev-parse --abbrev-ref HEAD)
GIT_COMMIT=$$system(\"$$GIT_EXEC\" rev-parse --verify HEAD)

DEFINES += GIT_CURRENT_BRANCH=\"$$GIT_BRANCH\"
DEFINES += GIT_CURRENT_COMMIT=\"$$GIT_COMMIT\"

JASP_REQUIRED_FILES = $$PWD/../jasp-required-files

#message(using JASP_REQUIRED_FILES of $$JASP_REQUIRED_FILES)

INCLUDEPATH += $$JASP_REQUIRED_FILES/boost_1_71_0/

BUILDING_JASP_ENGINE=false
DEFINES += PRINT_ENGINE_MESSAGES

#macx | windows | exists(/app/lib/*) {
#	message(using libjson static)
  DEFINES += JASP_LIBJSON_STATIC # lets just always use libjson-static, they keep moving the include files...
#} else {
#    linux {
#        message(using libjson from distro and pkgconfig)
#        QT_CONFIG -= no-pkg-config
#        CONFIG += link_pkgconfig
#        PKGCONFIG += jsoncpp
#        LIBS += -ljsoncpp
#
#        CONFIG(debug, debug|release) {  DEFINES+=JASP_DEBUG }
#    }
#}

exists(/app/lib/*) {
  linux:  DEFINES += FLATPAK_USED
} else {
  linux:	CONFIG(debug, debug|release)  {
    DEFINES += JASP_DEBUG
    DEFINES += LINUX_NOT_FLATPAK
  }
}
macx | windows { CONFIG(debug, debug|release) {  DEFINES += JASP_DEBUG } }

windows {
	#message(QT_ARCH $$QT_ARCH)
	contains(QT_ARCH, i386) {
		ARCH = i386
		BOOST_ARCH = x32
	} else {
		ARCH = x64
		BOOST_ARCH = x64
	}

        CONFIG(ReleaseBuild)    { BOOST_POSTFIX = -vc142-mt-$${BOOST_ARCH}-1_71 }
        CONFIG(DebugBuild)      { BOOST_POSTFIX = -vc142-mt-gd-$${BOOST_ARCH}-1_71 }

	QMAKE_CXXFLAGS	+= -DBOOST_USE_WINDOWS_H -DNOMINMAX -DBOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
}

unix: QMAKE_CXXFLAGS += -Werror=return-type

#want to use JASPTIMER_* ? set JASPTIMER_USED to true, run qmake and rebuild the objects that use these macros (or just rebuild everything to be sure)
JASPTIMER_USED = false

$$JASPTIMER_USED {
    DEFINES += PROFILE_JASP
}

exists(/app/lib/*)	{
  INSTALLPATH = /app/bin
 } else	{
  INSTALLPATH = /usr/bin
}

DEFINES += QT_NO_FOREACH #Come on Qt we can just use the nice new ranged for from c++11 and higher, we dont need your help!

macx {
  QMAKE_CXXFLAGS_WARN_ON  += -Wno-unused-parameter -Wno-unused-local-typedef
  QMAKE_CXXFLAGS          += -Wno-c++11-extensions -Wno-c++11-long-long -Wno-c++11-extra-semi -stdlib=libc++ -Wno-deprecated-declarations

  CONFIG(debug): QMAKE_CXXFLAGS +=  -fstandalone-debug
}

linux: QMAKE_LFLAGS += -fuse-ld=gold

#Used for common JASP qmake build settings

#Jasp-R-Interface
JASP_R_INTERFACE_TARGET = R-Interface

JASP_R_INTERFACE_MAJOR_VERSION =  11  # Interface changes or whenever you feel majorlike
JASP_R_INTERFACE_MINOR_VERSION =  6   # Code changes

JASP_R_INTERFACE_NAME = $$JASP_R_INTERFACE_TARGET$$JASP_R_INTERFACE_MAJOR_VERSION'.'$$JASP_R_INTERFACE_MINOR_VERSION

GITHUB_PAT_DEF=$$(GITHUB_PAT_DEF)						#First check if we set this special env var (on buildbot)
isEmpty(GITHUB_PAT_DEF): GITHUB_PAT_DEF=$$(GITHUB_PAT)	#Otherwise use the one we are using
exists(/app/lib/*){
	# Note: this crashes is the env variables aren't base64 encoded
	GITHUB_PAT_DEF	= $$system(echo $${GITHUB_PAT_DEF}	| base64 -d)
	GITHUB_PAT		= $$system(echo $${GITHUB_PAT}		| base64 -d)
}

isEmpty(GITHUB_PAT_DEF){
	error("No GITHUB_PAT or GITHUB_PAT_DEF found!  Follow the steps at https://github.com/jasp-stats/jasp-desktop/blob/development/Docs/development/jasp-building-guide.md$${LITERAL_HASH}github_pat")
	GITHUB_PAT_DEF="NO_GITHUB_PAT_FOUND"	#To indicate a clearer error
}
#R settings
CURRENT_R_VERSION = "4.1"
DEFINES += "CURRENT_R_VERSION=\\\"$$CURRENT_R_VERSION\\\""
DEFINES += "GITHUB_PAT_DEFINE=\\\"$$GITHUB_PAT_DEF\\\""
DEFINES += BUILDING_JASP

#JASP Version
JASP_VERSION_MAJOR      = 0
JASP_VERSION_MINOR      = 15
JASP_VERSION_REVISION   = 0
JASP_VERSION_BUILD      = 0 #Should be ignored because the code handling it is buggy as hell (aka https://www.youtube.com/watch?v=otCpCn0l4Wo )

DEFINES +=    "JASP_VERSION_MAJOR=$$JASP_VERSION_MAJOR"
DEFINES +=    "JASP_VERSION_MINOR=$$JASP_VERSION_MINOR"
DEFINES +=    "JASP_VERSION_BUILD=$$JASP_VERSION_BUILD"
DEFINES += "JASP_VERSION_REVISION=$$JASP_VERSION_REVISION"

GIT_EXEC=git #Unix knows where to find things
windows { #Windows is not so sure
	_GIT_LOCATION = $$(GIT_LOCATION)
	isEmpty(_GIT_LOCATION): _GIT_LOCATION="C:\Program Files\Git" #default assumption, if you want to change it then set the GIT_LOCATION environment variable (For instance under Projects->Run)

	GIT_EXEC = $${_GIT_LOCATION}\bin\git.exe

        DEFINES += WIN32_LEAN_AND_MEAN
}

GIT_BRANCH=$$system(\"$$GIT_EXEC\" rev-parse --abbrev-ref HEAD)
GIT_COMMIT=$$system(\"$$GIT_EXEC\" rev-parse --verify HEAD)

DEFINES += GIT_CURRENT_BRANCH=\"$$GIT_BRANCH\"
DEFINES += GIT_CURRENT_COMMIT=\"$$GIT_COMMIT\"

JASP_REQUIRED_FILES = $$PWD/../jasp-required-files

#message(using JASP_REQUIRED_FILES of $$JASP_REQUIRED_FILES)

INCLUDEPATH += $$JASP_REQUIRED_FILES/boost_1_71_0/

BUILDING_JASP_ENGINE=false
DEFINES += PRINT_ENGINE_MESSAGES

#macx | windows | exists(/app/lib/*) {
#	message(using libjson static)
  DEFINES += JASP_LIBJSON_STATIC # lets just always use libjson-static, they keep moving the include files...
#} else {
#    linux {
#        message(using libjson from distro and pkgconfig)
#        QT_CONFIG -= no-pkg-config
#        CONFIG += link_pkgconfig
#        PKGCONFIG += jsoncpp
#        LIBS += -ljsoncpp
#
#        CONFIG(debug, debug|release) {  DEFINES+=JASP_DEBUG }
#    }
#}

exists(/app/lib/*) {
  linux:  DEFINES += FLATPAK_USED
} else {
  linux:	CONFIG(debug, debug|release)  {
    DEFINES += JASP_DEBUG
    DEFINES += LINUX_NOT_FLATPAK
  }
}
macx | windows { CONFIG(debug, debug|release) {  DEFINES += JASP_DEBUG } }

windows {
	#message(QT_ARCH $$QT_ARCH)
	contains(QT_ARCH, i386) {
		ARCH = i386
		BOOST_ARCH = x32
	} else {
		ARCH = x64
		BOOST_ARCH = x64
	}

        CONFIG(ReleaseBuild)    { BOOST_POSTFIX = -vc142-mt-$${BOOST_ARCH}-1_71 }
        CONFIG(DebugBuild)      { BOOST_POSTFIX = -vc142-mt-gd-$${BOOST_ARCH}-1_71 }

	QMAKE_CXXFLAGS	+= -DBOOST_USE_WINDOWS_H -DNOMINMAX -DBOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
}

unix: QMAKE_CXXFLAGS += -Werror=return-type

#want to use JASPTIMER_* ? set JASPTIMER_USED to true, run qmake and rebuild the objects that use these macros (or just rebuild everything to be sure)
JASPTIMER_USED = false

$$JASPTIMER_USED {
    DEFINES += PROFILE_JASP
}

exists(/app/lib/*)	{
  INSTALLPATH = /app/bin
 } else	{
  INSTALLPATH = /usr/bin
}

DEFINES += QT_NO_FOREACH #Come on Qt we can just use the nice new ranged for from c++11 and higher, we dont need your help!

macx {
  QMAKE_CXXFLAGS_WARN_ON  += -Wno-unused-parameter -Wno-unused-local-typedef
  QMAKE_CXXFLAGS          += -Wno-c++11-extensions -Wno-c++11-long-long -Wno-c++11-extra-semi -stdlib=libc++ -Wno-deprecated-declarations

  CONFIG(debug): QMAKE_CXXFLAGS +=  -fstandalone-debug
}

linux: QMAKE_LFLAGS += -fuse-ld=gold


fix clang check when clang++ is called c++ (#1924)

* fix clang check when clang++ is called c++

* fix syntax

# Define warning flags for Chatterino
win32-msvc* {
    QMAKE_CXXFLAGS_WARN_ON = /W4
    # 4714 - function marked as __forceinline not inlined
    # 4996 - occurs when the compiler encounters a function or variable that is marked as deprecated.
    #        These functions may have a different preferred name, may be insecure or have
    #        a more secure variant, or may be obsolete.
    # 4505 - unreferenced local version has been removed
    # 4127 - conditional expression is constant
    # 4503 - decorated name length exceeded, name was truncated
    # 4100 - unreferences formal parameter
    # 4305 - possible truncation of data
    # 4267 - possible loss of data in return
    QMAKE_CXXFLAGS_WARN_ON += /wd4714
    QMAKE_CXXFLAGS_WARN_ON += /wd4996
    QMAKE_CXXFLAGS_WARN_ON += /wd4505
    QMAKE_CXXFLAGS_WARN_ON += /wd4127
    QMAKE_CXXFLAGS_WARN_ON += /wd4503
    QMAKE_CXXFLAGS_WARN_ON += /wd4100
    QMAKE_CXXFLAGS_WARN_ON += /wd4305
    QMAKE_CXXFLAGS_WARN_ON += /wd4267

} else {
    QMAKE_CXXFLAGS_WARN_ON = -Wall
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function
    QMAKE_CXXFLAGS_WARN_ON += -Wno-switch
    QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations
    QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable

    # Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future
    QMAKE_CXXFLAGS_WARN_ON += -Wno-strict-aliasing

    QMAKE_CXXFLAGS_WARN_ON += -Werror=return-type

    CXX_VERSION = $$system($$QMAKE_CXX --version)
    contains(CXX_VERSION, "clang") {
        QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedef
        QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-private-field
    } else {
        QMAKE_CXXFLAGS_WARN_ON += -Wno-class-memaccess
    }
}

# Define warning flags for Chatterino
win32-msvc* {
    QMAKE_CXXFLAGS_WARN_ON = /W4
    # 4714 - function marked as __forceinline not inlined
    # 4996 - occurs when the compiler encounters a function or variable that is marked as deprecated.
    #        These functions may have a different preferred name, may be insecure or have
    #        a more secure variant, or may be obsolete.
    # 4505 - unreferenced local version has been removed
    # 4127 - conditional expression is constant
    # 4503 - decorated name length exceeded, name was truncated
    # 4100 - unreferences formal parameter
    # 4305 - possible truncation of data
    # 4267 - possible loss of data in return
    QMAKE_CXXFLAGS_WARN_ON += /wd4714
    QMAKE_CXXFLAGS_WARN_ON += /wd4996
    QMAKE_CXXFLAGS_WARN_ON += /wd4505
    QMAKE_CXXFLAGS_WARN_ON += /wd4127
    QMAKE_CXXFLAGS_WARN_ON += /wd4503
    QMAKE_CXXFLAGS_WARN_ON += /wd4100
    QMAKE_CXXFLAGS_WARN_ON += /wd4305
    QMAKE_CXXFLAGS_WARN_ON += /wd4267

} else {
    QMAKE_CXXFLAGS_WARN_ON = -Wall
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function
    QMAKE_CXXFLAGS_WARN_ON += -Wno-switch
    QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations
    QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable

    # Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future
    QMAKE_CXXFLAGS_WARN_ON += -Wno-strict-aliasing

    QMAKE_CXXFLAGS_WARN_ON += -Werror=return-type

    equals(QMAKE_CXX, "clang++") {
        QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedef
        QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-private-field
    } else {
        QMAKE_CXXFLAGS_WARN_ON += -Wno-class-memaccess
    }
}


Changes: don't install private headers in application extensions

RevBy: Vesa Halttunen

EXTENSION_DIR=./applicationextension

PUBLIC_HEADERS += \
    $$EXTENSION_DIR/mextensionarea.h \
    $$EXTENSION_DIR/mextensionareaview.h \
    $$EXTENSION_DIR/mapplicationextensionareaview.h \
    $$EXTENSION_DIR/mapplicationextensionarea.h \
    $$EXTENSION_DIR/mapplicationextensioninterface.h \
    $$EXTENSION_DIR/mapplicationextensionmetadata.h \
    $$EXTENSION_DIR/mextensionrunner.h \

PRIVATE_HEADERS += \
    $$EXTENSION_DIR/mapplicationextensionhandleview.h \
    $$EXTENSION_DIR/mapplicationextensionloader.h \
    $$EXTENSION_DIR/mapplicationextensionmanager.h \
    $$EXTENSION_DIR/mextensionhandle.h \
    $$EXTENSION_DIR/mextensionhandleview.h \
    $$EXTENSION_DIR/mextensionarea_p.h \
    $$EXTENSION_DIR/mextensionareaview_p.h \
    $$EXTENSION_DIR/mapplicationextensionareaview_p.h \
    $$EXTENSION_DIR/mapplicationextensionarea_p.h \
    $$EXTENSION_DIR/mextensionhandle_p.h \
    $$EXTENSION_DIR/mextensionhandleview_p.h \
    $$EXTENSION_DIR/mapplicationextensionhandleview_p.h

SOURCES += $$EXTENSION_DIR/mextensionarea.cpp \
    $$EXTENSION_DIR/mapplicationextensionarea.cpp \
    $$EXTENSION_DIR/mapplicationextensionareaview.cpp \
    $$EXTENSION_DIR/mextensionareaview.cpp \
    $$EXTENSION_DIR/mextensionareamodel.cpp \
    $$EXTENSION_DIR/mapplicationextensionmanager.cpp \
    $$EXTENSION_DIR/mapplicationextensionloader.cpp \
    $$EXTENSION_DIR/mapplicationextensionmetadata.cpp \
    $$EXTENSION_DIR/mextensionrunner.cpp \
    $$EXTENSION_DIR/mextensionhandle.cpp \
    $$EXTENSION_DIR/mextensionhandleview.cpp \
    $$EXTENSION_DIR/mapplicationextensionhandleview.cpp

EXTENSION_MODEL_HEADERS += \
    $$EXTENSION_DIR/mextensionareamodel.h \
    $$EXTENSION_DIR/mapplicationextensionareamodel.h \

EXTENSION_PRIVATE_MODEL_HEADERS += \
    $$EXTENSION_DIR/mextensionhandlemodel.h

MODEL_HEADERS += $$EXTENSION_MODEL_HEADERS $$EXTENSION_PRIVATE_MODEL_HEADERS

PUBLIC_HEADERS += $$EXTENSION_MODEL_HEADERS
PRIVATE_HEADERS += $$EXTENSION_PRIVATE_MODEL_HEADERS

EXTENSION_DIR=./applicationextension

PUBLIC_HEADERS += \
    $$EXTENSION_DIR/mextensionarea.h \
    $$EXTENSION_DIR/mextensionareaview.h \
    $$EXTENSION_DIR/mapplicationextensionareaview.h \
    $$EXTENSION_DIR/mapplicationextensionarea.h \
    $$EXTENSION_DIR/mapplicationextensionmanager.h \
    $$EXTENSION_DIR/mapplicationextensioninterface.h \
    $$EXTENSION_DIR/mapplicationextensionloader.h \
    $$EXTENSION_DIR/mapplicationextensionmetadata.h \
    $$EXTENSION_DIR/mextensionrunner.h \
    $$EXTENSION_DIR/mextensionhandle.h \
    $$EXTENSION_DIR/mextensionhandleview.h \
    $$EXTENSION_DIR/mapplicationextensionhandleview.h \

PRIVATE_HEADERS += \
    $$EXTENSION_DIR/mextensionarea_p.h \
    $$EXTENSION_DIR/mextensionareaview_p.h \
    $$EXTENSION_DIR/mapplicationextensionareaview_p.h \
    $$EXTENSION_DIR/mapplicationextensionarea_p.h \
    $$EXTENSION_DIR/mextensionhandle_p.h \
    $$EXTENSION_DIR/mextensionhandleview_p.h \
    $$EXTENSION_DIR/mapplicationextensionhandleview_p.h

SOURCES += $$EXTENSION_DIR/mextensionarea.cpp \
    $$EXTENSION_DIR/mapplicationextensionarea.cpp \
    $$EXTENSION_DIR/mapplicationextensionareaview.cpp \
    $$EXTENSION_DIR/mextensionareaview.cpp \
    $$EXTENSION_DIR/mextensionareamodel.cpp \
    $$EXTENSION_DIR/mapplicationextensionmanager.cpp \
    $$EXTENSION_DIR/mapplicationextensionloader.cpp \
    $$EXTENSION_DIR/mapplicationextensionmetadata.cpp \
    $$EXTENSION_DIR/mextensionrunner.cpp \
    $$EXTENSION_DIR/mextensionhandle.cpp \
    $$EXTENSION_DIR/mextensionhandleview.cpp \
    $$EXTENSION_DIR/mapplicationextensionhandleview.cpp

EXTENSION_MODEL_HEADERS += \
    $$EXTENSION_DIR/mextensionareamodel.h \
    $$EXTENSION_DIR/mapplicationextensionareamodel.h \
    $$EXTENSION_DIR/mextensionhandlemodel.h

MODEL_HEADERS += $$EXTENSION_MODEL_HEADERS

PUBLIC_HEADERS += $$EXTENSION_MODEL_HEADERS


use correct dirs

use correct dirs

DISTFILES += \
	$$PWD/qjsonreggen.py

JSON_TYPES = \
	bool \
	int \
	uint \
	qlonglong \
	qulonglong \
	double \
	long \
	short \
	char \
	"signed char" \
	ulong \
	ushort \
	uchar \
	float \
	QObject* \
	QChar \
	QString \
	QDate \
	QTime \
	QDateTime \
	QUrl \
	QUuid \
	QJsonValue \
	QJsonObject \
	QJsonArray \
	QVersionNumber \
	QLocale \
	QRegularExpression \
	QSize \
	QPoint \
	QLine \
	QRect \
	QByteArray

QSize.modes = list
QPoint.modes = list
QLine.modes = list
QRect.modes = list
QByteArray.modes = map set

isEmpty(QT_JSONSERIALIZER_REGGEN_DIR): QT_JSONSERIALIZER_REGGEN_DIR = $$OUT_PWD/.reggen
debug_and_release {
	CONFIG(debug, debug|release): QT_JSONSERIALIZER_REGGEN_DIR = $$QT_JSONSERIALIZER_REGGEN_DIR/debug
	CONFIG(release, debug|release): QT_JSONSERIALIZER_REGGEN_DIR = $$QT_JSONSERIALIZER_REGGEN_DIR/release
}

isEmpty(QT_JSONSERIALIZER_TYPESPLIT_PY) {
	win32: QT_JSONSERIALIZER_TYPESPLIT_PY = python
	QT_JSONSERIALIZER_TYPESPLIT_PY += $$shell_path($$PWD/qjsonreggen.py)
}

reggen_dir.target = $$QT_JSONSERIALIZER_REGGEN_DIR
reggen_dir.commands = $$QMAKE_MKDIR $$shell_quote($$shell_path($$QT_JSONSERIALIZER_REGGEN_DIR))
reggen_dir.depends = $$PWD/qjsonreggen.pri
QMAKE_EXTRA_TARGETS += reggen_dir

for(type, JSON_TYPES) {
	type_base = $$replace(type, "\\W", "_")
	target_base = qjsonconverterreg_$${type_base}.cpp
	target_path = $$absolute_path($$target_base, $$QT_JSONSERIALIZER_REGGEN_DIR)
	$${target_path}.name = $$target_path
	$${target_path}.depends = $$PWD/qjsonreggen.py $$PWD/qjsonreggen.pri $$QT_JSONSERIALIZER_REGGEN_DIR
	$${target_path}.commands = $$QT_JSONSERIALIZER_TYPESPLIT_PY $$shell_quote($$target_path) $$shell_quote($$type) $$eval($${type_base}.modes)
	QMAKE_EXTRA_TARGETS += $$target_path
	GENERATED_SOURCES += $$target_path
}

escaped_types =
for(type, JSON_TYPES): escaped_types += $$shell_quote($$type)
target_path = $$absolute_path(qjsonconverterreg_hook.cpp, $$QT_JSONSERIALIZER_REGGEN_DIR)
$${target_path}.name = $$target_path
$${target_path}.depends = $$PWD/qjsonreggen.py $$PWD/qjsonreggen.pri $$QT_JSONSERIALIZER_REGGEN_DIR
$${target_path}.commands = $$QT_JSONSERIALIZER_TYPESPLIT_PY super $$shell_quote($$target_path) $$escaped_types
QMAKE_EXTRA_TARGETS += $$target_path
GENERATED_SOURCES += $$target_path

DISTFILES += \
	$$PWD/qjsonreggen.py

JSON_TYPES = \
	bool \
	int \
	uint \
	qlonglong \
	qulonglong \
	double \
	long \
	short \
	char \
	"signed char" \
	ulong \
	ushort \
	uchar \
	float \
	QObject* \
	QChar \
	QString \
	QDate \
	QTime \
	QDateTime \
	QUrl \
	QUuid \
	QJsonValue \
	QJsonObject \
	QJsonArray \
	QVersionNumber \
	QLocale \
	QRegularExpression \
	QSize \
	QPoint \
	QLine \
	QRect \
	QByteArray

QSize.modes = list
QPoint.modes = list
QLine.modes = list
QRect.modes = list
QByteArray.modes = map set

isEmpty(QT_JSONSERIALIZER_REGPATH): QT_JSONSERIALIZER_REGPATH = $$OUT_PWD/.reggen
isEmpty(QT_JSONSERIALIZER_TYPESPLIT_PY) {
	win32: QT_JSONSERIALIZER_TYPESPLIT_PY = python
	QT_JSONSERIALIZER_TYPESPLIT_PY += $$shell_path($$PWD/qjsonreggen.py)
}

reggen_dir.target = $$QT_JSONSERIALIZER_REGPATH
reggen_dir.commands = $$QMAKE_MKDIR $$shell_quote($$shell_path($$QT_JSONSERIALIZER_REGPATH))
reggen_dir.depends = $$PWD/qjsonreggen.pri
QMAKE_EXTRA_TARGETS += reggen_dir

for(type, JSON_TYPES) {
	type_base = $$replace(type, "\\W", "_")
	target_base = qjsonconverterreg_$${type_base}.cpp
	target_path = $$absolute_path($$target_base, $$QT_JSONSERIALIZER_REGPATH)
	$${target_path}.name = $$target_path
	$${target_path}.depends = $$PWD/qjsonreggen.py $$PWD/qjsonreggen.pri $$QT_JSONSERIALIZER_REGPATH
	$${target_path}.commands = $$QT_JSONSERIALIZER_TYPESPLIT_PY $$shell_quote($$target_path) $$shell_quote($$type) $$eval($${type_base}.modes)
	QMAKE_EXTRA_TARGETS += $$target_path
	GENERATED_SOURCES += $$target_path
}

escaped_types =
for(type, JSON_TYPES): escaped_types += $$shell_quote($$type)
target_path = $$absolute_path(qjsonconverterreg_hook.cpp, $$QT_JSONSERIALIZER_REGPATH)
$${target_path}.name = $$target_path
$${target_path}.depends = $$PWD/qjsonreggen.py $$PWD/qjsonreggen.pri $$QT_JSONSERIALIZER_REGPATH
$${target_path}.commands = @$$QMAKE_CHK_DIR_EXISTS $$QT_JSONSERIALIZER_REGPATH || $$QMAKE_MKDIR $$QT_JSONSERIALIZER_REGPATH \
	$$escape_expand(\n\t)$$QT_JSONSERIALIZER_TYPESPLIT_PY super $$shell_quote($$target_path) $$escaped_types
QMAKE_EXTRA_TARGETS += $$target_path
GENERATED_SOURCES += $$target_path


Fixed a scoping bug GUI.

Fixed a scoping bug GUI.

# Qt widgets module

HEADERS += \
        widgets/qbuttongroup.h \
        widgets/qabstractbutton.h \
        widgets/qabstractbutton_p.h \
        widgets/qabstractslider.h \
        widgets/qabstractslider_p.h \
        widgets/qabstractspinbox.h \
        widgets/qabstractspinbox_p.h \
        widgets/qcalendartextnavigator_p.h \
        widgets/qcalendarwidget.h \
        widgets/qcheckbox.h \
        widgets/qcombobox.h \
        widgets/qcombobox_p.h \
        widgets/qcommandlinkbutton.h \
        widgets/qdatetimeedit.h \
        widgets/qdatetimeedit_p.h \
        widgets/qdial.h \
        widgets/qdialogbuttonbox.h \
        widgets/qdockwidget.h \
        widgets/qdockwidget_p.h \
        widgets/qdockarealayout_p.h \
        widgets/qfontcombobox.h \
        widgets/qframe.h \
        widgets/qframe_p.h \
        widgets/qgroupbox.h \
        widgets/qlabel.h \
        widgets/qlabel_p.h \
        widgets/qlcdnumber.h \
        widgets/qlineedit.h \
        widgets/qlineedit_p.h \
        widgets/qlinecontrol_p.h \
        widgets/qmainwindow.h \
        widgets/qmainwindowlayout_p.h \
        widgets/qmdiarea.h \
        widgets/qmdiarea_p.h \
        widgets/qmdisubwindow.h \
        widgets/qmdisubwindow_p.h \
        widgets/qmenu.h \
        widgets/qmenu_p.h \
        widgets/qmenubar.h \
        widgets/qmenubar_p.h \
        widgets/qmenudata.h \
        widgets/qprogressbar.h \
        widgets/qpushbutton.h \
        widgets/qpushbutton_p.h \
        widgets/qradiobutton.h \
        widgets/qrubberband.h \
        widgets/qscrollbar.h \
        widgets/qscrollarea_p.h \
        widgets/qsizegrip.h \
        widgets/qslider.h \
        widgets/qspinbox.h \
        widgets/qsplashscreen.h \
        widgets/qsplitter.h \
        widgets/qsplitter_p.h \
        widgets/qstackedwidget.h \
        widgets/qstatusbar.h \
        widgets/qtabbar.h \
        widgets/qtabbar_p.h \
        widgets/qtabwidget.h \
        widgets/qtextedit.h \
        widgets/qtextedit_p.h \
        widgets/qtextbrowser.h \
        widgets/qtoolbar.h \
        widgets/qtoolbar_p.h \
        widgets/qtoolbarlayout_p.h \
        widgets/qtoolbarextension_p.h \
        widgets/qtoolbarseparator_p.h \
        widgets/qtoolbox.h \
        widgets/qtoolbutton.h \
        widgets/qvalidator.h \
        widgets/qabstractscrollarea.h \
        widgets/qabstractscrollarea_p.h \
        widgets/qwidgetresizehandler_p.h \
        widgets/qfocusframe.h \
        widgets/qscrollarea.h \
        widgets/qworkspace.h \
        widgets/qwidgetanimator_p.h \
        widgets/qtoolbararealayout_p.h \
        widgets/qplaintextedit.h \
        widgets/qplaintextedit_p.h \
        widgets/qprintpreviewwidget.h
SOURCES += \
        widgets/qabstractbutton.cpp \
        widgets/qabstractslider.cpp \
        widgets/qabstractspinbox.cpp \
        widgets/qcalendarwidget.cpp \
        widgets/qcheckbox.cpp \
        widgets/qcombobox.cpp \
        widgets/qcommandlinkbutton.cpp \
        widgets/qdatetimeedit.cpp \
        widgets/qdial.cpp \
        widgets/qdialogbuttonbox.cpp \
        widgets/qdockwidget.cpp \
        widgets/qdockarealayout.cpp \
        widgets/qeffects.cpp \
        widgets/qfontcombobox.cpp \
        widgets/qframe.cpp \
        widgets/qgroupbox.cpp \
        widgets/qlabel.cpp \
        widgets/qlcdnumber.cpp \
        widgets/qlineedit_p.cpp \
        widgets/qlineedit.cpp \
        widgets/qlinecontrol.cpp \
        widgets/qmainwindow.cpp \
        widgets/qmainwindowlayout.cpp \
        widgets/qmdiarea.cpp \
        widgets/qmdisubwindow.cpp \
        widgets/qmenu.cpp \
        widgets/qmenubar.cpp \
        widgets/qmenudata.cpp \
        widgets/qprogressbar.cpp \
        widgets/qpushbutton.cpp \
        widgets/qradiobutton.cpp \
        widgets/qrubberband.cpp \
        widgets/qscrollbar.cpp \
        widgets/qsizegrip.cpp \
        widgets/qslider.cpp \
        widgets/qspinbox.cpp \
        widgets/qsplashscreen.cpp \
        widgets/qsplitter.cpp \
        widgets/qstackedwidget.cpp \
        widgets/qstatusbar.cpp \
        widgets/qtabbar.cpp \
        widgets/qtabwidget.cpp \
        widgets/qtextedit.cpp \
        widgets/qtextbrowser.cpp \
        widgets/qtoolbar.cpp \
        widgets/qtoolbarlayout.cpp \
        widgets/qtoolbarextension.cpp \
        widgets/qtoolbarseparator.cpp \
        widgets/qtoolbox.cpp \
        widgets/qtoolbutton.cpp \
        widgets/qvalidator.cpp \
        widgets/qabstractscrollarea.cpp \
        widgets/qwidgetresizehandler.cpp \
        widgets/qfocusframe.cpp \
        widgets/qscrollarea.cpp \
        widgets/qworkspace.cpp \
        widgets/qwidgetanimator.cpp \
        widgets/qtoolbararealayout.cpp \
        widgets/qplaintextedit.cpp \
        widgets/qprintpreviewwidget.cpp

!embedded:mac {
    HEADERS += widgets/qmacnativewidget_mac.h \
               widgets/qmaccocoaviewcontainer_mac.h
    OBJECTIVE_HEADERS += widgets/qcocoatoolbardelegate_mac_p.h \
                         widgets/qcocoamenu_mac_p.h
    OBJECTIVE_SOURCES += widgets/qmenu_mac.mm \
                         widgets/qmaccocoaviewcontainer_mac.mm \
                         widgets/qcocoatoolbardelegate_mac.mm \
                         widgets/qmainwindowlayout_mac.mm \
                         widgets/qmacnativewidget_mac.mm \
                         widgets/qcocoamenu_mac.mm
}

wince*: {
    SOURCES += widgets/qmenu_wince.cpp
    HEADERS += widgets/qmenu_wince_resource_p.h
    RC_FILE = widgets/qmenu_wince.rc
    !static: QMAKE_WRITE_DEFAULT_RC = 1
}

symbian: {
    SOURCES += widgets/qmenu_symbian.cpp
}

# Qt widgets module

HEADERS += \
        widgets/qbuttongroup.h \
        widgets/qabstractbutton.h \
        widgets/qabstractbutton_p.h \
        widgets/qabstractslider.h \
        widgets/qabstractslider_p.h \
        widgets/qabstractspinbox.h \
        widgets/qabstractspinbox_p.h \
        widgets/qcalendartextnavigator_p.h \
        widgets/qcalendarwidget.h \
        widgets/qcheckbox.h \
        widgets/qcombobox.h \
        widgets/qcombobox_p.h \
        widgets/qcommandlinkbutton.h \
        widgets/qdatetimeedit.h \
        widgets/qdatetimeedit_p.h \
        widgets/qdial.h \
        widgets/qdialogbuttonbox.h \
        widgets/qdockwidget.h \
        widgets/qdockwidget_p.h \
        widgets/qdockarealayout_p.h \
        widgets/qfontcombobox.h \
        widgets/qframe.h \
        widgets/qframe_p.h \
        widgets/qgroupbox.h \
        widgets/qlabel.h \
        widgets/qlabel_p.h \
        widgets/qlcdnumber.h \
        widgets/qlineedit.h \
        widgets/qlineedit_p.h \
        widgets/qlinecontrol_p.h \
        widgets/qmainwindow.h \
        widgets/qmainwindowlayout_p.h \
        widgets/qmdiarea.h \
        widgets/qmdiarea_p.h \
        widgets/qmdisubwindow.h \
        widgets/qmdisubwindow_p.h \
        widgets/qmenu.h \
        widgets/qmenu_p.h \
        widgets/qmenubar.h \
        widgets/qmenubar_p.h \
        widgets/qmenudata.h \
        widgets/qprogressbar.h \
        widgets/qpushbutton.h \
        widgets/qpushbutton_p.h \
        widgets/qradiobutton.h \
        widgets/qrubberband.h \
        widgets/qscrollbar.h \
        widgets/qscrollarea_p.h \
        widgets/qsizegrip.h \
        widgets/qslider.h \
        widgets/qspinbox.h \
        widgets/qsplashscreen.h \
        widgets/qsplitter.h \
        widgets/qsplitter_p.h \
        widgets/qstackedwidget.h \
        widgets/qstatusbar.h \
        widgets/qtabbar.h \
        widgets/qtabbar_p.h \
        widgets/qtabwidget.h \
        widgets/qtextedit.h \
        widgets/qtextedit_p.h \
        widgets/qtextbrowser.h \
        widgets/qtoolbar.h \
        widgets/qtoolbar_p.h \
        widgets/qtoolbarlayout_p.h \
        widgets/qtoolbarextension_p.h \
        widgets/qtoolbarseparator_p.h \
        widgets/qtoolbox.h \
        widgets/qtoolbutton.h \
        widgets/qvalidator.h \
        widgets/qabstractscrollarea.h \
        widgets/qabstractscrollarea_p.h \
        widgets/qwidgetresizehandler_p.h \
        widgets/qfocusframe.h \
        widgets/qscrollarea.h \
        widgets/qworkspace.h \
        widgets/qwidgetanimator_p.h \
        widgets/qtoolbararealayout_p.h \
        widgets/qplaintextedit.h \
        widgets/qplaintextedit_p.h \
        widgets/qprintpreviewwidget.h
SOURCES += \
        widgets/qabstractbutton.cpp \
        widgets/qabstractslider.cpp \
        widgets/qabstractspinbox.cpp \
        widgets/qcalendarwidget.cpp \
        widgets/qcheckbox.cpp \
        widgets/qcombobox.cpp \
        widgets/qcommandlinkbutton.cpp \
        widgets/qdatetimeedit.cpp \
        widgets/qdial.cpp \
        widgets/qdialogbuttonbox.cpp \
        widgets/qdockwidget.cpp \
        widgets/qdockarealayout.cpp \
        widgets/qeffects.cpp \
        widgets/qfontcombobox.cpp \
        widgets/qframe.cpp \
        widgets/qgroupbox.cpp \
        widgets/qlabel.cpp \
        widgets/qlcdnumber.cpp \
        widgets/qlineedit_p.cpp \
        widgets/qlineedit.cpp \
        widgets/qlinecontrol.cpp \
        widgets/qmainwindow.cpp \
        widgets/qmainwindowlayout.cpp \
        widgets/qmdiarea.cpp \
        widgets/qmdisubwindow.cpp \
        widgets/qmenu.cpp \
        widgets/qmenubar.cpp \
        widgets/qmenudata.cpp \
        widgets/qprogressbar.cpp \
        widgets/qpushbutton.cpp \
        widgets/qradiobutton.cpp \
        widgets/qrubberband.cpp \
        widgets/qscrollbar.cpp \
        widgets/qsizegrip.cpp \
        widgets/qslider.cpp \
        widgets/qspinbox.cpp \
        widgets/qsplashscreen.cpp \
        widgets/qsplitter.cpp \
        widgets/qstackedwidget.cpp \
        widgets/qstatusbar.cpp \
        widgets/qtabbar.cpp \
        widgets/qtabwidget.cpp \
        widgets/qtextedit.cpp \
        widgets/qtextbrowser.cpp \
        widgets/qtoolbar.cpp \
        widgets/qtoolbarlayout.cpp \
        widgets/qtoolbarextension.cpp \
        widgets/qtoolbarseparator.cpp \
        widgets/qtoolbox.cpp \
        widgets/qtoolbutton.cpp \
        widgets/qvalidator.cpp \
        widgets/qabstractscrollarea.cpp \
        widgets/qwidgetresizehandler.cpp \
        widgets/qfocusframe.cpp \
        widgets/qscrollarea.cpp \
        widgets/qworkspace.cpp \
        widgets/qwidgetanimator.cpp \
        widgets/qtoolbararealayout.cpp \
        widgets/qplaintextedit.cpp \
        widgets/qprintpreviewwidget.cpp

!embedded:mac {
    HEADERS += widgets/qmacnativewidget_mac.h \
               widgets/qmaccocoaviewcontainer_mac.h
    OBJECTIVE_HEADERS += widgets/qcocoatoolbardelegate_mac_p.h \
                         widgets/qcocoamenu_mac_p.h
    OBJECTIVE_SOURCES += widgets/qmenu_mac.mm \
                         widgets/qmaccocoaviewcontainer_mac.mm \
                         widgets/qcocoatoolbardelegate_mac.mm \
                         widgets/qmainwindowlayout_mac.mm \
                         widgets/qmacnativewidget_mac.mm \
                         widgets/qcocoamenu_mac.mm
}

wince*: {
    SOURCES += widgets/qmenu_wince.cpp
    HEADERS += widgets/qmenu_wince_resource_p.h
    RC_FILE = widgets/qmenu_wince.rc
    !static: QMAKE_WRITE_DEFAULT_RC = 1
}

symbian*: {
    SOURCES += widgets/qmenu_symbian.cpp
}


fix warning about wrong backslashes in the path

# #####################################################################
# Telephony Mobility API
# #####################################################################

HEADERS +=  maemo/qtelephonycalllist_maemo_p.h \
            maemo/qtelephonycallinfo_maemo_p.h \
            maemo/abstractclient.h \
            maemo/clientregistrar.h \
            maemo/clientadaptor.h \
            maemo/cli-constants.h \
            maemo/shared-ptr.h \
            maemo/types.h \
            maemo/types-internal.h \
            maemo/dbus-proxy.h \
            maemo/ready-object.h \
            maemo/feature.h \
            maemo/readiness-helper.h \
            maemo/pending-ready.h \
            maemo/pending-operation.h \
            maemo/simple-pending-operations.h \
            maemo/connection.h \
            maemo/channel.h \
            maemo/accountmanager.h \
            maemo/account.h \
            maemo/interfaces/cli-types.h \
            maemo/interfaces/cli-account-manager.h \
            maemo/interfaces/cli-account.h \
            maemo/interfaces/cli-channel-dispatch-operation.h \
            maemo/interfaces/cli-channel-dispatcher.h \
            maemo/interfaces/cli-channel-request.h \
            maemo/interfaces/cli-channel.h \
            maemo/interfaces/cli-client.h \
            maemo/interfaces/cli-connection-manager.h \
            maemo/interfaces/cli-connection.h \
            maemo/interfaces/abstract-interface.h

SOURCES +=  maemo/qtelephonycalllist_maemo.cpp \
            maemo/qtelephonycallinfo_maemo_p.cpp \
            maemo/abstractclient.cpp \
            maemo/clientregistrar.cpp \
            maemo/types.cpp \
            maemo/clientadaptor.cpp \
            maemo/dbus-proxy.cpp \
            maemo/ready-object.cpp \
            maemo/feature.cpp \
            maemo/readiness-helper.cpp \
            maemo/pending-ready.cpp \
            maemo/pending-operation.cpp \
            maemo/connection.cpp \
            maemo/channel.cpp \
            maemo/accountmanager.cpp \
            maemo/account.cpp \
            maemo/interfaces/cli-types.cpp \
            maemo/interfaces/cli-account-body.cpp \
            maemo/interfaces/cli-account-manager-body.cpp \
            maemo/interfaces/cli-channel-body.cpp \
            maemo/interfaces/cli-channel-dispatcher-body.cpp \
            maemo/interfaces/cli-channel-dispatch-operation-body.cpp \
            maemo/interfaces/cli-channel-request-body.cpp \
            maemo/interfaces/cli-client-body.cpp \
            maemo/interfaces/cli-connection-body.cpp \
            maemo/interfaces/cli-connection-manager-body.cpp \
            maemo/interfaces/abstract-interface.cpp

# #####################################################################
# Telephony Mobility API
# #####################################################################

HEADERS +=  maemo\qtelephonycalllist_maemo_p.h \
            maemo\qtelephonycallinfo_maemo_p.h \
            maemo\abstractclient.h \
            maemo\clientregistrar.h \
            maemo\clientadaptor.h \
            maemo\cli-constants.h \
            maemo\shared-ptr.h \
            maemo\types.h \
            maemo\types-internal.h \
            maemo\dbus-proxy.h \
            maemo\ready-object.h \
            maemo\feature.h \
            maemo\readiness-helper.h \
            maemo\pending-ready.h \
            maemo\pending-operation.h \
            maemo\simple-pending-operations.h \
            maemo\connection.h \
            maemo\channel.h \
            maemo\accountmanager.h \
            maemo\account.h \
            maemo\interfaces\cli-types.h \
            maemo\interfaces\cli-account-manager.h \
            maemo\interfaces\cli-account.h \
            maemo\interfaces\cli-channel-dispatch-operation.h \
            maemo\interfaces\cli-channel-dispatcher.h \
            maemo\interfaces\cli-channel-request.h \
            maemo\interfaces\cli-channel.h \
            maemo\interfaces\cli-client.h \
            maemo\interfaces\cli-connection-manager.h \
            maemo\interfaces\cli-connection.h \
            maemo\interfaces\abstract-interface.h

SOURCES +=  maemo\qtelephonycalllist_maemo.cpp \
            maemo\qtelephonycallinfo_maemo_p.cpp \
            maemo\abstractclient.cpp \
            maemo\clientregistrar.cpp \
            maemo\types.cpp \
            maemo\clientadaptor.cpp \
            maemo\dbus-proxy.cpp \
            maemo\ready-object.cpp \
            maemo\feature.cpp \
            maemo\readiness-helper.cpp \
            maemo\pending-ready.cpp \
            maemo\pending-operation.cpp \
            maemo\connection.cpp \
            maemo\channel.cpp \
            maemo\accountmanager.cpp \
            maemo\account.cpp \
            maemo\interfaces\cli-types.cpp \
            maemo\interfaces\cli-account-body.cpp \
            maemo\interfaces\cli-account-manager-body.cpp \
            maemo\interfaces\cli-channel-body.cpp \
            maemo\interfaces\cli-channel-dispatcher-body.cpp \
            maemo\interfaces\cli-channel-dispatch-operation-body.cpp \
            maemo\interfaces\cli-channel-request-body.cpp \
            maemo\interfaces\cli-client-body.cpp \
            maemo\interfaces\cli-connection-body.cpp \
            maemo\interfaces\cli-connection-manager-body.cpp \
            maemo\interfaces\abstract-interface.cpp