Fixed build under Windows

Fixed build under Windows

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

QT += widgets xml

DEFINES += TWO_D_MODEL_LIBRARY

links(qrkernel qslog qrutils qrgui-tool-plugin-interface qrgui-controller robots-utils robots-kit-base)
includes(plugins/robots/common/kitBase)
includes(plugins/robots/utils qrtext)

TRANSLATIONS = \
	$$PWD/../../../../qrtranslations/ru/plugins/robots/twoDModel_ru.ts \
	$$PWD/../../../../qrtranslations/fr/plugins/robots/twoDModel_fr.ts \

HEADERS += \
	$$PWD/include/twoDModel/twoDModelDeclSpec.h \
	$$PWD/include/twoDModel/engine/twoDModelControlInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayWidget.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineFacade.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelGuiFacade.h \
	$$PWD/include/twoDModel/engine/view/twoDModelWidget.h \
	$$PWD/include/twoDModel/engine/model/constants.h \
	$$PWD/include/twoDModel/engine/model/model.h \
	$$PWD/include/twoDModel/engine/model/worldModel.h \
	$$PWD/include/twoDModel/engine/model/timeline.h \
	$$PWD/include/twoDModel/engine/model/robotModel.h \
	$$PWD/include/twoDModel/engine/model/sensorsConfiguration.h \
	$$PWD/include/twoDModel/engine/model/settings.h \
	$$PWD/include/twoDModel/robotModel/twoDRobotModel.h \
	$$PWD/include/twoDModel/robotModel/parts/button.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorBlue.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorFull.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorGreen.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorPassive.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorRed.h \
	$$PWD/include/twoDModel/robotModel/parts/display.h \
	$$PWD/include/twoDModel/robotModel/parts/encoderSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/lightSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/motor.h \
	$$PWD/include/twoDModel/robotModel/parts/rangeSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/touchSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/gyroscope.h \
	$$PWD/include/twoDModel/robotModel/parts/accelerometer.h \
	$$PWD/include/twoDModel/robotModel/parts/marker.h \
	$$PWD/include/twoDModel/blocks/markerDownBlock.h \
	$$PWD/include/twoDModel/blocks/markerUpBlock.h \

HEADERS += \
	$$PWD/src/engine/twoDModelEngineApi.h \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.h \
	$$PWD/src/engine/view/scene/twoDModelScene.h \
	$$PWD/src/engine/view/scene/fakeScene.h \
	$$PWD/src/engine/view/scene/robotItem.h \
	$$PWD/src/engine/view/scene/sensorItem.h \
	$$PWD/src/engine/view/scene/sonarSensorItem.h \
	$$PWD/src/engine/view/parts/palette.h \
	$$PWD/src/engine/view/parts/actionsBox.h \
	$$PWD/src/engine/view/parts/gridParameters.h \
	$$PWD/src/engine/view/parts/detailsTab.h \
	$$PWD/src/engine/view/parts/colorItemPopup.h \
	$$PWD/src/engine/view/parts/robotItemPopup.h \
	$$PWD/src/engine/view/parts/speedPopup.h \
	$$PWD/src/engine/view/parts/ruler.h \
	$$PWD/src/engine/constraints/constraintsChecker.h \
	$$PWD/src/engine/constraints/details/defines.h \
	$$PWD/src/engine/constraints/details/constraintsParser.h \
	$$PWD/src/engine/constraints/details/event.h \
	$$PWD/src/engine/constraints/details/conditionsFactory.h \
	$$PWD/src/engine/constraints/details/triggersFactory.h \
	$$PWD/src/engine/constraints/details/valuesFactory.h \
	$$PWD/src/engine/model/modelTimer.h \
	$$PWD/src/engine/model/physics/physicsEngineBase.h \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.h \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.h \
	$$PWD/src/engine/items/solidItem.h \
	$$PWD/src/engine/items/wallItem.h \
	$$PWD/src/engine/items/stylusItem.h \
	$$PWD/src/engine/items/lineItem.h \
	$$PWD/src/engine/items/curveItem.h \
	$$PWD/src/engine/items/colorFieldItem.h \
	$$PWD/src/engine/items/rectangleItem.h \
	$$PWD/src/engine/items/ellipseItem.h \
	$$PWD/src/engine/items/startPosition.h \
	$$PWD/src/engine/items/regions/regionItem.h \
	$$PWD/src/engine/items/regions/ellipseRegion.h \
	$$PWD/src/engine/items/regions/rectangularRegion.h \
	$$PWD/src/engine/items/regions/boundRegion.h \
	$$PWD/src/engine/commands/createWorldItemCommand.h \
	$$PWD/src/engine/commands/removeWorldItemCommand.h \
	$$PWD/src/engine/commands/removeWorldItemsCommand.h \
	$$PWD/src/engine/commands/createRemoveWorldItemImplementation.h \
	$$PWD/src/engine/commands/createSensorCommand.h \
	$$PWD/src/engine/commands/removeSensorCommand.h \
	$$PWD/src/engine/commands/createRemoveSensorImplementation.h \
	$$PWD/src/engine/commands/changePropertyCommand.h \
	$$PWD/src/engine/commands/reshapeCommand.h \
	$$PWD/src/robotModel/nullTwoDRobotModel.h \

SOURCES += \
	$$PWD/src/engine/twoDModelEngineFacade.cpp \
	$$PWD/src/engine/twoDModelEngineApi.cpp \
	$$PWD/src/engine/twoDModelGuiFacade.cpp \
	$$PWD/src/engine/view/twoDModelWidget.cpp \
	$$PWD/src/engine/view/twoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/scene/twoDModelScene.cpp \
	$$PWD/src/engine/view/scene/fakeScene.cpp \
	$$PWD/src/engine/view/scene/robotItem.cpp \
	$$PWD/src/engine/view/scene/sensorItem.cpp \
	$$PWD/src/engine/view/scene/sonarSensorItem.cpp \
	$$PWD/src/engine/view/parts/palette.cpp \
	$$PWD/src/engine/view/parts/actionsBox.cpp \
	$$PWD/src/engine/view/parts/gridParameters.cpp \
	$$PWD/src/engine/view/parts/detailsTab.cpp \
	$$PWD/src/engine/view/parts/colorItemPopup.cpp \
	$$PWD/src/engine/view/parts/robotItemPopup.cpp \
	$$PWD/src/engine/view/parts/speedPopup.cpp \
	$$PWD/src/engine/view/parts/ruler.cpp \
	$$PWD/src/engine/model/model.cpp \
	$$PWD/src/engine/model/settings.cpp \
	$$PWD/src/engine/model/robotModel.cpp \
	$$PWD/src/engine/model/modelTimer.cpp \
	$$PWD/src/engine/model/sensorsConfiguration.cpp \
	$$PWD/src/engine/model/worldModel.cpp \
	$$PWD/src/engine/model/timeline.cpp \
	$$PWD/src/engine/model/physics/physicsEngineBase.cpp \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.cpp \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.cpp \
	$$PWD/src/engine/items/solidItem.cpp \
	$$PWD/src/engine/items/wallItem.cpp \
	$$PWD/src/engine/items/stylusItem.cpp \
	$$PWD/src/engine/items/lineItem.cpp \
	$$PWD/src/engine/items/curveItem.cpp \
	$$PWD/src/engine/items/colorFieldItem.cpp \
	$$PWD/src/engine/items/rectangleItem.cpp \
	$$PWD/src/engine/items/ellipseItem.cpp \
	$$PWD/src/engine/items/startPosition.cpp \
	$$PWD/src/engine/items/regions/regionItem.cpp \
	$$PWD/src/engine/items/regions/ellipseRegion.cpp \
	$$PWD/src/engine/items/regions/rectangularRegion.cpp \
	$$PWD/src/engine/items/regions/boundRegion.cpp \
	$$PWD/src/engine/constraints/constraintsChecker.cpp \
	$$PWD/src/engine/constraints/details/constraintsParser.cpp \
	$$PWD/src/engine/constraints/details/event.cpp \
	$$PWD/src/engine/constraints/details/conditionsFactory.cpp \
	$$PWD/src/engine/constraints/details/triggersFactory.cpp \
	$$PWD/src/engine/constraints/details/valuesFactory.cpp \
	$$PWD/src/engine/commands/createWorldItemCommand.cpp \
	$$PWD/src/engine/commands/removeWorldItemCommand.cpp \
	$$PWD/src/engine/commands/removeWorldItemsCommand.cpp \
	$$PWD/src/engine/commands/createRemoveWorldItemImplementation.cpp \
	$$PWD/src/engine/commands/createSensorCommand.cpp \
	$$PWD/src/engine/commands/removeSensorCommand.cpp \
	$$PWD/src/engine/commands/createRemoveSensorImplementation.cpp \
	$$PWD/src/engine/commands/changePropertyCommand.cpp \
	$$PWD/src/engine/commands/reshapeCommand.cpp \
	$$PWD/src/robotModel/twoDRobotModel.cpp \
	$$PWD/src/robotModel/nullTwoDRobotModel.cpp \
	$$PWD/src/robotModel/parts/button.cpp \
	$$PWD/src/robotModel/parts/colorSensorBlue.cpp \
	$$PWD/src/robotModel/parts/colorSensorFull.cpp \
	$$PWD/src/robotModel/parts/colorSensorGreen.cpp \
	$$PWD/src/robotModel/parts/colorSensorPassive.cpp \
	$$PWD/src/robotModel/parts/colorSensorRed.cpp \
	$$PWD/src/robotModel/parts/display.cpp \
	$$PWD/src/robotModel/parts/encoderSensor.cpp \
	$$PWD/src/robotModel/parts/lightSensor.cpp \
	$$PWD/src/robotModel/parts/motor.cpp \
	$$PWD/src/robotModel/parts/rangeSensor.cpp \
	$$PWD/src/robotModel/parts/touchSensor.cpp \
	$$PWD/src/robotModel/parts/gyroscope.cpp \
	$$PWD/src/robotModel/parts/accelerometer.cpp \
	$$PWD/src/robotModel/parts/marker.cpp \
	$$PWD/src/blocks/markerDownBlock.cpp \
	$$PWD/src/blocks/markerUpBlock.cpp \

FORMS += \
	$$PWD/src/engine/view/twoDModelWidget.ui \

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

QT += widgets xml

DEFINES += TWO_D_MODEL_LIBRARY

links(qrkernel qslog qrutils qrgui-tool-plugin-interface robots-utils robots-kit-base)
includes(plugins/robots/common/kitBase)
includes(plugins/robots/utils qrtext)

TRANSLATIONS = \
	$$PWD/../../../../qrtranslations/ru/plugins/robots/twoDModel_ru.ts \
	$$PWD/../../../../qrtranslations/fr/plugins/robots/twoDModel_fr.ts \

HEADERS += \
	$$PWD/include/twoDModel/twoDModelDeclSpec.h \
	$$PWD/include/twoDModel/engine/twoDModelControlInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayWidget.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineFacade.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelGuiFacade.h \
	$$PWD/include/twoDModel/engine/view/twoDModelWidget.h \
	$$PWD/include/twoDModel/engine/model/constants.h \
	$$PWD/include/twoDModel/engine/model/model.h \
	$$PWD/include/twoDModel/engine/model/worldModel.h \
	$$PWD/include/twoDModel/engine/model/timeline.h \
	$$PWD/include/twoDModel/engine/model/robotModel.h \
	$$PWD/include/twoDModel/engine/model/sensorsConfiguration.h \
	$$PWD/include/twoDModel/engine/model/settings.h \
	$$PWD/include/twoDModel/robotModel/twoDRobotModel.h \
	$$PWD/include/twoDModel/robotModel/parts/button.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorBlue.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorFull.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorGreen.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorPassive.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorRed.h \
	$$PWD/include/twoDModel/robotModel/parts/display.h \
	$$PWD/include/twoDModel/robotModel/parts/encoderSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/lightSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/motor.h \
	$$PWD/include/twoDModel/robotModel/parts/rangeSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/touchSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/gyroscope.h \
	$$PWD/include/twoDModel/robotModel/parts/accelerometer.h \
	$$PWD/include/twoDModel/robotModel/parts/marker.h \
	$$PWD/include/twoDModel/blocks/markerDownBlock.h \
	$$PWD/include/twoDModel/blocks/markerUpBlock.h \

HEADERS += \
	$$PWD/src/engine/twoDModelEngineApi.h \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.h \
	$$PWD/src/engine/view/scene/twoDModelScene.h \
	$$PWD/src/engine/view/scene/fakeScene.h \
	$$PWD/src/engine/view/scene/robotItem.h \
	$$PWD/src/engine/view/scene/sensorItem.h \
	$$PWD/src/engine/view/scene/sonarSensorItem.h \
	$$PWD/src/engine/view/parts/palette.h \
	$$PWD/src/engine/view/parts/actionsBox.h \
	$$PWD/src/engine/view/parts/gridParameters.h \
	$$PWD/src/engine/view/parts/detailsTab.h \
	$$PWD/src/engine/view/parts/colorItemPopup.h \
	$$PWD/src/engine/view/parts/robotItemPopup.h \
	$$PWD/src/engine/view/parts/speedPopup.h \
	$$PWD/src/engine/view/parts/ruler.h \
	$$PWD/src/engine/constraints/constraintsChecker.h \
	$$PWD/src/engine/constraints/details/defines.h \
	$$PWD/src/engine/constraints/details/constraintsParser.h \
	$$PWD/src/engine/constraints/details/event.h \
	$$PWD/src/engine/constraints/details/conditionsFactory.h \
	$$PWD/src/engine/constraints/details/triggersFactory.h \
	$$PWD/src/engine/constraints/details/valuesFactory.h \
	$$PWD/src/engine/model/modelTimer.h \
	$$PWD/src/engine/model/physics/physicsEngineBase.h \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.h \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.h \
	$$PWD/src/engine/items/solidItem.h \
	$$PWD/src/engine/items/wallItem.h \
	$$PWD/src/engine/items/stylusItem.h \
	$$PWD/src/engine/items/lineItem.h \
	$$PWD/src/engine/items/curveItem.h \
	$$PWD/src/engine/items/colorFieldItem.h \
	$$PWD/src/engine/items/rectangleItem.h \
	$$PWD/src/engine/items/ellipseItem.h \
	$$PWD/src/engine/items/startPosition.h \
	$$PWD/src/engine/items/regions/regionItem.h \
	$$PWD/src/engine/items/regions/ellipseRegion.h \
	$$PWD/src/engine/items/regions/rectangularRegion.h \
	$$PWD/src/engine/items/regions/boundRegion.h \
	$$PWD/src/engine/commands/createWorldItemCommand.h \
	$$PWD/src/engine/commands/removeWorldItemCommand.h \
	$$PWD/src/engine/commands/removeWorldItemsCommand.h \
	$$PWD/src/engine/commands/createRemoveWorldItemImplementation.h \
	$$PWD/src/engine/commands/createSensorCommand.h \
	$$PWD/src/engine/commands/removeSensorCommand.h \
	$$PWD/src/engine/commands/createRemoveSensorImplementation.h \
	$$PWD/src/engine/commands/changePropertyCommand.h \
	$$PWD/src/engine/commands/reshapeCommand.h \
	$$PWD/src/robotModel/nullTwoDRobotModel.h \

SOURCES += \
	$$PWD/src/engine/twoDModelEngineFacade.cpp \
	$$PWD/src/engine/twoDModelEngineApi.cpp \
	$$PWD/src/engine/twoDModelGuiFacade.cpp \
	$$PWD/src/engine/view/twoDModelWidget.cpp \
	$$PWD/src/engine/view/twoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/scene/twoDModelScene.cpp \
	$$PWD/src/engine/view/scene/fakeScene.cpp \
	$$PWD/src/engine/view/scene/robotItem.cpp \
	$$PWD/src/engine/view/scene/sensorItem.cpp \
	$$PWD/src/engine/view/scene/sonarSensorItem.cpp \
	$$PWD/src/engine/view/parts/palette.cpp \
	$$PWD/src/engine/view/parts/actionsBox.cpp \
	$$PWD/src/engine/view/parts/gridParameters.cpp \
	$$PWD/src/engine/view/parts/detailsTab.cpp \
	$$PWD/src/engine/view/parts/colorItemPopup.cpp \
	$$PWD/src/engine/view/parts/robotItemPopup.cpp \
	$$PWD/src/engine/view/parts/speedPopup.cpp \
	$$PWD/src/engine/view/parts/ruler.cpp \
	$$PWD/src/engine/model/model.cpp \
	$$PWD/src/engine/model/settings.cpp \
	$$PWD/src/engine/model/robotModel.cpp \
	$$PWD/src/engine/model/modelTimer.cpp \
	$$PWD/src/engine/model/sensorsConfiguration.cpp \
	$$PWD/src/engine/model/worldModel.cpp \
	$$PWD/src/engine/model/timeline.cpp \
	$$PWD/src/engine/model/physics/physicsEngineBase.cpp \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.cpp \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.cpp \
	$$PWD/src/engine/items/solidItem.cpp \
	$$PWD/src/engine/items/wallItem.cpp \
	$$PWD/src/engine/items/stylusItem.cpp \
	$$PWD/src/engine/items/lineItem.cpp \
	$$PWD/src/engine/items/curveItem.cpp \
	$$PWD/src/engine/items/colorFieldItem.cpp \
	$$PWD/src/engine/items/rectangleItem.cpp \
	$$PWD/src/engine/items/ellipseItem.cpp \
	$$PWD/src/engine/items/startPosition.cpp \
	$$PWD/src/engine/items/regions/regionItem.cpp \
	$$PWD/src/engine/items/regions/ellipseRegion.cpp \
	$$PWD/src/engine/items/regions/rectangularRegion.cpp \
	$$PWD/src/engine/items/regions/boundRegion.cpp \
	$$PWD/src/engine/constraints/constraintsChecker.cpp \
	$$PWD/src/engine/constraints/details/constraintsParser.cpp \
	$$PWD/src/engine/constraints/details/event.cpp \
	$$PWD/src/engine/constraints/details/conditionsFactory.cpp \
	$$PWD/src/engine/constraints/details/triggersFactory.cpp \
	$$PWD/src/engine/constraints/details/valuesFactory.cpp \
	$$PWD/src/engine/commands/createWorldItemCommand.cpp \
	$$PWD/src/engine/commands/removeWorldItemCommand.cpp \
	$$PWD/src/engine/commands/removeWorldItemsCommand.cpp \
	$$PWD/src/engine/commands/createRemoveWorldItemImplementation.cpp \
	$$PWD/src/engine/commands/createSensorCommand.cpp \
	$$PWD/src/engine/commands/removeSensorCommand.cpp \
	$$PWD/src/engine/commands/createRemoveSensorImplementation.cpp \
	$$PWD/src/engine/commands/changePropertyCommand.cpp \
	$$PWD/src/engine/commands/reshapeCommand.cpp \
	$$PWD/src/robotModel/twoDRobotModel.cpp \
	$$PWD/src/robotModel/nullTwoDRobotModel.cpp \
	$$PWD/src/robotModel/parts/button.cpp \
	$$PWD/src/robotModel/parts/colorSensorBlue.cpp \
	$$PWD/src/robotModel/parts/colorSensorFull.cpp \
	$$PWD/src/robotModel/parts/colorSensorGreen.cpp \
	$$PWD/src/robotModel/parts/colorSensorPassive.cpp \
	$$PWD/src/robotModel/parts/colorSensorRed.cpp \
	$$PWD/src/robotModel/parts/display.cpp \
	$$PWD/src/robotModel/parts/encoderSensor.cpp \
	$$PWD/src/robotModel/parts/lightSensor.cpp \
	$$PWD/src/robotModel/parts/motor.cpp \
	$$PWD/src/robotModel/parts/rangeSensor.cpp \
	$$PWD/src/robotModel/parts/touchSensor.cpp \
	$$PWD/src/robotModel/parts/gyroscope.cpp \
	$$PWD/src/robotModel/parts/accelerometer.cpp \
	$$PWD/src/robotModel/parts/marker.cpp \
	$$PWD/src/blocks/markerDownBlock.cpp \
	$$PWD/src/blocks/markerUpBlock.cpp \

FORMS += \
	$$PWD/src/engine/view/twoDModelWidget.ui \


drop snappy dependency

drop snappy dependency

#DEFINES += GEONLP_PRINT_DEBUG_QUERIES
#DEFINES += GEONLP_PRINT_DEBUG

INCLUDEPATH += $$PWD/src
INCLUDEPATH += $$PWD/thirdparty/sqlite3pp/headeronly_src

DEPENDPATH += $$PWD/src

SOURCES += \
    $$PWD/src/postal.cpp \
    $$PWD/src/geocoder.cpp

HEADERS += \
    $$PWD/src/postal.h \
    $$PWD/src/geocoder.h

LIBS += -lpostal -lsnappy #-lsqlite3


Deploy normal and test plugins as a quick workaround.

This has changed in master, needs a merge.

######################################################################
#
# Mobility API project - common QMake settings
#
######################################################################

CONFIG += debug_and_release build_all

# On win32 and mac, debug and release libraries are named differently.
# We must follow the debug and release settings Qt was compiled with:
# build debug iff Qt built debug, build release iff Qt built release.
win32|mac {
    !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) {
        CONFIG -= debug_and_release debug release
        contains(QT_CONFIG,debug):  CONFIG+=debug
        contains(QT_CONFIG,release):CONFIG+=release
    }
}

CONFIG(debug, debug|release) {
    SUBDIRPART = Debug
} else {
    SUBDIRPART = Release
}

# Which backend we're building
## memory / invalid / symbian / windows / vcard / kabc etc.
CONTACTS_BACKENDS = memory invalid
wince*: CONTACTS_BACKENDS += wince
symbian: CONTACTS_BACKENDS += symbian

# Figure out the root of where stuff should go (this could be done via configure)
OUTPUT_DIR = $$PWD
SOURCE_DIR = $$PWD

# Default plugin subdirectory
isEmpty(PLUGIN_SUBDIR): PLUGIN_SUBDIR=plugins

#test whether we have a unit test
!testcase {
    OBJECTS_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET
    !plugin {
        DESTDIR = $$OUTPUT_DIR/build/$$SUBDIRPART/bin
    } else {
        DESTDIR = $$OUTPUT_DIR/build/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR
        LIBS += -L$$OUTPUT_DIR/build/$$SUBDIRPART/bin  #link against base dir as well
    }
    MOC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/moc
    RCC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/rcc

} else {
    QT *= testlib
    CONFIG += console
    CONFIG -= app_bundle
    OBJECTS_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET
    !plugin {
        DESTDIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/bin
    } else {
        DESTDIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR
    }
    MOC_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/moc
    RCC_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/rcc
    LIBS += -L$$OUTPUT_DIR/build/$$SUBDIRPART/bin  #link against library that we test
    INCLUDEPATH *= $$MOC_DIR
    INCLUDEPATH *= $$RCC_DIR

    # Where test plugins go.
    TEST_PLUGIN_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR
}

# Where normal plugins go
PLUGIN_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR

# Add files for deployment
CONTACTS_DEPLOYMENT.sources = $$OUTPUT_DIR/build/$$SUBDIRPART/bin/QtContacts.dll
CONTACTS_DEPLOYMENT.path = /Windows
CONTACTS_PLUGINS_DEPLOYMENT.sources = $$OUTPUT_DIR/build/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR/*.dll \
    $$OUTPUT_DIR/build/$$SUBDIRPART/bin/plugins/*.dll
CONTACTS_PLUGINS_DEPLOYMENT.path = ./plugins
DEPLOYMENT += CONTACTS_DEPLOYMENT CONTACTS_PLUGINS_DEPLOYMENT

# Add the output dirs to the link path too
LIBS += -L$$DESTDIR

DEPENDPATH += . $$SOURCE_DIR
INCLUDEPATH += . $$SOURCEDIR

######################################################################
#
# Mobility API project - common QMake settings
#
######################################################################

CONFIG += debug_and_release build_all

# On win32 and mac, debug and release libraries are named differently.
# We must follow the debug and release settings Qt was compiled with:
# build debug iff Qt built debug, build release iff Qt built release.
win32|mac {
    !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) {
        CONFIG -= debug_and_release debug release
        contains(QT_CONFIG,debug):  CONFIG+=debug
        contains(QT_CONFIG,release):CONFIG+=release
    }
}

CONFIG(debug, debug|release) {
    SUBDIRPART = Debug
} else {
    SUBDIRPART = Release
}

# Which backend we're building
## memory / invalid / symbian / windows / vcard / kabc etc.
CONTACTS_BACKENDS = memory invalid
wince*: CONTACTS_BACKENDS += wince
symbian: CONTACTS_BACKENDS += symbian

# Figure out the root of where stuff should go (this could be done via configure)
OUTPUT_DIR = $$PWD
SOURCE_DIR = $$PWD

# Default plugin subdirectory
isEmpty(PLUGIN_SUBDIR): PLUGIN_SUBDIR=plugins

#test whether we have a unit test
!testcase {
    OBJECTS_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET
    !plugin {
        DESTDIR = $$OUTPUT_DIR/build/$$SUBDIRPART/bin
    } else {
        DESTDIR = $$OUTPUT_DIR/build/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR
        LIBS += -L$$OUTPUT_DIR/build/$$SUBDIRPART/bin  #link against base dir as well
    }
    MOC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/moc
    RCC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/rcc

} else {
    QT *= testlib
    CONFIG += console
    CONFIG -= app_bundle
    OBJECTS_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET
    !plugin {
        DESTDIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/bin
    } else {
        DESTDIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR
    }
    MOC_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/moc
    RCC_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/rcc
    LIBS += -L$$OUTPUT_DIR/build/$$SUBDIRPART/bin  #link against library that we test
    INCLUDEPATH *= $$MOC_DIR
    INCLUDEPATH *= $$RCC_DIR

    # Where test plugins go.
    TEST_PLUGIN_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR
}

# Where normal plugins go
PLUGIN_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR

# Add files for deployment
CONTACTS_DEPLOYMENT.sources = $$OUTPUT_DIR/build/$$SUBDIRPART/bin/QtContacts.dll
CONTACTS_DEPLOYMENT.path = /Windows
CONTACTS_PLUGINS_DEPLOYMENT.sources = $$OUTPUT_DIR/build/$$SUBDIRPART/bin/$$PLUGIN_SUBDIR/*.dll
CONTACTS_PLUGINS_DEPLOYMENT.path = ./plugins
DEPLOYMENT += CONTACTS_DEPLOYMENT CONTACTS_PLUGINS_DEPLOYMENT

# Add the output dirs to the link path too
LIBS += -L$$DESTDIR

DEPENDPATH += . $$SOURCE_DIR
INCLUDEPATH += . $$SOURCEDIR


Code fix 6

Code fix 6

HEADERS += \
	mainwindow/mainWindow.h \
	mainwindow/propertyEditorProxyModel.h \
	mainwindow/errorReporter.h \
	mainwindow/gesturesPainterInterface.h \
	mainwindow/gesturesPainterInterface.h \
	mainwindow/buttonRefWindow.h \
	mainwindow/error.h \
	mainwindow/errorListWidget.h \
	mainwindow/mainWindowInterpretersInterface.h \
	mainwindow/helpBrowser.h \
	mainwindow/paletteTree.h

SOURCES += \
	mainwindow/mainWindow.cpp \
	mainwindow/propertyEditorProxyModel.cpp \
	mainwindow/errorReporter.cpp \
	mainwindow/buttonRefWindow.cpp \
	mainwindow/error.cpp \
	mainwindow/errorListWidget.cpp \
	mainwindow/helpBrowser.cpp \
	mainwindow/paletteTree.cpp

FORMS += \
	mainwindow/mainWindow.ui

# Shape editor
HEADERS += \
	mainwindow/shapeEdit/shapeEdit.h \
	mainwindow/shapeEdit/scene.h \
	mainwindow/shapeEdit/arch.h \
	mainwindow/shapeEdit/line.h \
	mainwindow/shapeEdit/item.h \
	mainwindow/shapeEdit/ellipse.h \
	mainwindow/shapeEdit/rectangle.h \
	mainwindow/shapeEdit/text.h \
	mainwindow/shapeEdit/pointPort.h \
	mainwindow/shapeEdit/linePort.h \
	mainwindow/shapeEdit/xmlLoader.h \
	mainwindow/shapeEdit/stylus.h \
	mainwindow/shapeEdit/colorListEditor.h \
	mainwindow/shapeEdit/curve.h \
	mainwindow/shapeEdit/view.h \
	mainwindow/shapeEdit/textPicture.h \
	mainwindow/shapeEdit/path.h \
	mainwindow/shapeEdit/image.h \

SOURCES += \
	mainwindow/shapeEdit/shapeEdit.cpp \
	mainwindow/shapeEdit/scene.cpp \
	mainwindow/shapeEdit/arch.cpp \
	mainwindow/shapeEdit/line.cpp \
	mainwindow/shapeEdit/item.cpp \
	mainwindow/shapeEdit/ellipse.cpp \
	mainwindow/shapeEdit/rectangle.cpp \
	mainwindow/shapeEdit/text.cpp \
	mainwindow/shapeEdit/pointPort.cpp \
	mainwindow/shapeEdit/linePort.cpp \
	mainwindow/shapeEdit/xmlLoader.cpp \
	mainwindow/shapeEdit/stylus.cpp \
	mainwindow/shapeEdit/colorListEditor.cpp \
	mainwindow/shapeEdit/path.cpp \
	mainwindow/shapeEdit/curve.cpp \
	mainwindow/shapeEdit/view.cpp \
	mainwindow/shapeEdit/textPicture.cpp \
	mainwindow/shapeEdit/image.cpp \

FORMS += \
	mainwindow/shapeEdit/shapeEdit.ui \


Fix xcopy problem

Fix xcopy problem

Seems to work differently on appveyor build

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2015 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/>.
#
# Author: Gus Grubba <mavlink@grubba.com>
# -------------------------------------------------

#
#-- Depends on gstreamer, which can be found at: http://gstreamer.freedesktop.org/download/
#

LinuxBuild {
    CONFIG += link_pkgconfig
    packagesExist(gstreamer-1.0) {
        PKGCONFIG   += gstreamer-1.0  gstreamer-video-1.0
        CONFIG      += VideoEnabled
    }
} else:MacBuild {
    #- gstreamer framework installed by the gstreamer devel installer
    GST_ROOT = /Library/Frameworks/GStreamer.framework
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        INCLUDEPATH += $$GST_ROOT/Headers
        LIBS        += -F/Library/Frameworks -framework GStreamer
    }
} else:iOSBuild {
    #- gstreamer framework installed by the gstreamer iOS SDK installer (default to home directory)
    GST_ROOT = $$(HOME)/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        INCLUDEPATH += $$GST_ROOT/Headers
        LIBS        += -F$$(HOME)/Library/Developer/GStreamer/iPhone.sdk -framework GStreamer -liconv -lresolv
    }
} else:WindowsBuild {
    #- gstreamer installed by default under c:/gstreamer
    GST_ROOT = c:/gstreamer/1.0/x86
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled

        LIBS        += -L$$GST_ROOT/lib -lgstreamer-1.0 -lgstvideo-1.0 -lgstbase-1.0
        LIBS        += -lglib-2.0 -lintl -lgobject-2.0

        INCLUDEPATH += \
            $$GST_ROOT/include/gstreamer-1.0 \
            $$GST_ROOT/include/glib-2.0 \
            $$GST_ROOT/lib/gstreamer-1.0/include \
            $$GST_ROOT/lib/glib-2.0/include

        DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
        GST_ROOT_WIN = $$replace(GST_ROOT, "/", "\\")

        # Copy main GStreamer runtime files
        QMAKE_POST_LINK += $$escape_expand(\\n) xcopy \"$$GST_ROOT_WIN\\bin\*.dll\" \"$$DESTDIR_WIN\" /S/Y $$escape_expand(\\n)
        QMAKE_POST_LINK += xcopy \"$$GST_ROOT_WIN\\bin\*.\" \"$$DESTDIR_WIN\" /S/Y $$escape_expand(\\n)

        # Copy GStreamer plugins
        QMAKE_POST_LINK += $$escape_expand(\\n) xcopy \"$$GST_ROOT_WIN\\lib\\gstreamer-1.0\\*.dll\" \"$$DESTDIR_WIN\\gstreamer-plugins\\\" /Y $$escape_expand(\\n)
        QMAKE_POST_LINK += $$escape_expand(\\n) xcopy \"$$GST_ROOT_WIN\\lib\\gstreamer-1.0\\validate\\*.dll\" \"$$DESTDIR_WIN\\gstreamer-plugins\\validate\\\" /Y $$escape_expand(\\n)
    }
} else:AndroidBuild {
    #- gstreamer assumed to be installed in $$PWD/../../android/gstreamer-1.0-android-armv7-1.5.2
    GST_ROOT = $$PWD/../../gstreamer-1.0-android-armv7-1.5.2
    exists($$GST_ROOT) {
        QMAKE_CXXFLAGS  += -pthread
        CONFIG          += VideoEnabled

        # We want to link these plugins statically
        LIBS += -L$$GST_ROOT/lib/gstreamer-1.0/static \
            -lgstvideo-1.0 \
            -lgstcoreelements \
            -lgstudp \
            -lgstrtp \
            -lgstx264 \
            -lgstlibav \
            -lgstvideoparsersbad

        # Rest of GStreamer dependencies
        LIBS += -L$$GST_ROOT/lib \
            -lgstfft-1.0 -lm  \
            -lgstnet-1.0 -lgio-2.0 \
            -lgstaudio-1.0 -lgstcodecparsers-1.0 -lgstbase-1.0 \
            -lgstreamer-1.0 -lgsttag-1.0 -lgstrtp-1.0 -lgstpbutils-1.0 \
            -lgstvideo-1.0 -lavformat -lavcodec -lavresample -lavutil -lx264 \
            -lbz2 -lgobject-2.0 \
            -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lorc-0.4 -liconv -lffi -lintl

        INCLUDEPATH += \
            $$GST_ROOT/include/gstreamer-1.0 \
            $$GST_ROOT/lib/gstreamer-1.0/include \
            $$GST_ROOT/include/glib-2.0 \
            $$GST_ROOT/lib/glib-2.0/include
    }
}

VideoEnabled {

    message("Including support for video streaming")

    DEFINES += \
        QGC_GST_STREAMING \
        GST_PLUGIN_BUILD_STATIC \
        QTGLVIDEOSINK_NAME=qt5glvideosink \
        QGC_VIDEOSINK_PLUGIN=qt5videosink

    INCLUDEPATH += \
        $$PWD/gstqtvideosink \
        $$PWD/gstqtvideosink/delegates \
        $$PWD/gstqtvideosink/painters \
        $$PWD/gstqtvideosink/utils \

    #-- QtGstreamer (gutted to our needs)

    HEADERS += \
        $$PWD/gstqtvideosink/delegates/basedelegate.h \
        $$PWD/gstqtvideosink/delegates/qtquick2videosinkdelegate.h \
        $$PWD/gstqtvideosink/delegates/qtvideosinkdelegate.h \
        $$PWD/gstqtvideosink/delegates/qwidgetvideosinkdelegate.h \
        $$PWD/gstqtvideosink/gstqtglvideosink.h \
        $$PWD/gstqtvideosink/gstqtglvideosinkbase.h \
        $$PWD/gstqtvideosink/gstqtquick2videosink.h \
        $$PWD/gstqtvideosink/gstqtvideosink.h \
        $$PWD/gstqtvideosink/gstqtvideosinkbase.h \
        $$PWD/gstqtvideosink/gstqtvideosinkmarshal.h \
        $$PWD/gstqtvideosink/gstqtvideosinkplugin.h \
        $$PWD/gstqtvideosink/gstqwidgetvideosink.h \
        $$PWD/gstqtvideosink/painters/abstractsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/genericsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/openglsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/videomaterial.h \
        $$PWD/gstqtvideosink/painters/videonode.h \
        $$PWD/gstqtvideosink/utils/bufferformat.h \
        $$PWD/gstqtvideosink/utils/utils.h \
        $$PWD/gstqtvideosink/utils/glutils.h \

    SOURCES += \
        $$PWD/gstqtvideosink/delegates/basedelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qtvideosinkdelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qwidgetvideosinkdelegate.cpp \
        $$PWD/gstqtvideosink/gstqtglvideosink.cpp \
        $$PWD/gstqtvideosink/gstqtglvideosinkbase.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkmarshal.c \
        $$PWD/gstqtvideosink/gstqtquick2videosink.cpp \
        $$PWD/gstqtvideosink/gstqtvideosink.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkbase.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkplugin.cpp \
        $$PWD/gstqtvideosink/gstqwidgetvideosink.cpp \
        $$PWD/gstqtvideosink/painters/genericsurfacepainter.cpp \
        $$PWD/gstqtvideosink/painters/openglsurfacepainter.cpp \
        $$PWD/gstqtvideosink/painters/videomaterial.cpp \
        $$PWD/gstqtvideosink/painters/videonode.cpp \
        $$PWD/gstqtvideosink/utils/bufferformat.cpp \
        $$PWD/gstqtvideosink/utils/utils.cpp \

} else {
    LinuxBuild|MacBuild|iOSBuild|WindowsBuild|AndroidBuild {
        message("Skipping support for video streaming (GStreamer libraries not installed)")
        MacBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/osx/")
            message("  Select the devel package and install it (gstreamer-1.0-devel-1.x.x-x86_64.pkg)")
            message("  It will be installed in /Libraries/Frameworks")
        }
        LinuxBuild {
            message("  You can install it using apt-get")
            message("  sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-0:amd64 libgstreamer1.0-dev")
        }
        WindowsBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/windows/")
            message("  Select the devel AND runtime packages and install them (x86, not the 64-Bit)")
            message("  It will be installed in C:/gstreamer. You need to update you PATH to point to the bin directory.")
        }
        AndroidBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/android/")
            message("  Uncompress the archive into the qgc root source directory (same directory where qgroundcontrol.pro is found.")
        }
    } else {
        message("Skipping support for video streaming (Unsupported platform)")
    }
}

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2015 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/>.
#
# Author: Gus Grubba <mavlink@grubba.com>
# -------------------------------------------------

#
#-- Depends on gstreamer, which can be found at: http://gstreamer.freedesktop.org/download/
#

LinuxBuild {
    CONFIG += link_pkgconfig
    packagesExist(gstreamer-1.0) {
        PKGCONFIG   += gstreamer-1.0  gstreamer-video-1.0
        CONFIG      += VideoEnabled
    }
} else:MacBuild {
    #- gstreamer framework installed by the gstreamer devel installer
    GST_ROOT = /Library/Frameworks/GStreamer.framework
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        INCLUDEPATH += $$GST_ROOT/Headers
        LIBS        += -F/Library/Frameworks -framework GStreamer
    }
} else:iOSBuild {
    #- gstreamer framework installed by the gstreamer iOS SDK installer (default to home directory)
    GST_ROOT = $$(HOME)/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        INCLUDEPATH += $$GST_ROOT/Headers
        LIBS        += -F$$(HOME)/Library/Developer/GStreamer/iPhone.sdk -framework GStreamer -liconv -lresolv
    }
} else:WindowsBuild {
    #- gstreamer installed by default under c:/gstreamer
    GST_ROOT = c:/gstreamer/1.0/x86
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled

        LIBS        += -L$$GST_ROOT/lib -lgstreamer-1.0 -lgstvideo-1.0 -lgstbase-1.0
        LIBS        += -lglib-2.0 -lintl -lgobject-2.0

        INCLUDEPATH += \
            $$GST_ROOT/include/gstreamer-1.0 \
            $$GST_ROOT/include/glib-2.0 \
            $$GST_ROOT/lib/gstreamer-1.0/include \
            $$GST_ROOT/lib/glib-2.0/include

        DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
        GST_ROOT_WIN = $$replace(GST_ROOT, "/", "\\")

        # Copy main GStreamer runtime files
        QMAKE_POST_LINK += $$escape_expand(\\n) xcopy \"$$GST_ROOT_WIN\\bin\*.dll\" \"$$DESTDIR_WIN\" /S/Y $$escape_expand(\\n)
        QMAKE_POST_LINK += xcopy \"$$GST_ROOT_WIN\\bin\*.\" \"$$DESTDIR_WIN\" /S/Y $$escape_expand(\\n)

        # Copy GStreamer plugins
        QMAKE_POST_LINK += $$escape_expand(\\n) xcopy \"$$GST_ROOT_WIN\\lib\\gstreamer-1.0\\*.dll\" \"$$DESTDIR_WIN\\gstreamer-plugins\\\" /S/Y $$escape_expand(\\n)
    }
} else:AndroidBuild {
    #- gstreamer assumed to be installed in $$PWD/../../android/gstreamer-1.0-android-armv7-1.5.2
    GST_ROOT = $$PWD/../../gstreamer-1.0-android-armv7-1.5.2
    exists($$GST_ROOT) {
        QMAKE_CXXFLAGS  += -pthread
        CONFIG          += VideoEnabled

        # We want to link these plugins statically
        LIBS += -L$$GST_ROOT/lib/gstreamer-1.0/static \
            -lgstvideo-1.0 \
            -lgstcoreelements \
            -lgstudp \
            -lgstrtp \
            -lgstx264 \
            -lgstlibav \
            -lgstvideoparsersbad

        # Rest of GStreamer dependencies
        LIBS += -L$$GST_ROOT/lib \
            -lgstfft-1.0 -lm  \
            -lgstnet-1.0 -lgio-2.0 \
            -lgstaudio-1.0 -lgstcodecparsers-1.0 -lgstbase-1.0 \
            -lgstreamer-1.0 -lgsttag-1.0 -lgstrtp-1.0 -lgstpbutils-1.0 \
            -lgstvideo-1.0 -lavformat -lavcodec -lavresample -lavutil -lx264 \
            -lbz2 -lgobject-2.0 \
            -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lorc-0.4 -liconv -lffi -lintl

        INCLUDEPATH += \
            $$GST_ROOT/include/gstreamer-1.0 \
            $$GST_ROOT/lib/gstreamer-1.0/include \
            $$GST_ROOT/include/glib-2.0 \
            $$GST_ROOT/lib/glib-2.0/include
    }
}

VideoEnabled {

    message("Including support for video streaming")

    DEFINES += \
        QGC_GST_STREAMING \
        GST_PLUGIN_BUILD_STATIC \
        QTGLVIDEOSINK_NAME=qt5glvideosink \
        QGC_VIDEOSINK_PLUGIN=qt5videosink

    INCLUDEPATH += \
        $$PWD/gstqtvideosink \
        $$PWD/gstqtvideosink/delegates \
        $$PWD/gstqtvideosink/painters \
        $$PWD/gstqtvideosink/utils \

    #-- QtGstreamer (gutted to our needs)

    HEADERS += \
        $$PWD/gstqtvideosink/delegates/basedelegate.h \
        $$PWD/gstqtvideosink/delegates/qtquick2videosinkdelegate.h \
        $$PWD/gstqtvideosink/delegates/qtvideosinkdelegate.h \
        $$PWD/gstqtvideosink/delegates/qwidgetvideosinkdelegate.h \
        $$PWD/gstqtvideosink/gstqtglvideosink.h \
        $$PWD/gstqtvideosink/gstqtglvideosinkbase.h \
        $$PWD/gstqtvideosink/gstqtquick2videosink.h \
        $$PWD/gstqtvideosink/gstqtvideosink.h \
        $$PWD/gstqtvideosink/gstqtvideosinkbase.h \
        $$PWD/gstqtvideosink/gstqtvideosinkmarshal.h \
        $$PWD/gstqtvideosink/gstqtvideosinkplugin.h \
        $$PWD/gstqtvideosink/gstqwidgetvideosink.h \
        $$PWD/gstqtvideosink/painters/abstractsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/genericsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/openglsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/videomaterial.h \
        $$PWD/gstqtvideosink/painters/videonode.h \
        $$PWD/gstqtvideosink/utils/bufferformat.h \
        $$PWD/gstqtvideosink/utils/utils.h \
        $$PWD/gstqtvideosink/utils/glutils.h \

    SOURCES += \
        $$PWD/gstqtvideosink/delegates/basedelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qtvideosinkdelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qwidgetvideosinkdelegate.cpp \
        $$PWD/gstqtvideosink/gstqtglvideosink.cpp \
        $$PWD/gstqtvideosink/gstqtglvideosinkbase.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkmarshal.c \
        $$PWD/gstqtvideosink/gstqtquick2videosink.cpp \
        $$PWD/gstqtvideosink/gstqtvideosink.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkbase.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkplugin.cpp \
        $$PWD/gstqtvideosink/gstqwidgetvideosink.cpp \
        $$PWD/gstqtvideosink/painters/genericsurfacepainter.cpp \
        $$PWD/gstqtvideosink/painters/openglsurfacepainter.cpp \
        $$PWD/gstqtvideosink/painters/videomaterial.cpp \
        $$PWD/gstqtvideosink/painters/videonode.cpp \
        $$PWD/gstqtvideosink/utils/bufferformat.cpp \
        $$PWD/gstqtvideosink/utils/utils.cpp \

} else {
    LinuxBuild|MacBuild|iOSBuild|WindowsBuild|AndroidBuild {
        message("Skipping support for video streaming (GStreamer libraries not installed)")
        MacBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/osx/")
            message("  Select the devel package and install it (gstreamer-1.0-devel-1.x.x-x86_64.pkg)")
            message("  It will be installed in /Libraries/Frameworks")
        }
        LinuxBuild {
            message("  You can install it using apt-get")
            message("  sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-0:amd64 libgstreamer1.0-dev")
        }
        WindowsBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/windows/")
            message("  Select the devel AND runtime packages and install them (x86, not the 64-Bit)")
            message("  It will be installed in C:/gstreamer. You need to update you PATH to point to the bin directory.")
        }
        AndroidBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/android/")
            message("  Uncompress the archive into the qgc root source directory (same directory where qgroundcontrol.pro is found.")
        }
    } else {
        message("Skipping support for video streaming (Unsupported platform)")
    }
}


Switch YouTubeDL to python3.

Switch YouTubeDL to python3.

# Copyright (c) 2015 Piotr Tworek. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE.YTPlayer file.

_SRC = $$PWD/youtube-dl
_BUILD_DIR = $$top_builddir/build-ytdl
_PYTHON='$$LITERAL_HASH!/usr/bin/env python3'

ytdl.target = youtube-dl
ytdl.commands = \
    cd $$_SRC && \
    touch README.txt youtube-dl.1 youtube-dl.fish youtube-dl.bash-completion && \
    python3 setup.py build_py --quiet --compile -O2 --build-lib $$_BUILD_DIR && \
    cd $$_BUILD_DIR && \
    find youtube_dl -type f -name '*.pyo' -delete && \
    zip --quiet -r youtube-dl youtube_dl/ && \
    zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py && \
    echo \\"$$_PYTHON\\" > youtube-dl && \
    cat youtube-dl.zip >> youtube-dl && \
    chmod +x youtube-dl; \
    rm -f youtube-dl.zip
ytdl.depends = $$_SRC/youtube_dl/version.py

QMAKE_EXTRA_TARGETS += ytdl
PRE_TARGETDEPS += youtube-dl

ytdl.files = $$files($$_BUILD_DIR/youtube-dl)
ytdl.path = /usr/share/$${TARGET}/bin

INSTALLS += ytdl

# Copyright (c) 2015 Piotr Tworek. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE.YTPlayer file.

_SRC = $$PWD/youtube-dl
_BUILD_DIR = $$top_builddir/build-ytdl
_PYTHON='$$LITERAL_HASH!/usr/bin/env python'

ytdl.target = youtube-dl
ytdl.commands = \
    cd $$_SRC && \
    touch README.txt youtube-dl.1 youtube-dl.fish youtube-dl.bash-completion && \
    python setup.py build_py --quiet --compile -O2 --build-lib $$_BUILD_DIR && \
    cd $$_BUILD_DIR && \
    zip --quiet youtube-dl youtube_dl/*.pyo youtube_dl/*/*.pyo && \
    zip --quiet --junk-paths youtube-dl youtube_dl/__main__.pyo && \
    echo \\"$$_PYTHON\\" > youtube-dl && \
    cat youtube-dl.zip >> youtube-dl && \
    chmod +x youtube-dl && \
    rm youtube-dl.zip
ytdl.depends = $$_SRC/youtube_dl/version.py

QMAKE_EXTRA_TARGETS += ytdl
PRE_TARGETDEPS += youtube-dl

ytdl.files = $$files($$_BUILD_DIR/youtube-dl)
ytdl.path = /usr/share/$${TARGET}/bin

INSTALLS += ytdl


fix build

fix build

the usage of declarative makes our code use opengl-private even without
opengl itself being used.

INCLUDEPATH += $$PWD

HEADERS += \
    $$PWD/waylandcompositor.h \
    $$PWD/waylandsurface.h

SOURCES += \
    $$PWD/waylandcompositor.cpp \
    $$PWD/waylandsurface.cpp

contains(QT, declarative) {
    SOURCES += $$PWD/waylandsurfaceitem.cpp
    HEADERS += $$PWD/waylandsurfaceitem.h

   DEFINES += QT_COMPOSITOR_DECLARATIVE
}

!isEmpty(QT.core.MAJOR_VERSION):greaterThan(QT.core.MAJOR_VERSION, 4) {
    QT += core-private
    if(contains(QT, opengl)|contains(QT, declarative)):QT += opengl-private gui-private
}

INCLUDEPATH += $$PWD

HEADERS += \
    $$PWD/waylandcompositor.h \
    $$PWD/waylandsurface.h

SOURCES += \
    $$PWD/waylandcompositor.cpp \
    $$PWD/waylandsurface.cpp

contains(QT, declarative) {
    SOURCES += $$PWD/waylandsurfaceitem.cpp
    HEADERS += $$PWD/waylandsurfaceitem.h

   DEFINES += QT_COMPOSITOR_DECLARATIVE
}

!isEmpty(QT.core.MAJOR_VERSION):greaterThan(QT.core.MAJOR_VERSION, 4) {
    QT += core-private
    contains(QT, opengl):QT += opengl-private gui-private
}


Fix build macos version with v8 js engine

core_mac {
    !use_v8:CONFIG += use_javascript_core
}
core_ios {
    CONFIG += use_javascript_core
}

INCLUDEPATH += $$PWD

HEADERS += $$PWD/js_base.h

HEADERS += $$PWD/js_logger.h
SOURCES += $$PWD/js_logger.cpp

!use_javascript_core {

    HEADERS += $$PWD/v8/v8_base.h
    SOURCES += $$PWD/v8/v8_base.cpp

    !build_xp {
        include($$PWD/../../../Common/3dParty/v8/v8.pri)
    } else {
        DEFINES += V8_OS_XP
        include($$PWD/../../../Common/3dParty/v8/v8_xp/v8.pri)
    }

    v8_use_inspector {
        #define
        DEFINES += V8_INSPECTOR

        #paths
        V8_INSPECTOR_PATH = $$PWD/v8/inspector

        #inspector files
        HEADERS += \
            $$V8_INSPECTOR_PATH/channel.h \
            $$V8_INSPECTOR_PATH/client.h \
            $$V8_INSPECTOR_PATH/inspector_impl.h \
            $$V8_INSPECTOR_PATH/singleconnectionserver.h \
            $$V8_INSPECTOR_PATH/singlethreadutils.h \
            $$V8_INSPECTOR_PATH/inspector_pool.h \
            $$V8_INSPECTOR_PATH/inspector_interface.h

        SOURCES += \
            $$V8_INSPECTOR_PATH/channel.cpp \
            $$V8_INSPECTOR_PATH/client.cpp \
            $$V8_INSPECTOR_PATH/inspector_impl.cpp \
            $$V8_INSPECTOR_PATH/singleconnectionserver.cpp \
            $$V8_INSPECTOR_PATH/singlethreadutils.cpp \
            $$V8_INSPECTOR_PATH/inspector_pool.cpp \
            $$V8_INSPECTOR_PATH/inspector_interface.cpp

        #to include inspector files
        INCLUDEPATH += \
            $$V8_INSPECTOR_PATH

        #inspector lib
        !use_v8_monolith {
            LIBS += -L$$CORE_V8_PATH_LIBS/src/inspector -linspector
        }

        #boost
        CONFIG += core_boost_date_time
        include($$PWD/../../../Common/3dParty/boost/boost.pri)
    }

}

use_javascript_core {

    HEADERS += $$PWD/jsc/jsc_base.h
    OBJECTIVE_SOURCES += $$PWD/jsc/jsc_base.mm
    QMAKE_OBJECTIVE_CFLAGS += -fobjc-arc -fobjc-weak

    LIBS += -framework JavaScriptCore

}

core_mac {
    CONFIG += use_javascript_core
}
core_ios {
    CONFIG += use_javascript_core
}

INCLUDEPATH += $$PWD

HEADERS += $$PWD/js_base.h

HEADERS += $$PWD/js_logger.h
SOURCES += $$PWD/js_logger.cpp

!use_javascript_core {

    HEADERS += $$PWD/v8/v8_base.h
    SOURCES += $$PWD/v8/v8_base.cpp

    !build_xp {
        include($$PWD/../../../Common/3dParty/v8/v8.pri)
    } else {
        DEFINES += V8_OS_XP
        include($$PWD/../../../Common/3dParty/v8/v8_xp/v8.pri)
    }

    v8_use_inspector {
        #define
        DEFINES += V8_INSPECTOR

        #paths
        V8_INSPECTOR_PATH = $$PWD/v8/inspector

        #inspector files
        HEADERS += \
            $$V8_INSPECTOR_PATH/channel.h \
            $$V8_INSPECTOR_PATH/client.h \
            $$V8_INSPECTOR_PATH/inspector_impl.h \
            $$V8_INSPECTOR_PATH/singleconnectionserver.h \
            $$V8_INSPECTOR_PATH/singlethreadutils.h \
            $$V8_INSPECTOR_PATH/inspector_pool.h \
            $$V8_INSPECTOR_PATH/inspector_interface.h

        SOURCES += \
            $$V8_INSPECTOR_PATH/channel.cpp \
            $$V8_INSPECTOR_PATH/client.cpp \
            $$V8_INSPECTOR_PATH/inspector_impl.cpp \
            $$V8_INSPECTOR_PATH/singleconnectionserver.cpp \
            $$V8_INSPECTOR_PATH/singlethreadutils.cpp \
            $$V8_INSPECTOR_PATH/inspector_pool.cpp \
            $$V8_INSPECTOR_PATH/inspector_interface.cpp

        #to include inspector files
        INCLUDEPATH += \
            $$V8_INSPECTOR_PATH

        #inspector lib
        !use_v8_monolith {
            LIBS += -L$$CORE_V8_PATH_LIBS/src/inspector -linspector
        }

        #boost
        CONFIG += core_boost_date_time
        include($$PWD/../../../Common/3dParty/boost/boost.pri)
    }

}

use_javascript_core {

    HEADERS += $$PWD/jsc/jsc_base.h
    OBJECTIVE_SOURCES += $$PWD/jsc/jsc_base.mm
    QMAKE_OBJECTIVE_CFLAGS += -fobjc-arc -fobjc-weak

    LIBS += -framework JavaScriptCore

}


Fixed library extension win32 selection #5

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

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

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

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

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

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

        macx {
            frameworks += $$files($${OUTDIR}/$${LIBNAME}.framework)
            LIBS += -F$${OUTDIR}/ -framework $${LIBNAME}
            PRE_TARGETDEPS += $${OUTDIR}/$${LIBNAME}.framework
            INCLUDEPATH += -F$${LIBDIR}
        }
        win32 {
            LIBS += $${OUTDIR}/release/$${LIBNAME}.$${LIB_EXTENSION}
            PRE_TARGETDEPS += $${OUTDIR}/release/$${LIBNAME}.$${LIB_EXTENSION}
        }
        else {
            LIBS += -L$${OUTDIR}/ -l$${LIBNAME}
            PRE_TARGETDEPS += $${OUTDIR}/lib$${LIBNAME}.$${LIB_EXTENSION}
            QMAKE_LFLAGS += "-Wl,-rpath,\'$$OUTDIR\'"
        }
    }
}

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

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

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

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

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

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

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

        macx {
            frameworks += $$files($${OUTDIR}/$${LIBNAME}.framework)
            LIBS += -F$${OUTDIR}/ -framework $${LIBNAME}
            PRE_TARGETDEPS += $${OUTDIR}/$${LIBNAME}.framework
            INCLUDEPATH += -F$${LIBDIR}
        }
        win32 {
            LIBS += $${OUTDIR}/release/$${LIBNAME}.$${LIB_EXTENSION}
            PRE_TARGETDEPS += $${OUTDIR}/release/$${LIBNAME}.$${LIB_EXTENSION}
        }
        else {
            LIBS += -L$${OUTDIR}/ -l$${LIBNAME}
            PRE_TARGETDEPS += $${OUTDIR}/lib$${LIBNAME}.$${LIB_EXTENSION}
            QMAKE_LFLAGS += "-Wl,-rpath,\'$$OUTDIR\'"
        }
    }
}

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


Strip debug symbols after extracting them for CONFIG+=symbol for macx.

CONFIG(symbols):macx {
	CONFIG(debug, debug|release) {
		DSYM_DESTDIR = $${PWD}/debug
	}

	CONFIG(release, debug|release) {
		DSYM_DESTDIR = $${PWD}/release
	}

	contains(TEMPLATE, 'app') {
		DSYM_TARGET_FULLPATH = ${TARGET}
		DSYM_OUT = $${DSYM_DESTDIR}/symbols/${QMAKE_TARGET}.dSYM
		CONFIG(app_bundle) {
			DSYM_OUT = $${DSYM_DESTDIR}/symbols/${QMAKE_TARGET}.app.dSYM
		}
	}

	contains(TEMPLATE, 'lib') {
		DSYM_TARGET_FULLPATH = $${DESTDIR}/${TARGET}
		DSYM_OUT = $${DSYM_DESTDIR}/symbols/${TARGET}.dSYM
	}

	dsym.target = $${DSYM_OUT}
	dsym.commands = $(MKDIR) $${DSYM_DESTDIR}/symbols/ && dsymutil $${DSYM_TARGET_FULLPATH} -o $${DSYM_OUT}
	dsym.depends = $${DSYM_TARGET_FULLPATH}
	dsym.CONFIG = recursive
	QMAKE_EXTRA_TARGETS *= dsym
	QMAKE_DISTCLEAN *= $${DSYM_OUT}

	strip.target = stripdebug
	strip.commands = strip -S $${DSYM_TARGET_FULLPATH}
	strip.depends = $${DSYM_OUT}
	strip.CONFIG = recursive
	QMAKE_EXTRA_TARGETS *= strip

	!CONFIG(staticlib) {
		ALL_DEPS += $${DSYM_OUT} stripdebug
	}
}

CONFIG(symbols):macx {
	CONFIG(debug, debug|release) {
		DSYM_DESTDIR = $${PWD}/debug
	}

	CONFIG(release, debug|release) {
		DSYM_DESTDIR = $${PWD}/release
	}

	contains(TEMPLATE, 'app') {
		DSYM_TARGET_FULLPATH = ${TARGET}
		DSYM_OUT = $${DSYM_DESTDIR}/symbols/${QMAKE_TARGET}.dSYM
		CONFIG(app_bundle) {
			DSYM_OUT = $${DSYM_DESTDIR}/symbols/${QMAKE_TARGET}.app.dSYM
		}
	}

	contains(TEMPLATE, 'lib') {
		DSYM_TARGET_FULLPATH = $${DESTDIR}/${TARGET}
		DSYM_OUT = $${DSYM_DESTDIR}/symbols/${TARGET}.dSYM
	}

	dsym.target = $${DSYM_OUT}
	dsym.commands = $(MKDIR) $${DSYM_DESTDIR}/symbols/ && dsymutil $${DSYM_TARGET_FULLPATH} -o $${DSYM_OUT}
	dsym.depends = $${DSYM_TARGET_FULLPATH}
	dsym.CONFIG = recursive
	QMAKE_EXTRA_TARGETS *= dsym
	QMAKE_DISTCLEAN *= $${DSYM_OUT}

	!CONFIG(staticlib) {
		ALL_DEPS += $${DSYM_OUT}
	}
}


replace platform conditional with QMAKE_DIRLIST_SEP

Change-Id: I2646a2c30573417ba9da4b57b100d33144cef349
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@digia.com>

isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR)
LLVM_INSTALL_DIR ~= s,\\\\,/,g

DEFINES += CLANG_COMPLETION
DEFINES += CLANG_HIGHLIGHTING
#DEFINES += CLANG_INDEXING

defineReplace(findLLVMConfig) {
    LLVM_CONFIG_VARIANTS = \
        llvm-config llvm-config-3.2 llvm-config-3.3 llvm-config-3.4 \
        llvm-config-3.5 llvm-config-3.6 llvm-config-4.0 llvm-config-4.1

    # Prefer llvm-config* from LLVM_INSTALL_DIR
    !isEmpty(LLVM_INSTALL_DIR) {
        for(variant, LLVM_CONFIG_VARIANTS) {
            variant=$$LLVM_INSTALL_DIR/bin/$$variant
            exists($$variant) {
                return($$variant)
            }
        }
    }

    # Find llvm-config* in PATH
    ENV_PATH = $$(PATH)
    ENV_PATH = $$split(ENV_PATH, $$QMAKE_DIRLIST_SEP)
    for(variant, LLVM_CONFIG_VARIANTS) {
        for(path, ENV_PATH) {
            subvariant = $$path/$$variant
            exists($$subvariant) {
                return($$subvariant)
            }
        }
    }

    # Fallback
    return(llvm-config)
}

win32 {
    LLVM_INCLUDEPATH = $$LLVM_INSTALL_DIR/include
    exists ($${LLVM_INSTALL_DIR}/lib/clang.*) {
        CLANG_LIB = clang
    } else {
        exists ($${LLVM_INSTALL_DIR}/lib/libclang.*) {
            CLANG_LIB = libclang
        } else {
            error("Cannot find Clang shared library!")
        }
    }
    LLVM_LIBDIR = $$LLVM_INSTALL_DIR/lib
    LLVM_LIBS = \
        -L$$LLVM_INSTALL_DIR/bin \
        -L$$LLVM_LIBDIR \
        -l$${CLANG_LIB}
    LLVM_LIBS += -ladvapi32 -lshell32
    LLVM_VERSION = 3.4
}

unix {
    LLVM_CONFIG = $$findLLVMConfig()

    LLVM_VERSION = $$system($$LLVM_CONFIG --version)
    LLVM_VERSION = $$replace(LLVM_VERSION, ^(\\d+\\.\\d+).*$, \\1)
    message("... version $$LLVM_VERSION")

    LLVM_INCLUDEPATH = $$system($$LLVM_CONFIG --includedir)
    isEmpty(LLVM_INCLUDEPATH):LLVM_INCLUDEPATH=$$LLVM_INSTALL_DIR/include
    LLVM_LIBDIR = $$system($$LLVM_CONFIG --libdir)
    isEmpty(LLVM_LIBDIR):LLVM_LIBDIR=$$LLVM_INSTALL_DIR/lib

    exists ($${LLVM_LIBDIR}/libclang.*) {
        #message("LLVM was build with autotools")
        CLANG_LIB = clang
    } else {
        exists ($${LLVM_LIBDIR}/liblibclang.*) {
            #message("LLVM was build with CMake")
            CLANG_LIB = libclang
        } else {
            exists ($${LLVM_INSTALL_DIR}/lib/libclang.*) {
                #message("libclang placed separately from LLVM")
                CLANG_LIB = clang
                LLVM_LIBDIR = $${LLVM_INSTALL_DIR}/lib
                LLVM_INCLUDEPATH=$${LLVM_INSTALL_DIR}/include
            } else {
                error("Cannot find Clang shared library!")
            }
        }
    }

    LLVM_LIBS = -L$${LLVM_LIBDIR}
    LLVM_LIBS += -l$${CLANG_LIB}
}

DEFINES += CLANG_VERSION=\\\"$${LLVM_VERSION}\\\"
DEFINES += "\"CLANG_RESOURCE_DIR=\\\"$${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include\\\"\""

isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR)
LLVM_INSTALL_DIR ~= s,\\\\,/,g

DEFINES += CLANG_COMPLETION
DEFINES += CLANG_HIGHLIGHTING
#DEFINES += CLANG_INDEXING

defineReplace(findLLVMConfig) {
    LLVM_CONFIG_VARIANTS = \
        llvm-config llvm-config-3.2 llvm-config-3.3 llvm-config-3.4 \
        llvm-config-3.5 llvm-config-3.6 llvm-config-4.0 llvm-config-4.1

    # Prefer llvm-config* from LLVM_INSTALL_DIR
    !isEmpty(LLVM_INSTALL_DIR) {
        for(variant, LLVM_CONFIG_VARIANTS) {
            variant=$$LLVM_INSTALL_DIR/bin/$$variant
            exists($$variant) {
                return($$variant)
            }
        }
    }

    # Find llvm-config* in PATH
    ENV_PATH = $$(PATH)
    win32 {
        ENV_PATH = $$split(ENV_PATH, ;)
    } else {
        ENV_PATH = $$split(ENV_PATH, :)
    }
    for(variant, LLVM_CONFIG_VARIANTS) {
        for(path, ENV_PATH) {
            subvariant = $$path/$$variant
            exists($$subvariant) {
                return($$subvariant)
            }
        }
    }

    # Fallback
    return(llvm-config)
}

win32 {
    LLVM_INCLUDEPATH = $$LLVM_INSTALL_DIR/include
    exists ($${LLVM_INSTALL_DIR}/lib/clang.*) {
        CLANG_LIB = clang
    } else {
        exists ($${LLVM_INSTALL_DIR}/lib/libclang.*) {
            CLANG_LIB = libclang
        } else {
            error("Cannot find Clang shared library!")
        }
    }
    LLVM_LIBDIR = $$LLVM_INSTALL_DIR/lib
    LLVM_LIBS = \
        -L$$LLVM_INSTALL_DIR/bin \
        -L$$LLVM_LIBDIR \
        -l$${CLANG_LIB}
    LLVM_LIBS += -ladvapi32 -lshell32
    LLVM_VERSION = 3.4
}

unix {
    LLVM_CONFIG = $$findLLVMConfig()

    LLVM_VERSION = $$system($$LLVM_CONFIG --version)
    LLVM_VERSION = $$replace(LLVM_VERSION, ^(\\d+\\.\\d+).*$, \\1)
    message("... version $$LLVM_VERSION")

    LLVM_INCLUDEPATH = $$system($$LLVM_CONFIG --includedir)
    isEmpty(LLVM_INCLUDEPATH):LLVM_INCLUDEPATH=$$LLVM_INSTALL_DIR/include
    LLVM_LIBDIR = $$system($$LLVM_CONFIG --libdir)
    isEmpty(LLVM_LIBDIR):LLVM_LIBDIR=$$LLVM_INSTALL_DIR/lib

    exists ($${LLVM_LIBDIR}/libclang.*) {
        #message("LLVM was build with autotools")
        CLANG_LIB = clang
    } else {
        exists ($${LLVM_LIBDIR}/liblibclang.*) {
            #message("LLVM was build with CMake")
            CLANG_LIB = libclang
        } else {
            exists ($${LLVM_INSTALL_DIR}/lib/libclang.*) {
                #message("libclang placed separately from LLVM")
                CLANG_LIB = clang
                LLVM_LIBDIR = $${LLVM_INSTALL_DIR}/lib
                LLVM_INCLUDEPATH=$${LLVM_INSTALL_DIR}/include
            } else {
                error("Cannot find Clang shared library!")
            }
        }
    }

    LLVM_LIBS = -L$${LLVM_LIBDIR}
    LLVM_LIBS += -l$${CLANG_LIB}
}

DEFINES += CLANG_VERSION=\\\"$${LLVM_VERSION}\\\"
DEFINES += "\"CLANG_RESOURCE_DIR=\\\"$${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include\\\"\""


QMake build: Remove pwd include from operations.pri

The new build setup matches CMake one

INCLUDEPATH += $$PWD

SOURCES += $$PWD/*.cpp
HEADERS += $$PWD/*.hpp


rcc.pri: escape backslahes.

rcc.pri: escape backslahes.

# Copyright 2005-2016 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

# Use a custom tool to query for RCC dependencies.
# Qt's regular invocation of "rcc -list" doesn't work with
# .qrc files that contain references to non-existent files.
# Our .qrc files do that, because we auto-generate some of
# the files at make-time.

# Override RCC_DIR to be 'debug' or 'release'.
# We have to do this because we're loading the
# 'resources' feature a bit earlier than usual.
# By default, Qt would have set these itself.
CONFIG(debug, debug|release) {
	RCC_DIR = debug
}
CONFIG(release, debug|release) {
	RCC_DIR = release
}

load(resources)

win32 {
	WINPWD = $$shell_path($${PWD})
	RCC_DEPENDS = $$escape_expand(\")$${WINPWD}\\scripts\\rcc-depends.py$$escape_expand(\")
	rcc.depend_command = python $${RCC_DEPENDS} ${QMAKE_FILE_IN}
} else {
	RCC_DEPENDS = $$escape_expand(\")$${PWD}/scripts/rcc-depends.py$$escape_expand(\")
	rcc.depend_command = $${RCC_DEPENDS} ${QMAKE_FILE_IN}
}

# Copyright 2005-2016 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

# Use a custom tool to query for RCC dependencies.
# Qt's regular invocation of "rcc -list" doesn't work with
# .qrc files that contain references to non-existent files.
# Our .qrc files do that, because we auto-generate some of
# the files at make-time.

# Override RCC_DIR to be 'debug' or 'release'.
# We have to do this because we're loading the
# 'resources' feature a bit earlier than usual.
# By default, Qt would have set these itself.
CONFIG(debug, debug|release) {
	RCC_DIR = debug
}
CONFIG(release, debug|release) {
	RCC_DIR = release
}

load(resources)

win32 {
	WINPWD = $$shell_path($${PWD})
	RCC_DEPENDS = $$escape_expand(\")$${WINPWD}\scripts\rcc-depends.py$$escape_expand(\")
	rcc.depend_command = python $${RCC_DEPENDS} ${QMAKE_FILE_IN}
} else {
	RCC_DEPENDS = $$escape_expand(\")$${PWD}/scripts/rcc-depends.py$$escape_expand(\")
	rcc.depend_command = $${RCC_DEPENDS} ${QMAKE_FILE_IN}
}


added new files to js_base.pri

added new files to js_base.pri

core_mac {
    CONFIG += use_javascript_core
}
core_ios {
    CONFIG += use_javascript_core
}

INCLUDEPATH += $$PWD

HEADERS += $$PWD/js_base.h

!use_javascript_core {

    HEADERS += $$PWD/v8/v8_base.h
    SOURCES += $$PWD/v8/v8_base.cpp
    include($$PWD/../../../Common/3dParty/v8/v8.pri)

    v8_use_inspector {
        #define
        DEFINES += V8_INSPECTOR

        #paths
        V8_INSPECTOR_PATH = $$PWD/v8/inspector

        #inspector files
        HEADERS += \
            $$V8_INSPECTOR_PATH/channel.h \
            $$V8_INSPECTOR_PATH/client.h \
            $$V8_INSPECTOR_PATH/execution_data.h \
            $$V8_INSPECTOR_PATH/inspector.h \
            $$V8_INSPECTOR_PATH/inspector_impl.h \
            $$V8_INSPECTOR_PATH/inspectorinfo.h \
            $$V8_INSPECTOR_PATH/inspectormanager.h \
            $$V8_INSPECTOR_PATH/scriptholder.h \
            $$V8_INSPECTOR_PATH/singleconnectionserver.h \
            $$V8_INSPECTOR_PATH/singlethreadutils.h

        SOURCES += \
                $$V8_INSPECTOR_PATH/channel.cpp \
                $$V8_INSPECTOR_PATH/client.cpp \
                $$V8_INSPECTOR_PATH/execution_data.cpp \
                $$V8_INSPECTOR_PATH/inspector.cpp \
                $$V8_INSPECTOR_PATH/inspector_impl.cpp \
                $$V8_INSPECTOR_PATH/inspectormanager.cpp \
                $$V8_INSPECTOR_PATH/scriptholder.cpp \
                $$V8_INSPECTOR_PATH/singleconnectionserver.cpp \
                $$V8_INSPECTOR_PATH/singlethreadutils.cpp

        #to include inspector files
        INCLUDEPATH += \
            $$V8_INSPECTOR_PATH

        #inspector lib
        !use_v8_monolith {
            LIBS += -L$$CORE_V8_PATH_LIBS/src/inspector -linspector
        }

        #boost
        CONFIG += core_boost_date_time
        include($$PWD/../../../Common/3dParty/boost/boost.pri)
    }

}

use_javascript_core {

    HEADERS += $$PWD/jsc/jsc_base.h
    OBJECTIVE_SOURCES += $$PWD/jsc/jsc_base.mm
    QMAKE_OBJECTIVE_CFLAGS += -fobjc-arc -fobjc-weak

    LIBS += -framework JavaScriptCore

}

core_mac {
    CONFIG += use_javascript_core
}
core_ios {
    CONFIG += use_javascript_core
}

INCLUDEPATH += $$PWD

HEADERS += $$PWD/js_base.h

!use_javascript_core {

    HEADERS += $$PWD/v8/v8_base.h
    SOURCES += $$PWD/v8/v8_base.cpp
    include($$PWD/../../../Common/3dParty/v8/v8.pri)

    v8_use_inspector {
        #define
        DEFINES += V8_INSPECTOR

        #paths
        V8_INSPECTOR_PATH = $$PWD/v8/inspector

        #inspector files
        HEADERS += \
                $$V8_INSPECTOR_PATH/channel.h \
                $$V8_INSPECTOR_PATH/client.h \
                $$V8_INSPECTOR_PATH/inspector.h \
                $$V8_INSPECTOR_PATH/singleconnectionserver.h \
                $$V8_INSPECTOR_PATH/singlethreadutils.h
        SOURCES += \
                $$V8_INSPECTOR_PATH/channel.cpp \
                $$V8_INSPECTOR_PATH/client.cpp \
                $$V8_INSPECTOR_PATH/inspector.cpp \
                $$V8_INSPECTOR_PATH/singleconnectionserver.cpp \
                $$V8_INSPECTOR_PATH/singlethreadutils.cpp

        #to include inspector files
        INCLUDEPATH += \
            $$V8_INSPECTOR_PATH

        #inspector lib
        !use_v8_monolith {
            LIBS += -L$$CORE_V8_PATH_LIBS/src/inspector -linspector
        }

        CONFIG += core_boost_date_time
        include($$PWD/../../../Common/3dParty/boost/boost.pri)
    }

}

use_javascript_core {

    HEADERS += $$PWD/jsc/jsc_base.h
    OBJECTIVE_SOURCES += $$PWD/jsc/jsc_base.mm
    QMAKE_OBJECTIVE_CFLAGS += -fobjc-arc -fobjc-weak

    LIBS += -framework JavaScriptCore

}


Make link bootstrap again.

Make link bootstrap again.

Fix the borked fix and re-add the dollar signs.

CONFIG 	       += console qtinc
CONFIG         -= qt
build_all:!build_pass {
    CONFIG -= build_all
    CONFIG += release
}
CONFIG     -= app_bundle

DEFINES	       += \
        QT_BOOTSTRAPPED \
        QT_LITE_UNICODE \
        QT_TEXTCODEC \
        QT_NO_CAST_FROM_ASCII \
        QT_NO_CAST_TO_ASCII \
        QT_NO_CODECS \
        QT_NO_DATASTREAM \
        QT_NO_GEOM_VARIANT \
        QT_NO_LIBRARY \
        QT_NO_QOBJECT \
        QT_NO_STL \
        QT_NO_SYSTEMLOCALE \
        QT_NO_TEXTSTREAM \
        QT_NO_THREAD \
        QT_NO_UNICODETABLES \
        QT_NO_USING_NAMESPACE
win32:DEFINES += QT_NODLL

INCLUDEPATH	+= $$QT_BUILD_TREE/include \
                   $$QT_BUILD_TREE/include/QtCore \
                   $$QT_BUILD_TREE/include/QtXml \
                   $$QT_SOURCE_TREE/src/xml
DEPENDPATH	+= $$INCLUDEPATH \
                   $$QT_SOURCE_TREE/src/corelib/global \
                   $$QT_SOURCE_TREE/src/corelib/kernel \
                   $$QT_SOURCE_TREE/src/corelib/tools \
                   $$QT_SOURCE_TREE/src/corelib/io \
                   $$QT_SOURCE_TREE/src/corelib/codecs \
                   $$QT_SOURCE_TREE/src/xml

hpux-acc*|hpuxi-acc* {
    LIBS += $$QT_BUILD_TREE/src/tools/bootstrap/libbootstrap.a
} else {
    contains(CONFIG, debug_and_release_target) {
        CONFIG(debug, debug|release) {
            QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/debug
        } else {
            QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/release
        }
    } else {
        QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap
    }
    LIBS += -lbootstrap
}
!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib) {
   unix:LIBS += -lz
#  win32:LIBS += libz.lib
}
win32:LIBS += -luser32

mac {
    CONFIG -= incremental
    LIBS += -framework CoreServices
}

CONFIG 	       += console qtinc
CONFIG         -= qt
build_all:!build_pass {
    CONFIG -= build_all
    CONFIG += release
}
CONFIG     -= app_bundle

DEFINES	       += \
        QT_BOOTSTRAPPED \
        QT_LITE_UNICODE \
        QT_TEXTCODEC \
        QT_NO_CAST_FROM_ASCII \
        QT_NO_CAST_TO_ASCII \
        QT_NO_CODECS \
        QT_NO_DATASTREAM \
        QT_NO_GEOM_VARIANT \
        QT_NO_LIBRARY \
        QT_NO_QOBJECT \
        QT_NO_STL \
        QT_NO_SYSTEMLOCALE \
        QT_NO_TEXTSTREAM \
        QT_NO_THREAD \
        QT_NO_UNICODETABLES \
        QT_NO_USING_NAMESPACE
win32:DEFINES += QT_NODLL

INCLUDEPATH	+= $$QT_BUILD_TREE/include \
                   $$QT_BUILD_TREE/include/QtCore \
                   $$QT_BUILD_TREE/include/QtXml \
                   $$QT_SOURCE_TREE/src/xml
DEPENDPATH	+= $$INCLUDEPATH \
                   $$QT_SOURCE_TREE/src/corelib/global \
                   $$QT_SOURCE_TREE/src/corelib/kernel \
                   $$QT_SOURCE_TREE/src/corelib/tools \
                   $$QT_SOURCE_TREE/src/corelib/io \
                   $$QT_SOURCE_TREE/src/corelib/codecs \
                   $$QT_SOURCE_TREE/src/xml

hpux-acc*|hpuxi-acc* {
    LIBS += $$QT_BUILD_TREE/src/tools/bootstrap/libbootstrap.a
} else {
    contains(CONFIG, debug_and_release_target) {
        CONFIG(debug, debug|release) {
            QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/debug
        } else {
            QMAKE_LIBDIR += $QT_BUILD_TREE/src/tools/bootstrap/release
        }
    } else {
        QMAKE_LIBDIR += $QT_BUILD_TREE/src/tools/bootstrap
    }
    LIBS += -lbootstrap
}
!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib) {
   unix:LIBS += -lz
#  win32:LIBS += libz.lib
}
win32:LIBS += -luser32

mac {
    CONFIG -= incremental
    LIBS += -framework CoreServices
}


QmlDesigner: fix qml2puppet .pro file

QmlDesigner: fix qml2puppet .pro file

Change-Id: I697a5e8d11b0aef926dd79a5e45a63ffdc567353
Reviewed-by: Thomas Hartmann <588ee739c05aab7547907becfd1420d2b7316069@digia.com>

QT += core gui qml quick network v8
contains (QT_CONFIG, webkit) {
    QT += webkit
}

QT += core-private qml-private quick-private gui-private script-private v8-private

DEFINES += QWEAKPOINTER_ENABLE_ARROW

include (../instances/instances.pri)
include (instances/instances.pri)
include (../commands/commands.pri)
include (../container/container.pri)
include (../interfaces/interfaces.pri)

QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
!isEmpty(QT_BREAKPAD_ROOT_PATH) {
    include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
}

SOURCES +=  $$PWD/main.cpp
RESOURCES +=  $$PWD/../qmlpuppet.qrc

OTHER_FILES += Info.plist.in
macx {
    info.input = Info.plist.in
    info.output = $$DESTDIR/$${TARGET}.app/Contents/Info.plist
    QMAKE_SUBSTITUTES += info
} else {
    target.path  = $$QTC_PREFIX/bin
    INSTALLS    += target
}

QT += core gui qml quick network v8
contains (QT_CONFIG, webkit) {
    QT += webkit
}

QT += core-private qml-private quick-private gui-private script-private v8-private

DEFINES += QWEAKPOINTER_ENABLE_ARROW

include(../../../../../qtcreator.pri)
include(../../../../../src/rpath.pri)

include (../instances/instances.pri)
include (instances/instances.pri)
include (../commands/commands.pri)
include (../container/container.pri)
include (../interfaces/interfaces.pri)

QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
!isEmpty(QT_BREAKPAD_ROOT_PATH) {
    include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
}

SOURCES +=  $$PWD/main.cpp
RESOURCES +=  $$PWD/../qmlpuppet.qrc

OTHER_FILES += Info.plist.in
macx {
    info.input = Info.plist.in
    info.output = $$DESTDIR/$${TARGET}.app/Contents/Info.plist
    QMAKE_SUBSTITUTES += info
} else {
    target.path  = $$QTC_PREFIX/bin
    INSTALLS    += target
}


Fix compilation of `megacli`

Fix compilation of `megacli`

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    DEFINES += PCRE_STATIC

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

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

    LIBS += -lshlwapi -lws2_32 -luser32
}

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

   LIBS += -lsqlite3 -lrt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    DEFINES += PCRE_STATIC

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

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

    LIBS += -lshlwapi -lws2_32 -luser32
}

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

   LIBS += -lsqlite3 -lrt

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

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


Update LibDS.pri

Update LibDS.pri

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

CODECFORTR = UTF-8
CODECFORSRC = UTF-8

QT += gui
QT += core
QT += network
QT += widgets
QT += multimedia

CONFIG += c++11

!win32* {
    QMAKE_CXXFLAGS += -std=c++0x
}

INCLUDEPATH += $$PWD/include

HEADERS += \
    $$PWD/include/LibDS/DriverStation.h \
    $$PWD/include/LibDS/Protocols/Protocol2015.h \
    $$PWD/include/LibDS/Core/Client.h \
    $$PWD/include/LibDS/Core/Common.h \
    $$PWD/include/LibDS/Core/ElapsedTimer.h \
    $$PWD/include/LibDS/Core/Library.h \
    $$PWD/include/LibDS/Core/NetConsole.h \
    $$PWD/include/LibDS/Core/ProtocolBase.h \
    $$PWD/include/LibDS/Core/ProtocolManager.h \
    $$PWD/include/LibDS/Core/Timers.h \
    $$PWD/include/LibDS/Core/Watchdog.h \
    $$PWD/include/LibDS/Core/Discovery/Discovery.h \
    $$PWD/include/LibDS/Protocols/Protocol2016.h \
    $$PWD/include/LibDS/Core/Discovery/MDNS_Discovery.h \
    $$PWD/include/LibDS/Protocols/Protocol2014.h

SOURCES += \
    $$PWD/src/DriverStation.cpp \
    $$PWD/src/Core/Client.cpp \
    $$PWD/src/Core/Common.cpp \
    $$PWD/src/Core/ElapsedTimer.cpp \
    $$PWD/src/Core/NetConsole.cpp \
    $$PWD/src/Core/ProtocolBase.cpp \
    $$PWD/src/Core/ProtocolManager.cpp \
    $$PWD/src/Core/Timers.cpp \
    $$PWD/src/Core/Watchdog.cpp \
    $$PWD/src/Core/Discovery/Discovery.cpp \
    $$PWD/src/Protocols/Protocol2015.cpp \
    $$PWD/src/Protocols/Protocol2016.cpp \
    $$PWD/src/Core/Discovery/MDNS_Discovery.cpp \
    $$PWD/src/Protocols/Protocol2014.cpp

RESOURCES += $$PWD/etc/sounds/libds-sounds.qrc

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

CODECFORTR = UTF-8
CODECFORSRC = UTF-8

QT += gui
QT += qml
QT += core
QT += network
QT += widgets
QT += multimedia

CONFIG += c++11

!win32* {
    QMAKE_CXXFLAGS += -std=c++0x
}

INCLUDEPATH += $$PWD/include

HEADERS += \
    $$PWD/include/LibDS/DriverStation.h \
    $$PWD/include/LibDS/Protocols/Protocol2015.h \
    $$PWD/include/LibDS/Core/Client.h \
    $$PWD/include/LibDS/Core/Common.h \
    $$PWD/include/LibDS/Core/ElapsedTimer.h \
    $$PWD/include/LibDS/Core/Library.h \
    $$PWD/include/LibDS/Core/NetConsole.h \
    $$PWD/include/LibDS/Core/ProtocolBase.h \
    $$PWD/include/LibDS/Core/ProtocolManager.h \
    $$PWD/include/LibDS/Core/Timers.h \
    $$PWD/include/LibDS/Core/Watchdog.h \
    $$PWD/include/LibDS/Core/Discovery/Discovery.h \
    $$PWD/include/LibDS/Protocols/Protocol2016.h \
    $$PWD/include/LibDS/Core/Discovery/MDNS_Discovery.h \
    $$PWD/include/LibDS/Protocols/Protocol2014.h

SOURCES += \
    $$PWD/src/DriverStation.cpp \
    $$PWD/src/Core/Client.cpp \
    $$PWD/src/Core/Common.cpp \
    $$PWD/src/Core/ElapsedTimer.cpp \
    $$PWD/src/Core/NetConsole.cpp \
    $$PWD/src/Core/ProtocolBase.cpp \
    $$PWD/src/Core/ProtocolManager.cpp \
    $$PWD/src/Core/Timers.cpp \
    $$PWD/src/Core/Watchdog.cpp \
    $$PWD/src/Core/Discovery/Discovery.cpp \
    $$PWD/src/Protocols/Protocol2015.cpp \
    $$PWD/src/Protocols/Protocol2016.cpp \
    $$PWD/src/Core/Discovery/MDNS_Discovery.cpp \
    $$PWD/src/Protocols/Protocol2014.cpp

RESOURCES += $$PWD/etc/sounds/libds-sounds.qrc


Fix compilation

Fix compilation

Change-Id: Ia3e62ed30467bb52555c353a30440ebcc3529d0b
Sanity-Review: Qt Sanity Bot <5581206bb7e0307f0d99eb71898ae6b694149ca5@ovi.com>
Reviewed-by: Samuel Rødal <99126055f8d73e4355b075213322026fa8c060bd@nokia.com>

WAYLANDSOURCES += \
                $$PWD/../../../extensions/surface-extension.xml \
                $$PWD/../../../extensions/sub-surface-extension.xml \
                $$PWD/../../../extensions/output-extension.xml \
                $$PWD/../../../extensions/touch-extension.xml

HEADERS += \
    $$PWD/wlcompositor.h \
    $$PWD/wldisplay.h \
    $$PWD/wloutput.h \
    $$PWD/wlshmbuffer.h \
    $$PWD/wlsurface.h \
    $$PWD/wlshellsurface.h \
    $$PWD/wlinputdevice.h \
    $$PWD/wldatadevicemanager.h \
    $$PWD/wldatadevice.h \
    $$PWD/wldataoffer.h \
    $$PWD/wldatasource.h \
    $$PWD/wlextendedsurface.h \
    $$PWD/wlextendedoutput.h \
    $$PWD/wlsubsurface.h \
    $$PWD/wltouch.h \
    $$PWD/../../shared/qwaylandmimehelper.h

SOURCES += \
    $$PWD/wlcompositor.cpp \
    $$PWD/wldisplay.cpp \
    $$PWD/wloutput.cpp \
    $$PWD/wlshmbuffer.cpp \
    $$PWD/wlsurface.cpp \
    $$PWD/wlshellsurface.cpp \
    $$PWD/wlinputdevice.cpp \
    $$PWD/wldatadevicemanager.cpp \
    $$PWD/wldatadevice.cpp \
    $$PWD/wldataoffer.cpp \
    $$PWD/wldatasource.cpp \
    $$PWD/wlextendedsurface.cpp \
    $$PWD/wlextendedoutput.cpp \
    $$PWD/wlsubsurface.cpp \
    $$PWD/wltouch.cpp \
    $$PWD/../../shared/qwaylandmimehelper.cpp

INCLUDEPATH += $$PWD
INCLUDEPATH += $$PWD/../../shared

WAYLANDSOURCES += \
                $$PWD/../../../extensions/surface-extension.xml \
                $$PWD/../../../extensions/sub-surface-extension.xml \
                $$PWD/../../../extensions/output-extension.xml \
                $$PWD/../../../extensions/touch-extension.xml

HEADERS += \
    $$PWD/wlcompositor.h \
    $$PWD/wldisplay.h \
    $$PWD/wloutput.h \
    $$PWD/wlshmbuffer.h \
    $$PWD/wlsurface.h \
    $$PWD/wlshellsurface.h \
    $$PWD/wlinputdevice.h \
    $$PWD/wldatadevicemanager.h \
    $$PWD/wldatadevice.h \
    $$PWD/wldataoffer.h \
    $$PWD/wldatasource.h \
    $$PWD/wlextendedsurface.h \
    $$PWD/wlextendedoutput.h \
    $$PWD/wlsubsurface.h \
    $$PWD/wltouch.h \
    $$PWD/../../shared/qwaylandmimehelper.h

SOURCES += \
    $$PWD/wlcompositor.cpp \
    $$PWD/wldisplay.cpp \
    $$PWD/wloutput.cpp \
    $$PWD/wlshmbuffer.cpp \
    $$PWD/wlsurface.cpp \
    $$PWD/wlshellsurface.cpp \
    $$PWD/wlinputdevice.cpp \
    $$PWD/wldatadevicemanager.cpp \
    $$PWD/wldatadevice.cpp \
    $$PWD/wldataoffer.cpp \
    $$PWD/wldatasource.cpp \
    $$PWD/wlextendedsurface.cpp \
    $$PWD/wlextendedoutput.cpp \
    $$PWD/wlsubsurface.cpp \
    $$PWD/wltouch.cpp \
    $$PWD/../../shared/qwaylandmimehelper.cpp

INCLUDEPATH += $$PWD/../../shared


and now: the (hopefully) correct fix

and now: the (hopefully) correct fix

in fact, that private header comes from qtdeclarative

INCLUDEPATH += $$PWD

HEADERS += \
    $$PWD/waylandcompositor.h \
    $$PWD/waylandsurface.h

SOURCES += \
    $$PWD/waylandcompositor.cpp \
    $$PWD/waylandsurface.cpp

contains(QT, declarative) {
    SOURCES += $$PWD/waylandsurfaceitem.cpp
    HEADERS += $$PWD/waylandsurfaceitem.h

   DEFINES += QT_COMPOSITOR_DECLARATIVE
}

!isEmpty(QT.core.MAJOR_VERSION):greaterThan(QT.core.MAJOR_VERSION, 4) {
    QT += core-private
    contains(QT, declarative):QT += declarative-private opengl-private gui-private
}

INCLUDEPATH += $$PWD

HEADERS += \
    $$PWD/waylandcompositor.h \
    $$PWD/waylandsurface.h

SOURCES += \
    $$PWD/waylandcompositor.cpp \
    $$PWD/waylandsurface.cpp

contains(QT, declarative) {
    SOURCES += $$PWD/waylandsurfaceitem.cpp
    HEADERS += $$PWD/waylandsurfaceitem.h

   DEFINES += QT_COMPOSITOR_DECLARATIVE
}

!isEmpty(QT.core.MAJOR_VERSION):greaterThan(QT.core.MAJOR_VERSION, 4) {
    QT += core-private
    if(contains(QT, opengl)|contains(QT, declarative)):QT += opengl-private gui-private
}