duplication removed

duplication removed

# 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

links(qrkernel qslog qrtext)

INCLUDEPATH += \
	$$PWD \
	$$PWD/.. \
	$$PWD/../.. \
	$$PWD/../../qrgui/ \
	$$PWD/../../qrtext \
	$$PWD/../../qrtext/include \

HEADERS += \
	$$PWD/generationRulesPlugin.h \
	$$PWD/lexer.h \
	$$PWD/tokenTypes.h \
	$$PWD/parser.h \
	$$PWD/treeGeneratorFromString.h \
	$$PWD/ast/callGeneratorFor.h \
	$$PWD/ast/program.h \
	$$PWD/ast/node.h \
	$$PWD/ast/text.h \
	$$PWD/ast/identifier.h \
	$$PWD/ast/newline.h \
	$$PWD/ast/foreach.h \
	$$PWD/ast/complexIdentifier.h \
	$$PWD/ast/incomingLinks.h \
	$$PWD/ast/links.h \
	$$PWD/ast/outcomingLinks.h \
	$$PWD/ast/tab.h \
	$$PWD/ast/transitionEnd.h \
	$$PWD/ast/list.h \
	$$PWD/ast/transitionStart.h \
	$$PWD/ast/elementIdentifier.h \
	$$PWD/ast/generator.h \
	$$PWD/ast/equal.h \
	$$PWD/ast/notEqual.h \
	$$PWD/ast/condition.h \
	$$PWD/ast/ifNode.h \
	$$PWD/ast/generateToFile.h \
	$$PWD/ast/this.h \
	$$PWD/ast/string.h \
	$$PWD/dialogs/specifyGenerationRulesDialog.h \
	$$PWD/dialogs/specifyPathToGeneratedCodeDialog.h \
	$$PWD/generator/commonGenerator.h \
	$$PWD/generator/generatorForComplexIdentifierNode.h \
	$$PWD/generator/generatorForForeachNode.h \
	$$PWD/generator/generatorForProgramNode.h \
	$$PWD/generator/generatorForCallGenerator.h \
	$$PWD/generator/generatorForGeneratorNode.h \
	$$PWD/generator/generatorForIfNode.h \
	$$PWD/generator/auxiliaryGenerators/generatorForElementIdentifierNode.h \
	$$PWD/generator/auxiliaryGenerators/incomingLinksListGenerator.h \
	$$PWD/generator/auxiliaryGenerators/listGenerator.h \
	$$PWD/generator/auxiliaryGenerators/generatorForCondition.h \
	$$PWD/generator/auxiliaryGenerators/identifierTypeGenerator.h \
	$$PWD/generator/auxiliaryGenerators/linksListGenerator.h \
	$$PWD/generator/auxiliaryGenerators/outcomingLinksListGenerator.h \
	$$PWD/generator/auxiliaryGenerators/simpleTypeListGenerator.h \
	$$PWD/generator/auxiliaryGenerators/stringGenerator.h \
	$$PWD/generator/commonInfo/typeQualifier.h \
	$$PWD/generator/commonInfo/currentScope.h \
	$$PWD/generator/commonInfo/variablesTable.h \
	$$PWD/generator/commonInfo/generatorConfigurer.h \
	$$PWD/generator/generatorForGenerateToFile.h \
	$$PWD/appearance/ruleHighlighter.h \
	$$PWD/appearance/keywords.h \

SOURCES += \
	$$PWD/generationRulesPlugin.cpp \
	$$PWD/lexer.cpp \
	$$PWD/parser.cpp \
	$$PWD/treeGeneratorFromString.cpp \
	$$PWD/dialogs/specifyGenerationRulesDialog.cpp \
	$$PWD/dialogs/specifyPathToGeneratedCodeDialog.cpp \
	$$PWD/generator/commonGenerator.cpp \
	$$PWD/generator/generatorForComplexIdentifierNode.cpp \
	$$PWD/generator/generatorForForeachNode.cpp \
	$$PWD/generator/generatorForProgramNode.cpp \
	$$PWD/generator/generatorForCallGenerator.cpp \
	$$PWD/generator/generatorForGenerateToFile.cpp \
	$$PWD/generator/generatorForIfNode.cpp \
	$$PWD/generator/generatorForGeneratorNode.cpp \
	$$PWD/generator/auxiliaryGenerators/generatorForElementIdentifierNode.cpp \
	$$PWD/generator/auxiliaryGenerators/incomingLinksListGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/listGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/identifierTypeGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/outcomingLinksListGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/simpleTypeListGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/generatorForCondition.cpp \
	$$PWD/generator/auxiliaryGenerators/linksListGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/stringGenerator.cpp \
	$$PWD/generator/commonInfo/typeQualifier.cpp \
	$$PWD/generator/commonInfo/currentScope.cpp \
	$$PWD/generator/commonInfo/variablesTable.cpp \
	$$PWD/appearance/ruleHighlighter.cpp \

FORMS += \
	$$PWD/dialogs/specifyGenerationRulesDialog.ui \
	$$PWD/dialogs/specifyPathToGeneratedCodeDialog.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

links(qrkernel qslog qrtext)

INCLUDEPATH += \
	$$PWD \
	$$PWD/.. \
	$$PWD/../.. \
	$$PWD/../../qrgui/ \
	$$PWD/../../qrtext \
	$$PWD/../../qrtext/include \

HEADERS += \
	$$PWD/generationRulesPlugin.h \
	$$PWD/lexer.h \
	$$PWD/tokenTypes.h \
	$$PWD/parser.h \
	$$PWD/treeGeneratorFromString.h \
	$$PWD/ast/callGeneratorFor.h \
	$$PWD/ast/program.h \
	$$PWD/ast/node.h \
	$$PWD/ast/text.h \
	$$PWD/ast/identifier.h \
	$$PWD/ast/newline.h \
	$$PWD/ast/foreach.h \
	$$PWD/ast/complexIdentifier.h \
	$$PWD/ast/incomingLinks.h \
	$$PWD/ast/links.h \
	$$PWD/ast/outcomingLinks.h \
	$$PWD/ast/tab.h \
	$$PWD/ast/transitionEnd.h \
	$$PWD/ast/callGeneratorFor.h \
	$$PWD/ast/list.h \
	$$PWD/ast/transitionStart.h \
	$$PWD/ast/elementIdentifier.h \
	$$PWD/ast/generator.h \
	$$PWD/ast/equal.h \
	$$PWD/ast/notEqual.h \
	$$PWD/ast/condition.h \
	$$PWD/ast/ifNode.h \
	$$PWD/ast/generateToFile.h \
	$$PWD/ast/this.h \
	$$PWD/ast/string.h \
	$$PWD/dialogs/specifyGenerationRulesDialog.h \
	$$PWD/dialogs/specifyPathToGeneratedCodeDialog.h \
	$$PWD/generator/commonGenerator.h \
	$$PWD/generator/generatorForComplexIdentifierNode.h \
	$$PWD/generator/generatorForForeachNode.h \
	$$PWD/generator/generatorForProgramNode.h \
	$$PWD/generator/generatorForCallGenerator.h \
	$$PWD/generator/generatorForGeneratorNode.h \
	$$PWD/generator/generatorForIfNode.h \
	$$PWD/generator/auxiliaryGenerators/generatorForElementIdentifierNode.h \
	$$PWD/generator/auxiliaryGenerators/incomingLinksListGenerator.h \
	$$PWD/generator/auxiliaryGenerators/listGenerator.h \
	$$PWD/generator/auxiliaryGenerators/generatorForCondition.h \
	$$PWD/generator/auxiliaryGenerators/identifierTypeGenerator.h \
	$$PWD/generator/auxiliaryGenerators/linksListGenerator.h \
	$$PWD/generator/auxiliaryGenerators/outcomingLinksListGenerator.h \
	$$PWD/generator/auxiliaryGenerators/simpleTypeListGenerator.h \
	$$PWD/generator/auxiliaryGenerators/stringGenerator.h \
	$$PWD/generator/commonInfo/typeQualifier.h \
	$$PWD/generator/commonInfo/currentScope.h \
	$$PWD/generator/commonInfo/variablesTable.h \
	$$PWD/generator/commonInfo/generatorConfigurer.h \
	$$PWD/generator/generatorForGenerateToFile.h \
	$$PWD/appearance/ruleHighlighter.h \
	$$PWD/appearance/keywords.h \

SOURCES += \
	$$PWD/generationRulesPlugin.cpp \
	$$PWD/lexer.cpp \
	$$PWD/parser.cpp \
	$$PWD/treeGeneratorFromString.cpp \
	$$PWD/dialogs/specifyGenerationRulesDialog.cpp \
	$$PWD/dialogs/specifyPathToGeneratedCodeDialog.cpp \
	$$PWD/generator/commonGenerator.cpp \
	$$PWD/generator/generatorForComplexIdentifierNode.cpp \
	$$PWD/generator/generatorForForeachNode.cpp \
	$$PWD/generator/generatorForProgramNode.cpp \
	$$PWD/generator/generatorForCallGenerator.cpp \
	$$PWD/generator/generatorForGenerateToFile.cpp \
	$$PWD/generator/generatorForIfNode.cpp \
	$$PWD/generator/generatorForGeneratorNode.cpp \
	$$PWD/generator/auxiliaryGenerators/generatorForElementIdentifierNode.cpp \
	$$PWD/generator/auxiliaryGenerators/incomingLinksListGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/listGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/identifierTypeGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/outcomingLinksListGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/simpleTypeListGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/generatorForCondition.cpp \
	$$PWD/generator/auxiliaryGenerators/linksListGenerator.cpp \
	$$PWD/generator/auxiliaryGenerators/stringGenerator.cpp \
	$$PWD/generator/commonInfo/typeQualifier.cpp \
	$$PWD/generator/commonInfo/currentScope.cpp \
	$$PWD/generator/commonInfo/variablesTable.cpp \
	$$PWD/appearance/ruleHighlighter.cpp \

FORMS += \
	$$PWD/dialogs/specifyGenerationRulesDialog.ui \
	$$PWD/dialogs/specifyPathToGeneratedCodeDialog.ui


Windows needs special linker settings ...

QT += network

INCLUDEPATH += $$PWD

win32 {
    CONFIG(release, debug|release):LIBS += -L../libclient/release
    else: LIBS += -L../libclient/debug

    LIBS += -lclient
}
else:LIBS += ../libclient/libclient.a

linux:!android:LIBS += -lminiupnpc
win32:LIBS += -lws2_32

QT += network

INCLUDEPATH += $$PWD

win32:LIBS += -L../libclient -lclient
else:LIBS += ../libclient/libclient.a

linux:!android:LIBS += -lminiupnpc
win32:LIBS += -lws2_32


Set the rpath

Set the rpath

Wayland is currently instaled in non-standard dirs, so set the rpath if
the system supports rpath.

Reviewed-By: Jørgen Lind

INCLUDEPATH += $$PWD
use_pkgconfig {
    QMAKE_CXXFLAGS += $$system(pkg-config --cflags wayland-server)
    #for some reason this is not included in the cflags line
    INCLUDEPATH += $$system(pkg-config --variable=includedir wayland-server)
    LIBS += $$system(pkg-config --libs wayland-server)

    #set the rpath
    !isEmpty(QMAKE_LFLAGS_RPATH) {
        WAYLAND_LIBDIR = $$system(pkg-config --variable=libdir wayland-server)
        !isEmpty(WAYLAND_LIBDIR):QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${WAYLAND_LIBDIR}
    }
} else {
    INCLUDEPATH += $$PWD/../3rdparty/wayland
    LIBS += -L$$PWD/../../lib
    LIBS += -lwayland-server -lffi
}

wayland_gl {
    system(echo "Qt-Compositor configured with openGL")
    QT += opengl
    DEFINES += QT_COMPOSITOR_WAYLAND_GL
    use_pkgconfig {
        QMAKE_CXXFLAGS += $$system(pkg-config --cflags glesv2)
        #for some reason this is not included in the cflags line
        INCLUDEPATH += $$system(pkg-config --variable=includedir glesv2)
        LIBS += $$system(pkg-config --libs glesv2)
    }
} else {
    system(echo "Qt-Compositor configured as raster only compositor")
}

include ($$PWD/util/util.pri)
include ($$PWD/wayland_wrapper/wayland_wrapper.pri)
include ($$PWD/hardware_integration/hardware_integration.pri)
include ($$PWD/compositor_api/compositor_api.pri)

INCLUDEPATH += $$PWD
use_pkgconfig {
    QMAKE_CXXFLAGS += $$system(pkg-config --cflags wayland-server)
    #for some reason this is not included in the cflags line
    INCLUDEPATH += $$system(pkg-config --variable=includedir wayland-server)
    LIBS += $$system(pkg-config --libs wayland-server)
} else {
    INCLUDEPATH += $$PWD/../3rdparty/wayland
    LIBS += -L$$PWD/../../lib
    LIBS += -lwayland-server -lffi
}

wayland_gl {
    system(echo "Qt-Compositor configured with openGL")
    QT += opengl
    DEFINES += QT_COMPOSITOR_WAYLAND_GL
    use_pkgconfig {
        QMAKE_CXXFLAGS += $$system(pkg-config --cflags glesv2)
        #for some reason this is not included in the cflags line
        INCLUDEPATH += $$system(pkg-config --variable=includedir glesv2)
        LIBS += $$system(pkg-config --libs glesv2)
    }
} else {
    system(echo "Qt-Compositor configured as raster only compositor")
}

include ($$PWD/util/util.pri)
include ($$PWD/wayland_wrapper/wayland_wrapper.pri)
include ($$PWD/hardware_integration/hardware_integration.pri)
include ($$PWD/compositor_api/compositor_api.pri)


googletest:disable pthreads because MinGW has problems

DEFINES += GTEST_HAS_STREAM_REDIRECTION=1 GTEST_LANG_CXX11=1 GTEST_HAS_STD_WSTRING=1 \
           GTEST_HAS_RTTI=1 \
           GTEST_HAS_PTHREAD=0 \
           GTEST_HAS_EXCEPTIONS=1 \
           GTEST_LINKED_AS_SHARED_LIBRARY=1 \
           GTEST_CREATE_SHARED_LIBRARY=1

DEFINES += GTEST_HAS_STREAM_REDIRECTION=1 GTEST_LANG_CXX11=1 GTEST_HAS_STD_WSTRING=1 \
           GTEST_HAS_RTTI=1 \
           GTEST_HAS_PTHREAD=1 \
           GTEST_HAS_EXCEPTIONS=1 \
           GTEST_LINKED_AS_SHARED_LIBRARY=1 \
           GTEST_CREATE_SHARED_LIBRARY=1


Clean up INCLUDEPATH of qmldesigner

Clean up INCLUDEPATH of qmldesigner

include($$PWD/filemanager/filemanager.pri)
include (../config.pri)

QT += script \
    declarative

DEFINES += TEST_EXPORTS
INCLUDEPATH += $$PWD \
    $$PWD/include
DEPENDPATH += $$PWD $$PWD/include
SOURCES += $$PWD/model/abstractview.cpp \
    $$PWD/instances/nodeinstanceview.cpp \
    $$PWD/model/rewriterview.cpp \
    $$PWD/metainfo/enumeratormetainfo.cpp \
    $$PWD/metainfo/metainfo.cpp \
    $$PWD/metainfo/metainfoparser.cpp \
    $$PWD/metainfo/propertymetainfo.cpp \
    $$PWD/metainfo/nodemetainfo.cpp \
    $$PWD/metainfo/itemlibraryinfo.cpp \
    $$PWD/metainfo/subcomponentmanager.cpp \
    $$PWD/model/internalproperty.cpp \
    $$PWD/model/model.cpp \
    $$PWD/model/modelnode.cpp \
    $$PWD/model/painteventfilter.cpp \
    $$PWD/model/internalnode.cpp \
    $$PWD/model/propertyparser.cpp \
    $$PWD/model/propertycontainer.cpp \
    $$PWD/pluginmanager/widgetpluginmanager.cpp \
    $$PWD/pluginmanager/widgetpluginpath.cpp \
    $$PWD/instances/nodeinstance.cpp \
    $$PWD/instances/objectnodeinstance.cpp \
    $$PWD/instances/widgetnodeinstance.cpp \
    $$PWD/instances/graphicswidgetnodeinstance.cpp \
    $$PWD/instances/qmlgraphicsitemnodeinstance.cpp \
    $$PWD/instances/graphicsscenenodeinstance.cpp \
    $$PWD/instances/graphicsviewnodeinstance.cpp \
    $$PWD/instances/proxywidgetnodeinstance.cpp \
    $$PWD/instances/qmlviewnodeinstance.cpp \
    $$PWD/instances/dummynodeinstance.cpp \
    $$PWD/instances/qmlpropertychangesnodeinstance.cpp \
    $$PWD/instances/qmlstatenodeinstance.cpp \
    $$PWD/exceptions/exception.cpp \
    $$PWD/exceptions/invalidnodeinstanceexception.cpp \
    $$PWD/exceptions/invalidpropertyexception.cpp \
    $$PWD/exceptions/invalidmodelnodeexception.cpp \
    $$PWD/exceptions/invalidreparentingexception.cpp \
    $$PWD/exceptions/invalidmetainfoexception.cpp \
    $$PWD/exceptions/invalidargumentexception.cpp \
    $$PWD/exceptions/noanchoringpossibleexception.cpp \
    $$PWD/exceptions/notimplementedexception.cpp \
    $$PWD/exceptions/invalidnodestateexception.cpp \
    $$PWD/model/variantparser.cpp \
    $$PWD/exceptions/invalidmodelstateexception.cpp \
    $$PWD/exceptions/removebasestateexception.cpp \
    $$PWD/exceptions/invalididexception.cpp \
    $$PWD/model/propertynode.cpp \
    $$PWD/exceptions/invalidslideindexexception.cpp \
    $$PWD/instances/graphicsobjectnodeinstance.cpp \
    $$PWD/model/import.cpp \
    $$PWD/instances/componentnodeinstance.cpp \
    $$PWD/exceptions/invalidqmlsourceexception.cpp \
    $$PWD/model/viewlogger.cpp \
    $$PWD/model/internalvariantproperty.cpp \
    $$PWD/model/internalnodelistproperty.cpp \
    $$PWD/model/variantproperty.cpp \
    $$PWD/model/nodelistproperty.cpp \
    $$PWD/model/abstractproperty.cpp \
    $$PWD/model/internalbindingproperty.cpp \
    $$PWD/model/bindingproperty.cpp \
    $$PWD/model/internalnodeproperty.cpp \
    $$PWD/model/internalnodeabstractproperty.cpp \
    $$PWD/model/nodeabstractproperty.cpp \
    $$PWD/model/nodeproperty.cpp \
    $$PWD/model/modeltotextmerger.cpp \
    $$PWD/model/texttomodelmerger.cpp \
    $$PWD/model/plaintexteditmodifier.cpp \
    $$PWD/model/componenttextmodifier.cpp \
    $$PWD/model/textmodifier.cpp \
    $$PWD/model/qmlmodelview.cpp \
    $$PWD/model/qmlitemnode.cpp \
    $$PWD/model/qmlstate.cpp \
    $$PWD/model/qmlchangeset.cpp \
    $$PWD/model/qmlmodelnodefacade.cpp \
    $$PWD/model/qmlobjectnode.cpp \
    $$PWD/model/qmlanchors.cpp \
    $$PWD/rewritertransaction.cpp \
    $$PWD/model/rewriteaction.cpp \
    $$PWD/model/modelnodepositionstorage.cpp \
    $$PWD/model/modelnodepositionrecalculator.cpp \
    $$PWD/model/rewriteactioncompressor.cpp \
    $$PWD/model/qmltextgenerator.cpp \
    $$PWD/model/modelmerger.cpp \
    $$PWD/instances/qmltransitionnodeinstance.cpp \
    $$PWD/exceptions/rewritingexception.cpp \
    $$PWD/instances/nodeinstancemetaobject.cpp \
    $$PWD/instances/behaviornodeinstance.cpp \
    $$PWD/instances/nodeinstancesignalspy.cpp

HEADERS += $$PWD/include/corelib_global.h \
    $$PWD/include/abstractview.h \
    $$PWD/include/nodeinstanceview.h \
    $$PWD/include/rewriterview.h \
    $$PWD/include/enumeratormetainfo.h \
    $$PWD/include/metainfo.h \
    $$PWD/include/metainfoparser.h \
    $$PWD/include/nodemetainfo.h \
    $$PWD/include/propertymetainfo.h \
    $$PWD/include/itemlibraryinfo.h \
    $$PWD/model/internalproperty.h \
    $$PWD/include/modelnode.h \
    $$PWD/include/model.h \
    $$PWD/include/nodeproperty.h \
    $$PWD/include/widgetqueryview.h \
    $$PWD/include/subcomponentmanager.h \
    $$PWD/include/propertycontainer.h \
    $$PWD/model/internalnode_p.h \
    $$PWD/model/model_p.h \
    $$PWD/model/painteventfilter_p.h \
    $$PWD/model/propertyparser.h \
    $$PWD/pluginmanager/widgetpluginmanager.h \
    $$PWD/pluginmanager/widgetpluginpath.h \
    $$PWD/include/nodeinstance.h \
    $$PWD/instances/objectnodeinstance.h \
    $$PWD/instances/widgetnodeinstance.h \
    $$PWD/instances/graphicswidgetnodeinstance.h \
    $$PWD/instances/qmlgraphicsitemnodeinstance.h \
    $$PWD/instances/graphicsscenenodeinstance.h \
    $$PWD/instances/graphicsviewnodeinstance.h \
    $$PWD/instances/proxywidgetnodeinstance.h \
    $$PWD/instances/qmlviewnodeinstance.h \
    $$PWD/instances/dummynodeinstance.h \
    $$PWD/instances/qmlpropertychangesnodeinstance.h \
    $$PWD/instances/qmlstatenodeinstance.h \
    $$PWD/include/exception.h \
    $$PWD/include/invalidnodeinstanceexception.h \
    $$PWD/include/invalidmodelnodeexception.h \
    $$PWD/include/invalidreparentingexception.h \
    $$PWD/include/invalidmetainfoexception.h \
    $$PWD/include/invalidargumentexception.h \
    $$PWD/include/notimplementedexception.h \
    $$PWD/include/invalidpropertyexception.h \
    $$PWD/include/invalidmodelstateexception.h \
    $$PWD/include/removebasestateexception.h \
    $$PWD/include/invalididexception.h \
    $$PWD/model/variantparser.h \
    $$PWD/include/propertynode.h \
    $$PWD/include/invalidslideindexexception.h \
    $$PWD/instances/graphicsobjectnodeinstance.h \
    $$PWD/include/import.h \
    $$PWD/instances/componentnodeinstance.h \
    $$PWD/include/invalidqmlsourceexception.h \
    $$PWD/model/viewlogger.h \
    $$PWD/model/internalvariantproperty.h \
    $$PWD/model/internalnodelistproperty.h \
    $$PWD/include/variantproperty.h \
    $$PWD/include/nodelistproperty.h \
    $$PWD/include/abstractproperty.h \
    $$PWD/model/internalbindingproperty.h \
    $$PWD/include/bindingproperty.h \
    $$PWD/model/internalnodeproperty.h \
    $$PWD/model/internalnodeabstractproperty.h \
    $$PWD/include/nodeabstractproperty.h \
    $$PWD/include/plaintexteditmodifier.h \
    $$PWD/include/basetexteditmodifier.h \
    $$PWD/include/componenttextmodifier.h \
    $$PWD/include/textmodifier.h \
    $$PWD/model/modeltotextmerger.h \
    $$PWD/model/texttomodelmerger.h \
    $$PWD/include/qmlmodelview.h \
    $$PWD/include/qmlitemnode.h \
    $$PWD/include/qmlstate.h \
    $$PWD/include/qmlchangeset.h \
    $$PWD/include/qmlmodelnodefacade.h \
    $$PWD/include/forwardview.h \
    $$PWD/include/qmlobjectnode.h \
    $$PWD/include/qmlanchors.h \
    $$PWD/rewritertransaction.h \
    $$PWD/model/rewriteaction.h \
    $$PWD/include/modelnodepositionstorage.h \
    $$PWD/model/modelnodepositionrecalculator.h \
    $$PWD/model/rewriteactioncompressor.h \
    $$PWD/model/qmltextgenerator.h \
    $$PWD/include/modelmerger.h \
    $$PWD/include/mathutils.h \
    $$PWD/instances/qmltransitionnodeinstance.h \
    $$PWD/include/customnotifications.h \
    $$PWD/include/rewritingexception.h \
    $$PWD/instances/nodeinstancemetaobject.h \
    $$PWD/instances/behaviornodeinstance.h \
    $$PWD/instances/nodeinstancesignalspy.h

contains(CONFIG, plugin) {
  # If core.pri has been included in the qmldesigner plugin
  SOURCES += $$PWD/model/basetexteditmodifier.cpp
  HEADERS += $$PWD/include/basetexteditmodifier.h
}

DISTFILES += $$PWD/metafile/widget.metafile
RESOURCES += $$PWD/core.qrc
OTHER_FILES += $$PWD/metainfo/gui.metainfo

include($$PWD/filemanager/filemanager.pri)
include (../config.pri)
QT += script \
    declarative

DEFINES += TEST_EXPORTS
INCLUDEPATH += $$PWD \
    $$PWD/include
DEPENDPATH += $$PWD $$PWD/include
INCLUDEPATH += $$QT_SOURCE_TREE/src/declarative/qml
SOURCES += $$PWD/model/abstractview.cpp \
    $$PWD/instances/nodeinstanceview.cpp \
    $$PWD/model/rewriterview.cpp \
    $$PWD/metainfo/enumeratormetainfo.cpp \
    $$PWD/metainfo/metainfo.cpp \
    $$PWD/metainfo/metainfoparser.cpp \
    $$PWD/metainfo/propertymetainfo.cpp \
    $$PWD/metainfo/nodemetainfo.cpp \
    $$PWD/metainfo/itemlibraryinfo.cpp \
    $$PWD/metainfo/subcomponentmanager.cpp \
    $$PWD/model/internalproperty.cpp \
    $$PWD/model/model.cpp \
    $$PWD/model/modelnode.cpp \
    $$PWD/model/painteventfilter.cpp \
    $$PWD/model/internalnode.cpp \
    $$PWD/model/propertyparser.cpp \
    $$PWD/model/propertycontainer.cpp \
    $$PWD/pluginmanager/widgetpluginmanager.cpp \
    $$PWD/pluginmanager/widgetpluginpath.cpp \
    $$PWD/instances/nodeinstance.cpp \
    $$PWD/instances/objectnodeinstance.cpp \
    $$PWD/instances/widgetnodeinstance.cpp \
    $$PWD/instances/graphicswidgetnodeinstance.cpp \
    $$PWD/instances/qmlgraphicsitemnodeinstance.cpp \
    $$PWD/instances/graphicsscenenodeinstance.cpp \
    $$PWD/instances/graphicsviewnodeinstance.cpp \
    $$PWD/instances/proxywidgetnodeinstance.cpp \
    $$PWD/instances/qmlviewnodeinstance.cpp \
    $$PWD/instances/dummynodeinstance.cpp \
    $$PWD/instances/qmlpropertychangesnodeinstance.cpp \
    $$PWD/instances/qmlstatenodeinstance.cpp \
    $$PWD/exceptions/exception.cpp \
    $$PWD/exceptions/invalidnodeinstanceexception.cpp \
    $$PWD/exceptions/invalidpropertyexception.cpp \
    $$PWD/exceptions/invalidmodelnodeexception.cpp \
    $$PWD/exceptions/invalidreparentingexception.cpp \
    $$PWD/exceptions/invalidmetainfoexception.cpp \
    $$PWD/exceptions/invalidargumentexception.cpp \
    $$PWD/exceptions/noanchoringpossibleexception.cpp \
    $$PWD/exceptions/notimplementedexception.cpp \
    $$PWD/exceptions/invalidnodestateexception.cpp \
    $$PWD/model/variantparser.cpp \
    $$PWD/exceptions/invalidmodelstateexception.cpp \
    $$PWD/exceptions/removebasestateexception.cpp \
    $$PWD/exceptions/invalididexception.cpp \
    $$PWD/model/propertynode.cpp \
    $$PWD/exceptions/invalidslideindexexception.cpp \
    $$PWD/instances/graphicsobjectnodeinstance.cpp \
    $$PWD/model/import.cpp \
    $$PWD/instances/componentnodeinstance.cpp \
    $$PWD/exceptions/invalidqmlsourceexception.cpp \
    $$PWD/model/viewlogger.cpp \
    $$PWD/model/internalvariantproperty.cpp \
    $$PWD/model/internalnodelistproperty.cpp \
    $$PWD/model/variantproperty.cpp \
    $$PWD/model/nodelistproperty.cpp \
    $$PWD/model/abstractproperty.cpp \
    $$PWD/model/internalbindingproperty.cpp \
    $$PWD/model/bindingproperty.cpp \
    $$PWD/model/internalnodeproperty.cpp \
    $$PWD/model/internalnodeabstractproperty.cpp \
    $$PWD/model/nodeabstractproperty.cpp \
    $$PWD/model/nodeproperty.cpp \
    $$PWD/model/modeltotextmerger.cpp \
    $$PWD/model/texttomodelmerger.cpp \
    $$PWD/model/plaintexteditmodifier.cpp \
    $$PWD/model/componenttextmodifier.cpp \
    $$PWD/model/textmodifier.cpp \
    $$PWD/model/qmlmodelview.cpp \
    $$PWD/model/qmlitemnode.cpp \
    $$PWD/model/qmlstate.cpp \
    $$PWD/model/qmlchangeset.cpp \
    $$PWD/model/qmlmodelnodefacade.cpp \
    $$PWD/model/qmlobjectnode.cpp \
    $$PWD/model/qmlanchors.cpp \
    $$PWD/rewritertransaction.cpp \
    $$PWD/model/rewriteaction.cpp \
    $$PWD/model/modelnodepositionstorage.cpp \
    $$PWD/model/modelnodepositionrecalculator.cpp \
    $$PWD/model/rewriteactioncompressor.cpp \
    $$PWD/model/qmltextgenerator.cpp \
    $$PWD/model/modelmerger.cpp \
    $$PWD/instances/qmltransitionnodeinstance.cpp \
    $$PWD/exceptions/rewritingexception.cpp \
    $$PWD/instances/nodeinstancemetaobject.cpp \
    $$PWD/instances/behaviornodeinstance.cpp \
    $$PWD/instances/nodeinstancesignalspy.cpp

HEADERS += $$PWD/include/corelib_global.h \
    $$PWD/include/abstractview.h \
    $$PWD/include/nodeinstanceview.h \
    $$PWD/include/rewriterview.h \
    $$PWD/include/enumeratormetainfo.h \
    $$PWD/include/metainfo.h \
    $$PWD/include/metainfoparser.h \
    $$PWD/include/nodemetainfo.h \
    $$PWD/include/propertymetainfo.h \
    $$PWD/include/itemlibraryinfo.h \
    $$PWD/model/internalproperty.h \
    $$PWD/include/modelnode.h \
    $$PWD/include/model.h \
    $$PWD/include/nodeproperty.h \
    $$PWD/include/widgetqueryview.h \
    $$PWD/include/subcomponentmanager.h \
    $$PWD/include/propertycontainer.h \
    $$PWD/model/internalnode_p.h \
    $$PWD/model/model_p.h \
    $$PWD/model/painteventfilter_p.h \
    $$PWD/model/propertyparser.h \
    $$PWD/pluginmanager/widgetpluginmanager.h \
    $$PWD/pluginmanager/widgetpluginpath.h \
    $$PWD/include/nodeinstance.h \
    $$PWD/instances/objectnodeinstance.h \
    $$PWD/instances/widgetnodeinstance.h \
    $$PWD/instances/graphicswidgetnodeinstance.h \
    $$PWD/instances/qmlgraphicsitemnodeinstance.h \
    $$PWD/instances/graphicsscenenodeinstance.h \
    $$PWD/instances/graphicsviewnodeinstance.h \
    $$PWD/instances/proxywidgetnodeinstance.h \
    $$PWD/instances/qmlviewnodeinstance.h \
    $$PWD/instances/dummynodeinstance.h \
    $$PWD/instances/qmlpropertychangesnodeinstance.h \
    $$PWD/instances/qmlstatenodeinstance.h \
    $$PWD/include/exception.h \
    $$PWD/include/invalidnodeinstanceexception.h \
    $$PWD/include/invalidmodelnodeexception.h \
    $$PWD/include/invalidreparentingexception.h \
    $$PWD/include/invalidmetainfoexception.h \
    $$PWD/include/invalidargumentexception.h \
    $$PWD/include/notimplementedexception.h \
    $$PWD/include/invalidpropertyexception.h \
    $$PWD/include/invalidmodelstateexception.h \
    $$PWD/include/removebasestateexception.h \
    $$PWD/include/invalididexception.h \
    $$PWD/model/variantparser.h \
    $$PWD/include/propertynode.h \
    $$PWD/include/invalidslideindexexception.h \
    $$PWD/instances/graphicsobjectnodeinstance.h \
    $$PWD/include/import.h \
    $$PWD/instances/componentnodeinstance.h \
    $$PWD/include/invalidqmlsourceexception.h \
    $$PWD/model/viewlogger.h \
    $$PWD/model/internalvariantproperty.h \
    $$PWD/model/internalnodelistproperty.h \
    $$PWD/include/variantproperty.h \
    $$PWD/include/nodelistproperty.h \
    $$PWD/include/abstractproperty.h \
    $$PWD/model/internalbindingproperty.h \
    $$PWD/include/bindingproperty.h \
    $$PWD/model/internalnodeproperty.h \
    $$PWD/model/internalnodeabstractproperty.h \
    $$PWD/include/nodeabstractproperty.h \
    $$PWD/include/plaintexteditmodifier.h \
    $$PWD/include/basetexteditmodifier.h \
    $$PWD/include/componenttextmodifier.h \
    $$PWD/include/textmodifier.h \
    $$PWD/model/modeltotextmerger.h \
    $$PWD/model/texttomodelmerger.h \
    $$PWD/include/qmlmodelview.h \
    $$PWD/include/qmlitemnode.h \
    $$PWD/include/qmlstate.h \
    $$PWD/include/qmlchangeset.h \
    $$PWD/include/qmlmodelnodefacade.h \
    $$PWD/include/forwardview.h \
    $$PWD/include/qmlobjectnode.h \
    $$PWD/include/qmlanchors.h \
    $$PWD/rewritertransaction.h \
    $$PWD/model/rewriteaction.h \
    $$PWD/include/modelnodepositionstorage.h \
    $$PWD/model/modelnodepositionrecalculator.h \
    $$PWD/model/rewriteactioncompressor.h \
    $$PWD/model/qmltextgenerator.h \
    $$PWD/include/modelmerger.h \
    $$PWD/include/mathutils.h \
    $$PWD/instances/qmltransitionnodeinstance.h \
    $$PWD/include/customnotifications.h \
    $$PWD/include/rewritingexception.h \
    $$PWD/instances/nodeinstancemetaobject.h \
    $$PWD/instances/behaviornodeinstance.h \
    $$PWD/instances/nodeinstancesignalspy.h

contains(CONFIG, plugin) {
# If core.pri has been included in the qmldesigner plugin
SOURCES += $$PWD/model/basetexteditmodifier.cpp
HEADERS +=     $$PWD/include/basetexteditmodifier.h

}

DISTFILES += $$PWD/metafile/widget.metafile
RESOURCES += $$PWD/core.qrc
OTHER_FILES += $$PWD/metainfo/gui.metainfo


Fixed static link problem under Solaris by adding libSM.

######################################################################
# $Revision: 1.10 $ $Author: shoops $ $Date: 2003/05/27 14:18:10 $
######################################################################

# In the case the BUILD_OS is not specified we make a guess.
isEmpty(BUILD_OS) {
  win32 {
    BUILD_OS = WIN32
  } else {
    BUILD_OS = $$system(uname)
  }
}
DEFINES += $${BUILD_OS}
message("Configuring for $${BUILD_OS}.")

# Common configuration settings
CONFIG += exceptions
CONFIG += rtti
CONFIG += thread

!contains(BUILD_OS, WIN32) {
  # The character # (hex 23) can not be escaped we therefore create
  # a variable containing it
  HASH = $$system(echo "\\043")
  contains(HASH, \\043){
    HASH = $$system(echo -e "\\043")
  }

  myLex = \
          $(LEX) -t $< | \
          sed -e 's/class istream;/$${HASH}include "copasi.h"/' \
              -e 's/<FlexLexer.h>/"FlexLexer.h"/' \
              -e 's/$${HASH}include <unistd.h>/using namespace std;/' > $@
}

contains(BUILD_OS, Darwin) {
  INCLUDEPATH += /System/Library/Frameworks/vecLib.framework/Headers
  LIBS += -framework vecLib
  LIBS += -framework Carbon
  LIBS += -framework QuickTime
  LIBS += -lz
  CONFIG -= thread
}

contains(BUILD_OS, WIN32) {
  DEFINES -= UNICODE
  debug {
    QMAKE_LFLAGS_WINDOWS += /NODEFAULTLIB:"msvcrt.lib"
  }

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    QMAKE_CXXFLAGS_DEBUG   += -I"$${MKL_PATH}\include"
    QMAKE_CXXFLAGS_RELEASE += -I"$${MKL_PATH}\include"
    QMAKE_LFLAGS_WINDOWS += /LIBPATH:"$${MKL_PATH}\ia32\lib"
    LIBS += mkl_lapack.lib mkl_p3.lib mkl_c.lib
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      QMAKE_CXXFLAGS_DEBUG   += -I"$${CLAPACK_PATH}\include"
      QMAKE_CXXFLAGS_RELEASE += -I"$${CLAPACK_PATH}\include"
      QMAKE_LFLAGS_WINDOWS += /LIBPATH:"$${CLAPACK_PATH}\lib"
      LIBS += clapack.lib
    } else {
      error( "Either MKL_PATH or CLAPACK_PATH must be specified" )
    }
  }

  !isEmpty(EXPAT_PATH) {
    QMAKE_CXXFLAGS_DEBUG   += -I"$${EXPAT_PATH}\Source\lib"
    QMAKE_CXXFLAGS_RELEASE += -I"$${EXPAT_PATH}\Source\lib"
    QMAKE_LFLAGS_WINDOWS += /LIBPATH:"$${EXPAT_PATH}\StaticLibs"
    LIBS += libexpat.lib
  } else {
    error( "EXPAT_PATH must be specified" )
  }
}

contains(BUILD_OS, SunOS) {
  !isEmpty(CLAPACK_PATH) {
    DEFINES += USE_CLAPACK
    INCLUDEPATH += $${CLAPACK_PATH}/include
    LIBS += -llapack -lblas -lF77 -lfl
    LIBS += -L$${CLAPACK_PATH}/lib
  } else {
    error( "CLAPACK_PATH must be specified" )
  }
  LIBS += -lSM
}

contains(BUILD_OS, Linux) {
  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    INCLUDEPATH += $${MKL_PATH}/include
    LIBS += -lmkl_lapack -lmkl_p3 -lg2c -lpthread
    LIBS +=  -L$${MKL_PATH}/lib/32
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      INCLUDEPATH += $${CLAPACK_PATH}/include
      LIBS += -llapack -lblas -lF77 -lfl
      LIBS += -L$${CLAPACK_PATH}/lib
    } else {
      error( "Either MKL_PATH or CLAPACK_PATH must be specified" )
    }
  }
}

######################################################################
# $Revision: 1.9 $ $Author: shoops $ $Date: 2003/05/21 20:36:32 $
######################################################################

# In the case the BUILD_OS is not specified we make a guess.
isEmpty(BUILD_OS) {
  win32 {
    BUILD_OS = WIN32
  } else {
    BUILD_OS = $$system(uname)
  }
}
DEFINES += $${BUILD_OS}
message("Configuring for $${BUILD_OS}.")

# Common configuration settings
CONFIG += exceptions
CONFIG += rtti
CONFIG += thread

!contains(BUILD_OS, WIN32) {
  # The character # (hex 23) can not be escaped we therefore create
  # a variable containing it
  HASH = $$system(echo "\\043")
  contains(HASH, \\043){
    HASH = $$system(echo -e "\\043")
  }

  myLex = \
          $(LEX) -t $< | \
          sed -e 's/class istream;/$${HASH}include "copasi.h"/' \
              -e 's/<FlexLexer.h>/"FlexLexer.h"/' \
              -e 's/$${HASH}include <unistd.h>/using namespace std;/' > $@
}

contains(BUILD_OS, Darwin) {
  INCLUDEPATH += /System/Library/Frameworks/vecLib.framework/Headers
  LIBS += -framework vecLib
  LIBS += -framework Carbon
  LIBS += -framework QuickTime
  LIBS += -lz
  CONFIG -= thread
}

contains(BUILD_OS, WIN32) {
  DEFINES -= UNICODE
  debug {
    QMAKE_LFLAGS_WINDOWS += /NODEFAULTLIB:"msvcrt.lib"
  }

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    QMAKE_CXXFLAGS_DEBUG   += -I"$${MKL_PATH}\include"
    QMAKE_CXXFLAGS_RELEASE += -I"$${MKL_PATH}\include"
    QMAKE_LFLAGS_WINDOWS += /LIBPATH:"$${MKL_PATH}\ia32\lib"
    LIBS += mkl_lapack.lib mkl_p3.lib mkl_c.lib
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      QMAKE_CXXFLAGS_DEBUG   += -I"$${CLAPACK_PATH}\include"
      QMAKE_CXXFLAGS_RELEASE += -I"$${CLAPACK_PATH}\include"
      QMAKE_LFLAGS_WINDOWS += /LIBPATH:"$${CLAPACK_PATH}\lib"
      LIBS += clapack.lib
    } else {
      error( "Either MKL_PATH or CLAPACK_PATH must be specified" )
    }
  }

  !isEmpty(EXPAT_PATH) {
    QMAKE_CXXFLAGS_DEBUG   += -I"$${EXPAT_PATH}\Source\lib"
    QMAKE_CXXFLAGS_RELEASE += -I"$${EXPAT_PATH}\Source\lib"
    QMAKE_LFLAGS_WINDOWS += /LIBPATH:"$${EXPAT_PATH}\StaticLibs"
    LIBS += libexpat.lib
  } else {
    error( "EXPAT_PATH must be specified" )
  }
}

contains(BUILD_OS, SunOS) {
  !isEmpty(CLAPACK_PATH) {
    DEFINES += USE_CLAPACK
    INCLUDEPATH += $${CLAPACK_PATH}/include
    LIBS += -llapack -lblas -lF77 -lfl
    LIBS += -L$${CLAPACK_PATH}/lib
  } else {
    error( "CLAPACK_PATH must be specified" )
  }
}

contains(BUILD_OS, Linux) {
  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    INCLUDEPATH += $${MKL_PATH}/include
    LIBS += -lmkl_lapack -lmkl_p3 -lg2c -lpthread
    LIBS +=  -L$${MKL_PATH}/lib/32
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      INCLUDEPATH += $${CLAPACK_PATH}/include
      LIBS += -llapack -lblas -lF77 -lfl
      LIBS += -L$${CLAPACK_PATH}/lib
    } else {
      error( "Either MKL_PATH or CLAPACK_PATH must be specified" )
    }
  }
}


Add system version zeromq lib lookup

Add system version zeromq lib lookup

# Add debug extension if debugmode (only default on for windows)
dbg_ext =
win32:CONFIG(debug, debug|release):dbg_ext =
#unix:CONFIG(debug, debug|release):dbg_ext = d

# Set expected local install dir
zeromq_home = $${PWD}/zeromq
zeromq_lib = $${zeromq_home}/lib
zeromq_bin = $${zeromq_home}/bin

defineTest(have_local_zeromq) {
  exists($${zeromq_lib}) {
    return(true)
  }
  return(false)
}

defineTest(have_system_zeromq) {
  packagesExist(libzmq) {
    return(true)
  }
  return(false)
}

defineTest(have_zeromq) {
  have_local_zeromq() {
    return(true)
  }
  have_system_zeromq() {
    return(true)
  }
  return(false)
}

have_local_zeromq() {
  INCLUDEPATH *= $${zeromq_home}/include
  win32:LIBS *= -L$${zeromq_bin} -lzmq$${dbg_ext}
  unix:LIBS *= -L$${zeromq_lib} -lzmq$${dbg_ext}
  # Note! The RPATH is absolute and only meant for dev builds in the IDE, on release runtime paths should be stripped
  unix:QMAKE_RPATHDIR *= $${zeromq_lib}
  win32:QMAKE_RPATHDIR *= $${zeromq_bin}
  message(Found local ZeroMQ)
} else:have_system_zeromq() {
  CONFIG *= link_pkgconfig
  PKGCONFIG *= libzmq
  message(Found system pkg-config ZeroMQ)
}

# Add debug if debugmode (only default on for windows)
dbg_ext =
win32:CONFIG(debug, debug|release):dbg_ext =
#unix:CONFIG(debug, debug|release):dbg_ext = d

# Set libpath and libname
zeromq_home = $${PWD}/zeromq
zeromq_lib = $${zeromq_home}/lib
zeromq_bin = $${zeromq_home}/bin
libname = zmq

defineTest(have_zeromq) {
  exists($${zeromq_lib}) {
    return(true)
  }
  return(false)
}

have_zeromq() {
  INCLUDEPATH *= $${zeromq_home}/include
  win32:LIBS *= -L$${zeromq_bin} -l$${libname}$${dbg_ext}
  unix:LIBS *= -L$${zeromq_lib} -l$${libname}$${dbg_ext}
  # Note! The RPATH is absolute and only meant for dev builds in the IDE, on release runtime paths should be stripped
  unix:QMAKE_RPATHDIR *= $${zeromq_lib}
  win32:QMAKE_RPATHDIR *= $${zeromq_bin}
}


If we're building a static library there's nothing to deploy.

################################################################################
# Copyright 2012-2017 Esri
#
#  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.
################################################################################

CONFIG(debug, debug|release) {
  macx:  DebugSuffix = _debug
  win32: DebugSuffix = d
}

macx: PLATFORM = "macOS"
unix:!macx:!android:!ios: PLATFORM = "linux"
win32: PLATFORM = "windows"
ios: PLATFORM = "iOS"
android: {
  PLATFORM = "android"
  contains(QT_ARCH, i386) {
    ANDROID_ARCH = "x86"
  } else {
    ANDROID_ARCH = "armv7"
  }
}

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

!android:!win32: PLATFORM_OUTPUT = $$PLATFORM
android: PLATFORM_OUTPUT = $$PLATFORM/$$ANDROID_ARCH
win32: {
  contains(QT_ARCH, x86_64): {
    PLATFORM_OUTPUT = $$PLATFORM/x64
  } else {
    PLATFORM_OUTPUT = $$PLATFORM/x86
  }
}

# make sure the local toolkit libs come first on the link line
ARCGIS_RT_SDK_LIBS = $$LIBS
LIBS = -L$$PWD/output/$$PLATFORM_OUTPUT -lArcGISRuntimeToolkitCppApi$${ToolkitPrefix}$${DebugSuffix} $$ARCGIS_RT_SDK_LIBS

# unset the previous toolkit defines and import paths
DEFINES -= ARCGIS_TOOLKIT_IMPORT_PATH=\"$$ARCGIS_TOOLKIT_IMPORT_PATH\"
QML_IMPORT_PATH -= $${ARCGIS_TOOLKIT_IMPORT_PATH}
QMLPATHS -= $${ARCGIS_TOOLKIT_IMPORT_PATH}

# Set and use the local toolkit defines and import paths
ARCGIS_TOOLKIT_IMPORT_PATH = $$absolute_path($$PWD/../../Import)
DEFINES += ARCGIS_TOOLKIT_IMPORT_PATH=\"$$ARCGIS_TOOLKIT_IMPORT_PATH\"
QML_IMPORT_PATH += $${ARCGIS_TOOLKIT_IMPORT_PATH}
QMLPATHS += $${ARCGIS_TOOLKIT_IMPORT_PATH}

# DEFINES
unix:!macx:!ios {
  contains(QMAKE_HOST.os, Linux):{
    # on some linux platforms the string 'linux' is replaced with 1
    # temporarily replace it with ARCGISRUNTIME_SDK_LINUX_REPLACEMENT
    LINUX_PLATFORM_REPLACEMENT = ARCGISRUNTIME_SDK_LINUX_REPLACEMENT
    ARCGIS_TOOLKIT_IMPORT_PATH = $$replace(ARCGIS_TOOLKIT_IMPORT_PATH, linux, $$LINUX_PLATFORM_REPLACEMENT)
    DEFINES += LINUX_PLATFORM_REPLACEMENT=$$LINUX_PLATFORM_REPLACEMENT
  }
}

android:!CONFIG(TOOLKIT_STATIC_BUILD) {
  ANDROID_EXTRA_LIBS += \
  $$PWD/output/$$PLATFORM_OUTPUT/libArcGISRuntimeToolkitCppApi$${ToolkitPrefix}.so
}

################################################################################
# Copyright 2012-2017 Esri
#
#  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.
################################################################################

CONFIG(ToolkitBuildUsePrefix): ToolkitPrefix = _dev

CONFIG(debug, debug|release) {
  macx:  DebugSuffix = _debug
  win32: DebugSuffix = d
}

macx: PLATFORM = "macOS"
unix:!macx:!android:!ios: PLATFORM = "linux"
win32: PLATFORM = "windows"
ios: PLATFORM = "iOS"
android: {
  PLATFORM = "android"
  contains(QT_ARCH, i386) {
    ANDROID_ARCH = "x86"
  } else {
    ANDROID_ARCH = "armv7"
  }
}

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

!android:!win32: PLATFORM_OUTPUT = $$PLATFORM
android: PLATFORM_OUTPUT = $$PLATFORM/$$ANDROID_ARCH
win32: {
  contains(QT_ARCH, x86_64): {
    PLATFORM_OUTPUT = $$PLATFORM/x64
  } else {
    PLATFORM_OUTPUT = $$PLATFORM/x86
  }
}

# make sure the local toolkit libs come first on the link line
ARCGIS_RT_SDK_LIBS = $$LIBS
LIBS = -L$$PWD/output/$$PLATFORM_OUTPUT -lArcGISRuntimeToolkitCppApi$${ToolkitPrefix}$${DebugSuffix} $$ARCGIS_RT_SDK_LIBS

# unset the previous toolkit defines and import paths
DEFINES -= ARCGIS_TOOLKIT_IMPORT_PATH=\"$$ARCGIS_TOOLKIT_IMPORT_PATH\"
QML_IMPORT_PATH -= $${ARCGIS_TOOLKIT_IMPORT_PATH}
QMLPATHS -= $${ARCGIS_TOOLKIT_IMPORT_PATH}

# Set and use the local toolkit defines and import paths
ARCGIS_TOOLKIT_IMPORT_PATH = $$absolute_path($$PWD/../../Import)
DEFINES += ARCGIS_TOOLKIT_IMPORT_PATH=\"$$ARCGIS_TOOLKIT_IMPORT_PATH\"
QML_IMPORT_PATH += $${ARCGIS_TOOLKIT_IMPORT_PATH}
QMLPATHS += $${ARCGIS_TOOLKIT_IMPORT_PATH}

# DEFINES
unix:!macx:!ios {
  contains(QMAKE_HOST.os, Linux):{
    # on some linux platforms the string 'linux' is replaced with 1
    # temporarily replace it with ARCGISRUNTIME_SDK_LINUX_REPLACEMENT
    LINUX_PLATFORM_REPLACEMENT = ARCGISRUNTIME_SDK_LINUX_REPLACEMENT
    ARCGIS_TOOLKIT_IMPORT_PATH = $$replace(ARCGIS_TOOLKIT_IMPORT_PATH, linux, $$LINUX_PLATFORM_REPLACEMENT)
    DEFINES += LINUX_PLATFORM_REPLACEMENT=$$LINUX_PLATFORM_REPLACEMENT
  }
}

android {
  ANDROID_EXTRA_LIBS += \
  $$PWD/output/$$PLATFORM_OUTPUT/libArcGISRuntimeToolkitCppApi$${ToolkitPrefix}.so
}


Updating for recent qt-pods.

Updating for recent qt-pods.

INCLUDEPATH += \
    $$PWD

LIBS += \
    -L../qtsystemtrayiconmac -lqtsystemtrayiconmac

LIBS += -framework Cocoa


Really turn warnings into errors

Really turn warnings into errors

Correct a typo in the project file.

#-----------------------------------------------------------------------------
# Common variables for all projects.
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Common configuration for all projects.
#-----------------------------------------------------------------------------

CONFIG         += link_pkgconfig
#MOC_DIR         = .moc
#OBJECTS_DIR     = .obj
RCC_DIR         = resources
UI_DIR          = ui
UI_HEADERS_DIR  = ui/include
UI_SOURCES_DIR  = ui/src

QMAKE_CXXFLAGS += -fno-exceptions \
    -fno-rtti
# we don't like warnings...
QMAKE_CXXFLAGS += -Werror

TOP_SRC_DIR     = $$PWD

#DEFINES += QT_NO_DEBUG_OUTPUT
DEFINES += SIGNON_TRACE

#-----------------------------------------------------------------------------
# setup the installation prefix
#-----------------------------------------------------------------------------
INSTALL_PREFIX = /usr  # default installation prefix

# default prefix can be overriden by defining PREFIX when running qmake
isEmpty( PREFIX ) {
    message("====")
    message("==== NOTE: To override the installation path run: `qmake PREFIX=/custom/path'")
    message("==== (current installation path is `$${INSTALL_PREFIX}')")
} else {
    INSTALL_PREFIX = $${PREFIX}
    message("====")
    message("==== install prefix set to `$${INSTALL_PREFIX}'")
}

# Setup the library installation directory
exists( meego-release ) {
    ARCH = $$system(tail -n1 meego-release)
} else {
    ARCH = $$system(uname -m)
}

contains( ARCH, x86_64 ) {
    INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib64
} else {
    INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib
}

# default library directory can be overriden by defining LIBDIR when
# running qmake
isEmpty( LIBDIR ) {
    message("====")
    message("==== NOTE: To override the library installation path run: `qmake LIBDIR=/custom/path'")
    message("==== (current installation path is `$${INSTALL_LIBDIR}')")
} else {
    INSTALL_LIBDIR = $${LIBDIR}
    message("====")
    message("==== library install path set to `$${INSTALL_LIBDIR}'")
}

# Default directory for signond extensions
_PLUGINS = $$system(pkg-config --variable=plugindir signon-plugins)
isEmpty(_PLUGINS) {
    error("plugin directory not available through pkg-config")
} else {
    SIGNON_PLUGINS_DIR = $$_PLUGINS
}
SIGNON_PLUGINS_DIR_QUOTED = \\\"$$SIGNON_PLUGINS_DIR\\\"

include( coverage.pri )

#-----------------------------------------------------------------------------
# Common variables for all projects.
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Common configuration for all projects.
#-----------------------------------------------------------------------------

CONFIG         += link_pkgconfig
#MOC_DIR         = .moc
#OBJECTS_DIR     = .obj
RCC_DIR         = resources
UI_DIR          = ui
UI_HEADERS_DIR  = ui/include
UI_SOURCES_DIR  = ui/src

QMAKE_CXXFLAGS += -fno-exceptions \
    -fno-rtti
# we don't like warnings...
QMAKE_CXXFLAGS -= -Werror

TOP_SRC_DIR     = $$PWD

#DEFINES += QT_NO_DEBUG_OUTPUT
DEFINES += SIGNON_TRACE

#-----------------------------------------------------------------------------
# setup the installation prefix
#-----------------------------------------------------------------------------
INSTALL_PREFIX = /usr  # default installation prefix

# default prefix can be overriden by defining PREFIX when running qmake
isEmpty( PREFIX ) {
    message("====")
    message("==== NOTE: To override the installation path run: `qmake PREFIX=/custom/path'")
    message("==== (current installation path is `$${INSTALL_PREFIX}')")
} else {
    INSTALL_PREFIX = $${PREFIX}
    message("====")
    message("==== install prefix set to `$${INSTALL_PREFIX}'")
}

# Setup the library installation directory
exists( meego-release ) {
    ARCH = $$system(tail -n1 meego-release)
} else {
    ARCH = $$system(uname -m)
}

contains( ARCH, x86_64 ) {
    INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib64
} else {
    INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib
}

# default library directory can be overriden by defining LIBDIR when
# running qmake
isEmpty( LIBDIR ) {
    message("====")
    message("==== NOTE: To override the library installation path run: `qmake LIBDIR=/custom/path'")
    message("==== (current installation path is `$${INSTALL_LIBDIR}')")
} else {
    INSTALL_LIBDIR = $${LIBDIR}
    message("====")
    message("==== library install path set to `$${INSTALL_LIBDIR}'")
}

# Default directory for signond extensions
_PLUGINS = $$system(pkg-config --variable=plugindir signon-plugins)
isEmpty(_PLUGINS) {
    error("plugin directory not available through pkg-config")
} else {
    SIGNON_PLUGINS_DIR = $$_PLUGINS
}
SIGNON_PLUGINS_DIR_QUOTED = \\\"$$SIGNON_PLUGINS_DIR\\\"

include( coverage.pri )


git-svn-id: svn+ssh://elmi.iti.uni-luebeck.de/export/svn/Hanse/trunk@239 8f13a6d9-6203-4c43-9b9f-a3039379152f

win32 {
    INCLUDEPATH += $$PWD/include
    LIBPATH += $$PWD/lib/opencv
    LIBPATH += $$PWD/lib/videoInput
    LIBS += -lcv210 -lcxcore210 -lcvaux210 -lhighgui210

    # DShow
    LIBS += -lvideoInput -lddraw -ldxguid -lstrmbase -lstrmiids -luuid -lole32 -loleaut32
}

# debian/ubuntu: aptitude install libcv-dev libcvaux-dev libhighgui-dev libswscale-dev
unix:LIBS += -lcv -lcxcore -lcvaux #-lhighgui -lswscale

win32 {
    INCLUDEPATH += $$PWD/include
    LIBPATH += $$PWD/lib/opencv
    LIBS += -lcv210 -lcxcore210 -lcvaux210 -lhighgui210

    # DShow
    # LIBS += -ldxguid -lstrmbase -lstrmiids -luuid -lole32 -loleaut32
}

# debian/ubuntu: aptitude install libcv-dev libcvaux-dev libhighgui-dev libswscale-dev
unix:LIBS += -lcv -lcxcore -lcvaux #-lhighgui -lswscale


Fix compile error while using Qt private headers

Conflicts:
	libs/mavlink/include/mavlink/v1.0
	mavlink_generator
	src/GPS/Drivers

android {

    QT += androidextras core-private

    INCLUDEPATH += $$PWD

    PUBLIC_HEADERS += \
        $$PWD/qserialport.h \
        $$PWD/qserialportinfo.h

    PRIVATE_HEADERS += \
        $$PWD/qserialport_p.h \
        $$PWD/qserialportinfo_p.h \
        $$PWD/qserialport_android_p.h

    SOURCES += \
        $$PWD/qserialport.cpp \
        $$PWD/qserialportinfo.cpp \
        $$PWD/qserialport_android.cpp \
        $$PWD/qserialportinfo_android.cpp

    CONFIG += mobility

    HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS

}

android {

    QT += androidextras

    INCLUDEPATH += $$PWD

    PUBLIC_HEADERS += \
        $$PWD/qserialport.h \
        $$PWD/qserialportinfo.h

    PRIVATE_HEADERS += \
        $$PWD/qserialport_p.h \
        $$PWD/qserialportinfo_p.h \
        $$PWD/qserialport_android_p.h

    SOURCES += \
        $$PWD/qserialport.cpp \
        $$PWD/qserialportinfo.cpp \
        $$PWD/qserialport_android.cpp \
        $$PWD/qserialportinfo_android.cpp

    CONFIG += mobility

    HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS

}


Changed gcc lib extension to be dll #13

Changed gcc lib extension to be dll #13

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

include($$PWD/win32.pri)

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

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

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

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

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

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

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

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

include($$PWD/win32.pri)

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

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

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

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

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

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

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


Windows 64bit target

Windows 64bit target

isEmpty(TOP_BUILD_DIR) {
    BIN_DIR = $$OUT_PWD/../bin
} else {
    BIN_DIR = $$TOP_BUILD_DIR/bin
}

DESTDIR = $$BIN_DIR

CONFIG += c++11 warn_off

unix|win32-g++|win64-g++ {
    QMAKE_CXXFLAGS_WARN_OFF -= -w
    QMAKE_CXXFLAGS += -Wall
    QMAKE_CXXFLAGS += \
        -Wno-c++0x-compat \
        -Wno-unused-parameter \
        -Wno-unused-function \
        -Wno-inconsistent-missing-override \
        -Wno-deprecated-register \
        -Wno-unused-const-variable \
        -Wno-switch-bool
} else {
    win32|win64 {
        QMAKE_CXXFLAGS_WARN_OFF -= -W0
        QMAKE_CXXFLAGS += -W3 /wd4100 /wd4065 /wd4573
        DEFINES += _CRT_SECURE_NO_WARNINGS
    }
}

isEmpty(TOP_BUILD_DIR) {
    BIN_DIR = $$OUT_PWD/../bin
} else {
    BIN_DIR = $$TOP_BUILD_DIR/bin
}

DESTDIR = $$BIN_DIR

CONFIG += c++11 warn_off

unix|win32-g++ {
    QMAKE_CXXFLAGS_WARN_OFF -= -w
    QMAKE_CXXFLAGS += -Wall
    QMAKE_CXXFLAGS += \
        -Wno-c++0x-compat \
        -Wno-unused-parameter \
        -Wno-unused-function \
        -Wno-inconsistent-missing-override \
        -Wno-deprecated-register \
        -Wno-unused-const-variable \
        -Wno-switch-bool
} else {
    win32 {
        QMAKE_CXXFLAGS_WARN_OFF -= -W0
        QMAKE_CXXFLAGS += -W3 /wd4100 /wd4065 /wd4573
        DEFINES += _CRT_SECURE_NO_WARNINGS
    }
}


Fix include path.

Fix include path.

################################################################################
# Copyright 2012-2017 Esri
#
#  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.
################################################################################

macx: PLATFORM = "macOS"
unix:!macx:!android:!ios: PLATFORM = "linux"
win32: PLATFORM = "windows"
ios: PLATFORM = "iOS"
android: {
  PLATFORM = "android"
  contains(QT_ARCH, i386) {
    ANDROID_ARCH = "x86"
  } else {
    ANDROID_ARCH = "armv7"
  }
}

INCLUDEPATH += $$PWD/include

!android:!win32: PLATFORM_OUTPUT = $$PLATFORM
android: PLATFORM_OUTPUT = $$PLATFORM/$$ANDROID_ARCH
win32: {
  contains(QMAKE_TARGET.arch, x86_64): {
    PLATFORM_OUTPUT = $$PLATFORM/x64
  } else {
    PLATFORM_OUTPUT = $$PLATFORM/x86
  }
}

QMAKE_LFLAGS += -L$$PWD/output/$$PLATFORM_OUTPUT -lArcGISRuntimeToolkitCppApi

################################################################################
# Copyright 2012-2017 Esri
#
#  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.
################################################################################

macx: PLATFORM = "macOS"
unix:!macx:!android:!ios: PLATFORM = "linux"
win32: PLATFORM = "windows"
ios: PLATFORM = "iOS"
android: {
  PLATFORM = "android"
  contains(QT_ARCH, i386) {
    ANDROID_ARCH = "x86"
  } else {
    ANDROID_ARCH = "armv7"
  }
}

INCLUDEPATH += $PWD/include

!android:!win32: PLATFORM_OUTPUT = $$PLATFORM
android: PLATFORM_OUTPUT = $$PLATFORM/$$ANDROID_ARCH
win32: {
  contains(QMAKE_TARGET.arch, x86_64): {
    PLATFORM_OUTPUT = $$PLATFORM/x64
  } else {
    PLATFORM_OUTPUT = $$PLATFORM/x86
  }
}

QMAKE_LFLAGS += -L$$PWD/output/$$PLATFORM_OUTPUT -lArcGISRuntimeToolkitCppApi


Remove duplicate header.

Remove duplicate header.

CONFIG += mobility

PUBLIC_HEADERS += \
    nfc/qnearfieldmanager.h \
    nfc/qnearfieldtarget.h \
    nfc/qndefrecord.h \
    nfc/qndefnfctextrecord.h \
    nfc/qndefmessage.h \
    nfc/qndeffilter.h \
    nfc/qndefnfcurirecord.h \
    nfc/qnearfieldtagtype1.h \
    nfc/qnearfieldtagtype2.h \
    nfc/qllcpsocket.h \
    nfc/qnearfieldtagtype3.h \
    nfc/qnearfieldtagtype4.h \
    nfc/qllcpserver.h

PRIVATE_HEADERS += \
    nfc/qndefrecord_p.h \
    nfc/qnearfieldtarget_p.h \
    nfc/qnearfieldmanager_p.h \
    nfc/qtlv_p.h \
    nfc/checksum_p.h

SOURCES += \
    nfc/qnearfieldmanager.cpp \
    nfc/qnearfieldtarget.cpp \
    nfc/qndefrecord.cpp \
    nfc/qndefnfctextrecord.cpp \
    nfc/qndefmessage.cpp \
    nfc/qndeffilter.cpp \
    nfc/qndefnfcurirecord.cpp \
    nfc/qnearfieldtagtype1.cpp \
    nfc/qnearfieldtagtype2.cpp \
    nfc/qnearfieldtagtype3.cpp \
    nfc/qllcpsocket.cpp \
    nfc/qnearfieldtagtype4.cpp \
    nfc/qtlv.cpp \
    nfc/qllcpserver.cpp

maemo6|meego {
    NFC_BACKEND_AVAILABLE = yes

    QT *= dbus

    DBUS_INTERFACES += \
        nfc/maemo6/com.nokia.nfc.Manager.xml \
        nfc/maemo6/com.nokia.nfc.Device.xml

    DBUS_ADAPTORS += \
        nfc/maemo6/com.nokia.nfc.AccessRequestor.xml \
        nfc/maemo6/com.nokia.nfc.NDEFHandler.xml

    # work around bug in Qt
    dbus_interface_source.depends = ${QMAKE_FILE_OUT_BASE}.h
    dbus_adaptor_source.depends = ${QMAKE_FILE_OUT_BASE}.h

    # Link against libdbus until Qt has support for passing file descriptors over DBus.
    CONFIG += link_pkgconfig
    DEFINES += DBUS_API_SUBJECT_TO_CHANGE
    PKGCONFIG += dbus-1

    PRIVATE_HEADERS += \
        nfc/qnearfieldmanager_maemo6_p.h \
        nfc/qnearfieldtarget_maemo6_p.h \
        nfc/qllcpsocket_maemo6_p.h \
        nfc/qllcpserver_maemo6_p.h \
        nfc/maemo6/adapter_interface_p.h \
        nfc/maemo6/target_interface_p.h \
        nfc/maemo6/tag_interface_p.h \
        nfc/maemo6/socketrequestor_p.h

    SOURCES += \
        nfc/qnearfieldmanager_maemo6.cpp \
        nfc/qnearfieldtarget_maemo6.cpp \
        nfc/qllcpsocket_maemo6_p.cpp \
        nfc/qllcpserver_maemo6_p.cpp \
        nfc/maemo6/adapter_interface.cpp \
        nfc/maemo6/target_interface.cpp \
        nfc/maemo6/tag_interface.cpp \
        nfc/maemo6/socketrequestor.cpp

    OTHER_FILES += \
        $$DBUS_INTERFACES \
        $$DBUS_ADAPTORS \
        nfc/maemo6/com.nokia.nfc.Adapter.xml \
        nfc/maemo6/com.nokia.nfc.Target.xml \
        nfc/maemo6/com.nokia.nfc.Tag.xml \
        nfc/maemo6/com.nokia.nfc.LLCPRequestor.xml

    # Add OUT_PWD to INCLUDEPATH so that creator picks up headers for generated files
    # This is not needed for the build otherwise.
    INCLUDEPATH += $$OUT_PWD
}

simulator {
    NFC_BACKEND_AVAILABLE = yes

    QT *= gui

    PRIVATE_HEADERS += \
        nfc/qnearfieldmanagervirtualbase_p.h \
        nfc/qnearfieldmanager_simulator_p.h \
        nfc/qllcpsocket_simulator_p.h \
        nfc/qllcpserver_simulator_p.h

    SOURCES += \
        nfc/qnearfieldmanagervirtualbase.cpp \
        nfc/qnearfieldmanager_simulator.cpp \
        nfc/qllcpsocket_simulator_p.cpp \
        nfc/qllcpserver_simulator_p.cpp
}

contains(nfc_symbian_enabled, yes):symbian {
    NFC_BACKEND_AVAILABLE = yes

    MOBILITY = serviceframework
    INCLUDEPATH += $$SOURCE_DIR/src/serviceframework
    qtAddLibrary(QtServiceFramework)

    PRIVATE_HEADERS += \
        nfc/qnearfieldmanager_symbian_p.h \
        nfc/qnearfieldtagtype1_symbian_p.h \
        nfc/qnearfieldtagtype2_symbian_p.h \
        nfc/qllcpsocket_symbian_p.h \
        nfc/qllcpserver_symbian_p.h \
        nfc/qllcpstate_symbian_p.h \
        nfc/qnearfieldtagtype3_symbian_p.h \
        nfc/qnearfieldtagtype4_symbian_p.h \
        nfc/qnearfieldtagmifare_symbian_p.h \
        nfc/qnearfieldllcpdevice_symbian_p.h \
        nfc/symbian/nearfieldmanager_symbian.h \
        nfc/symbian/nearfieldtag_symbian.h \
        nfc/symbian/nearfieldndeftarget_symbian.h \
        nfc/symbian/nearfieldtargetfactory_symbian.h \
        nfc/symbian/nearfieldutility_symbian.h \
        nfc/symbian/llcpserver_symbian.h \
        nfc/symbian/llcpsockettype1_symbian.h \
        nfc/symbian/llcpsockettype2_symbian.h \
        nfc/symbian/nearfieldtagimpl_symbian.h \
        nfc/symbian/nearfieldtagasyncrequest_symbian.h \
        nfc/symbian/nearfieldtagndefoperationcallback_symbian.h \
        nfc/symbian/nearfieldtagoperationcallback_symbian.h \
        nfc/symbian/nearfieldtagndefrequest_symbian.h \
        nfc/symbian/nearfieldtagcommandrequest_symbian.h \
        nfc/symbian/nearfieldtagcommandsrequest_symbian.h \
        nfc/symbian/debug.h \
        nfc/symbian/nearfieldtagimplcommon_symbian.h

    SOURCES += \
        nfc/qnearfieldmanager_symbian.cpp \
        nfc/qnearfieldtagtype1_symbian.cpp \
        nfc/qnearfieldtagtype2_symbian.cpp \
        nfc/qllcpsocket_symbian_p.cpp \
        nfc/qllcpserver_symbian_p.cpp \
        nfc/qllcpstate_symbian_p.cpp \
        nfc/qnearfieldtagtype3_symbian.cpp \
        nfc/qnearfieldtagtype4_symbian.cpp \
        nfc/qnearfieldtagmifare_symbian.cpp \
        nfc/qnearfieldllcpdevice_symbian.cpp \
        nfc/symbian/nearfieldmanager_symbian.cpp \
        nfc/symbian/nearfieldtag_symbian.cpp \
        nfc/symbian/nearfieldndeftarget_symbian.cpp \
        nfc/symbian/nearfieldtargetfactory_symbian.cpp \
        nfc/symbian/nearfieldutility_symbian.cpp \
        nfc/symbian/llcpserver_symbian.cpp \
        nfc/symbian/llcpsockettype1_symbian.cpp \
        nfc/symbian/llcpsockettype2_symbian.cpp \
        nfc/symbian/nearfieldtagasyncrequest_symbian.cpp \
        nfc/symbian/nearfieldtagndefrequest_symbian.cpp \
        nfc/symbian/nearfieldtagcommandrequest_symbian.cpp \
        nfc/symbian/nearfieldtagcommandsrequest_symbian.cpp \
        nfc/symbian/nearfieldtagimplcommon_symbian.cpp

    INCLUDEPATH += $${EPOCROOT}epoc32/include/mw

    LIBS += -lnfc -lndef -lndefaccess -lnfcdiscoveryservice -lllcp -lnfctagextension
}

isEmpty(NFC_BACKEND_AVAILABLE) {
    # unsupported platform stub

    PRIVATE_HEADERS += \
        nfc/qllcpsocket_p.h \
        nfc/qllcpserver_p.h \
        nfc/qnearfieldmanagerimpl_p.h

    SOURCES += \
        nfc/qllcpsocket_p.cpp \
        nfc/qllcpserver_p.cpp \
        nfc/qnearfieldmanagerimpl_p.cpp
}

INCLUDEPATH += $$PWD

CONFIG += mobility

PUBLIC_HEADERS += \
    nfc/qnearfieldmanager.h \
    nfc/qnearfieldtarget.h \
    nfc/qndefrecord.h \
    nfc/qndefnfctextrecord.h \
    nfc/qndefmessage.h \
    nfc/qndeffilter.h \
    nfc/qndefnfcurirecord.h \
    nfc/qnearfieldtagtype1.h \
    nfc/qnearfieldtagtype2.h \
    nfc/qllcpsocket.h \
    nfc/qnearfieldtagtype3.h \
    nfc/qnearfieldtagtype4.h \
    nfc/qllcpserver.h

PRIVATE_HEADERS += \
    nfc/qndefrecord_p.h \
    nfc/qnearfieldtarget_p.h \
    nfc/qnearfieldmanager_p.h \
    nfc/qnearfieldmanagerimpl_p.h \
    nfc/qtlv_p.h \
    nfc/checksum_p.h

SOURCES += \
    nfc/qnearfieldmanager.cpp \
    nfc/qnearfieldtarget.cpp \
    nfc/qndefrecord.cpp \
    nfc/qndefnfctextrecord.cpp \
    nfc/qndefmessage.cpp \
    nfc/qndeffilter.cpp \
    nfc/qndefnfcurirecord.cpp \
    nfc/qnearfieldtagtype1.cpp \
    nfc/qnearfieldtagtype2.cpp \
    nfc/qnearfieldtagtype3.cpp \
    nfc/qllcpsocket.cpp \
    nfc/qnearfieldtagtype4.cpp \
    nfc/qtlv.cpp \
    nfc/qllcpserver.cpp

maemo6|meego {
    NFC_BACKEND_AVAILABLE = yes

    QT *= dbus

    DBUS_INTERFACES += \
        nfc/maemo6/com.nokia.nfc.Manager.xml \
        nfc/maemo6/com.nokia.nfc.Device.xml

    DBUS_ADAPTORS += \
        nfc/maemo6/com.nokia.nfc.AccessRequestor.xml \
        nfc/maemo6/com.nokia.nfc.NDEFHandler.xml

    # work around bug in Qt
    dbus_interface_source.depends = ${QMAKE_FILE_OUT_BASE}.h
    dbus_adaptor_source.depends = ${QMAKE_FILE_OUT_BASE}.h

    # Link against libdbus until Qt has support for passing file descriptors over DBus.
    CONFIG += link_pkgconfig
    DEFINES += DBUS_API_SUBJECT_TO_CHANGE
    PKGCONFIG += dbus-1

    PRIVATE_HEADERS += \
        nfc/qnearfieldmanager_maemo6_p.h \
        nfc/qnearfieldtarget_maemo6_p.h \
        nfc/qllcpsocket_maemo6_p.h \
        nfc/qllcpserver_maemo6_p.h \
        nfc/maemo6/adapter_interface_p.h \
        nfc/maemo6/target_interface_p.h \
        nfc/maemo6/tag_interface_p.h \
        nfc/maemo6/socketrequestor_p.h

    SOURCES += \
        nfc/qnearfieldmanager_maemo6.cpp \
        nfc/qnearfieldtarget_maemo6.cpp \
        nfc/qllcpsocket_maemo6_p.cpp \
        nfc/qllcpserver_maemo6_p.cpp \
        nfc/maemo6/adapter_interface.cpp \
        nfc/maemo6/target_interface.cpp \
        nfc/maemo6/tag_interface.cpp \
        nfc/maemo6/socketrequestor.cpp

    OTHER_FILES += \
        $$DBUS_INTERFACES \
        $$DBUS_ADAPTORS \
        nfc/maemo6/com.nokia.nfc.Adapter.xml \
        nfc/maemo6/com.nokia.nfc.Target.xml \
        nfc/maemo6/com.nokia.nfc.Tag.xml \
        nfc/maemo6/com.nokia.nfc.LLCPRequestor.xml

    # Add OUT_PWD to INCLUDEPATH so that creator picks up headers for generated files
    # This is not needed for the build otherwise.
    INCLUDEPATH += $$OUT_PWD
}

simulator {
    NFC_BACKEND_AVAILABLE = yes

    QT *= gui

    PRIVATE_HEADERS += \
        nfc/qnearfieldmanagervirtualbase_p.h \
        nfc/qnearfieldmanager_simulator_p.h \
        nfc/qllcpsocket_simulator_p.h \
        nfc/qllcpserver_simulator_p.h

    SOURCES += \
        nfc/qnearfieldmanagervirtualbase.cpp \
        nfc/qnearfieldmanager_simulator.cpp \
        nfc/qllcpsocket_simulator_p.cpp \
        nfc/qllcpserver_simulator_p.cpp
}

contains(nfc_symbian_enabled, yes):symbian {
    NFC_BACKEND_AVAILABLE = yes

    MOBILITY = serviceframework
    INCLUDEPATH += $$SOURCE_DIR/src/serviceframework
    qtAddLibrary(QtServiceFramework)

    PRIVATE_HEADERS += \
        nfc/qnearfieldmanager_symbian_p.h \
        nfc/qnearfieldtagtype1_symbian_p.h \
        nfc/qnearfieldtagtype2_symbian_p.h \
        nfc/qllcpsocket_symbian_p.h \
        nfc/qllcpserver_symbian_p.h \
        nfc/qllcpstate_symbian_p.h \
        nfc/qnearfieldtagtype3_symbian_p.h \
        nfc/qnearfieldtagtype4_symbian_p.h \
        nfc/qnearfieldtagmifare_symbian_p.h \
        nfc/qnearfieldllcpdevice_symbian_p.h \
        nfc/symbian/nearfieldmanager_symbian.h \
        nfc/symbian/nearfieldtag_symbian.h \
        nfc/symbian/nearfieldndeftarget_symbian.h \
        nfc/symbian/nearfieldtargetfactory_symbian.h \
        nfc/symbian/nearfieldutility_symbian.h \
        nfc/symbian/llcpserver_symbian.h \
        nfc/symbian/llcpsockettype1_symbian.h \
        nfc/symbian/llcpsockettype2_symbian.h \
        nfc/symbian/nearfieldtagimpl_symbian.h \
        nfc/symbian/nearfieldtagasyncrequest_symbian.h \
        nfc/symbian/nearfieldtagndefoperationcallback_symbian.h \
        nfc/symbian/nearfieldtagoperationcallback_symbian.h \
        nfc/symbian/nearfieldtagndefrequest_symbian.h \
        nfc/symbian/nearfieldtagcommandrequest_symbian.h \
        nfc/symbian/nearfieldtagcommandsrequest_symbian.h \
        nfc/symbian/debug.h \
        nfc/symbian/nearfieldtagimplcommon_symbian.h

    SOURCES += \
        nfc/qnearfieldmanager_symbian.cpp \
        nfc/qnearfieldtagtype1_symbian.cpp \
        nfc/qnearfieldtagtype2_symbian.cpp \
        nfc/qllcpsocket_symbian_p.cpp \
        nfc/qllcpserver_symbian_p.cpp \
        nfc/qllcpstate_symbian_p.cpp \
        nfc/qnearfieldtagtype3_symbian.cpp \
        nfc/qnearfieldtagtype4_symbian.cpp \
        nfc/qnearfieldtagmifare_symbian.cpp \
        nfc/qnearfieldllcpdevice_symbian.cpp \
        nfc/symbian/nearfieldmanager_symbian.cpp \
        nfc/symbian/nearfieldtag_symbian.cpp \
        nfc/symbian/nearfieldndeftarget_symbian.cpp \
        nfc/symbian/nearfieldtargetfactory_symbian.cpp \
        nfc/symbian/nearfieldutility_symbian.cpp \
        nfc/symbian/llcpserver_symbian.cpp \
        nfc/symbian/llcpsockettype1_symbian.cpp \
        nfc/symbian/llcpsockettype2_symbian.cpp \
        nfc/symbian/nearfieldtagasyncrequest_symbian.cpp \
        nfc/symbian/nearfieldtagndefrequest_symbian.cpp \
        nfc/symbian/nearfieldtagcommandrequest_symbian.cpp \
        nfc/symbian/nearfieldtagcommandsrequest_symbian.cpp \
        nfc/symbian/nearfieldtagimplcommon_symbian.cpp

    INCLUDEPATH += $${EPOCROOT}epoc32/include/mw

    LIBS += -lnfc -lndef -lndefaccess -lnfcdiscoveryservice -lllcp -lnfctagextension
}

isEmpty(NFC_BACKEND_AVAILABLE) {
    # unsupported platform stub

    PRIVATE_HEADERS += \
        nfc/qllcpsocket_p.h \
        nfc/qllcpserver_p.h \
        nfc/qnearfieldmanagerimpl_p.h

    SOURCES += \
        nfc/qllcpsocket_p.cpp \
        nfc/qllcpserver_p.cpp \
        nfc/qnearfieldmanagerimpl_p.cpp
}

INCLUDEPATH += $$PWD


Added rpath to trikControlExport

Added rpath to trikControlExport

# Copyright 2015 CyberTech Labs Ltd.
#
# 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.

# This file is intended to be used from C++ applications that need to use TrikControl. It includes everything that is
# needed to compile with TrikControl and link to it.

# Expects TRIK_RUNTIME_DIR variable to be set pointing to a root of trikRuntime sources directory and trikRuntime
# built for correct configuration and architecture (for example, if you build your C++ application for ARM9 in Release
# configuration, trikRuntime must be already built for ARM9-release, qmake and make trikRuntime.pro for this).

QT += xml gui

if (equals(QT_MAJOR_VERSION, 5)) {
	QT += widgets
}

# Some magic related to configuration detection taken from global.pri

COMPILER = $$(CXX)

COMPILER_IS_ARM = $$find(COMPILER, arm-oe.*)

count(COMPILER_IS_ARM, 1) {
	ARCHITECTURE = arm
} else {
	ARCHITECTURE = x86
}

win32 {
	PLATFORM = windows
} else {
	PLATFORM = linux
}

CONFIG(debug, debug | release) {
	CONFIGURATION = $$ARCHITECTURE-debug
	CONFIGURATION_SUFFIX = -$$ARCHITECTURE-d
	# Address sanitizer is on by default
	!CONFIG(no-sanitizers) {
		CONFIG += sanitize-address
	}
} else {
	CONFIGURATION = $$ARCHITECTURE-release
	equals(ARCHITECTURE, "arm") {
		CONFIGURATION_SUFFIX =
	} else {
		CONFIGURATION_SUFFIX = -$$ARCHITECTURE
	}
}

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

TRIK_RUNTIME_BIN_DIR = $$TRIK_RUNTIME_DIR/bin/$$CONFIGURATION

LIBS += -L$$TRIK_RUNTIME_BIN_DIR

LIBS += -lqslog$$CONFIGURATION_SUFFIX

if (equals(QT_MAJOR_VERSION, 5)) {
	CONFIG += c++11
} else {
	QMAKE_CXXFLAGS += -std=c++11
}

defineTest(copyToDestdir) {
	FILES = $$1

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

		win32:FILE ~= s,/$,,g

		win32:FILE ~= s,/,\,g
		DDIR = $$DESTDIR
		win32:DDIR ~= s,/,\,g

		QMAKE_POST_LINK += $(COPY_DIR) $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
	}

	export(QMAKE_POST_LINK)
}

defineTest(uses) {
	PROJECTS = $$1

	for(PROJECT, PROJECTS) {
		LIBS += -l$$PROJECT$$CONFIGURATION_SUFFIX
		INCLUDEPATH += $$TRIK_RUNTIME_DIR/$$PROJECT/include
		!win32 {
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/lib$$PROJECT$${CONFIGURATION_SUFFIX}.so)
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/lib$$PROJECT$${CONFIGURATION_SUFFIX}.so.1)
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/lib$$PROJECT$${CONFIGURATION_SUFFIX}.so.1.0)
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/lib$$PROJECT$${CONFIGURATION_SUFFIX}.so.1.0.0)
		} else {
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/$$PROJECT$${CONFIGURATION_SUFFIX}.dll)
		}
	}

	export(LIBS)
	export(INCLUDEPATH)
}

# Libs and includepathes for trikControl and related.
uses(trikControl trikKernel qslog trikHal)

# Files to be present in destdir for trikRuntime to work.
copyToDestdir( \
	$$PWD/model-config.xml  \
	$$PWD/system-config.xml  \
	$$PWD/../media/ \
)

# Compiler swithces to enable Google Sanitizers support.
unix:equals(ARCHITECTURE, "x86") {
	CONFIG(debug) {
		QMAKE_CXXFLAGS += -fno-omit-frame-pointer
		CONFIG(sanitize-address) {
			QMAKE_CXXFLAGS += -fsanitize=address
			QMAKE_LFLAGS += -fsanitize=address
		}
		CONFIG(sanitize-undefined) {
			# UBSan does not play well with precompiled headers for some reason.
			noPch()
			QMAKE_CXXFLAGS += -fsanitize=undefined
			QMAKE_LFLAGS += -fsanitize=undefined
		}
		CONFIG(sanitize-thread) {
			QMAKE_CXXFLAGS += -fsanitize=thread
			QMAKE_LFLAGS += -fsanitize=thread
			LIBS += -ltsan
		}
	}
}

# Copyright 2015 CyberTech Labs Ltd.
#
# 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.

# This file is intended to be used from C++ applications that need to use TrikControl. It includes everything that is
# needed to compile with TrikControl and link to it.

# Expects TRIK_RUNTIME_DIR variable to be set pointing to a root of trikRuntime sources directory and trikRuntime
# built for correct configuration and architecture (for example, if you build your C++ application for ARM9 in Release
# configuration, trikRuntime must be already built for ARM9-release, qmake and make trikRuntime.pro for this).

QT += xml gui

if (equals(QT_MAJOR_VERSION, 5)) {
	QT += widgets
}

# Some magic related to configuration detection taken from global.pri

COMPILER = $$(CXX)

COMPILER_IS_ARM = $$find(COMPILER, arm-oe.*)

count(COMPILER_IS_ARM, 1) {
	ARCHITECTURE = arm
} else {
	ARCHITECTURE = x86
}

win32 {
	PLATFORM = windows
} else {
	PLATFORM = linux
}

CONFIG(debug, debug | release) {
	CONFIGURATION = $$ARCHITECTURE-debug
	CONFIGURATION_SUFFIX = -$$ARCHITECTURE-d
	# Address sanitizer is on by default
	!CONFIG(no-sanitizers) {
		CONFIG += sanitize-address
	}
} else {
	CONFIGURATION = $$ARCHITECTURE-release
	equals(ARCHITECTURE, "arm") {
		CONFIGURATION_SUFFIX =
	} else {
		CONFIGURATION_SUFFIX = -$$ARCHITECTURE
	}
}

TRIK_RUNTIME_BIN_DIR = $$TRIK_RUNTIME_DIR/bin/$$CONFIGURATION

LIBS += -L$$TRIK_RUNTIME_BIN_DIR

LIBS += -lqslog$$CONFIGURATION_SUFFIX

if (equals(QT_MAJOR_VERSION, 5)) {
	CONFIG += c++11
} else {
	QMAKE_CXXFLAGS += -std=c++11
}

defineTest(copyToDestdir) {
	FILES = $$1

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

		win32:FILE ~= s,/$,,g

		win32:FILE ~= s,/,\,g
		DDIR = $$DESTDIR
		win32:DDIR ~= s,/,\,g

		QMAKE_POST_LINK += $(COPY_DIR) $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
	}

	export(QMAKE_POST_LINK)
}

defineTest(uses) {
	PROJECTS = $$1

	for(PROJECT, PROJECTS) {
		LIBS += -l$$PROJECT$$CONFIGURATION_SUFFIX
		INCLUDEPATH += $$TRIK_RUNTIME_DIR/$$PROJECT/include
		!win32 {
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/lib$$PROJECT$${CONFIGURATION_SUFFIX}.so)
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/lib$$PROJECT$${CONFIGURATION_SUFFIX}.so.1)
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/lib$$PROJECT$${CONFIGURATION_SUFFIX}.so.1.0)
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/lib$$PROJECT$${CONFIGURATION_SUFFIX}.so.1.0.0)
		} else {
			copyToDestdir($$TRIK_RUNTIME_BIN_DIR/$$PROJECT$${CONFIGURATION_SUFFIX}.dll)
		}
	}

	export(LIBS)
	export(INCLUDEPATH)
}

# Libs and includepathes for trikControl and related.
uses(trikControl trikKernel qslog trikHal)

# Files to be present in destdir for trikRuntime to work.
copyToDestdir( \
	$$PWD/model-config.xml  \
	$$PWD/system-config.xml  \
	$$PWD/../media/ \
)

# Compiler swithces to enable Google Sanitizers support.
unix:equals(ARCHITECTURE, "x86") {
	CONFIG(debug) {
		QMAKE_CXXFLAGS += -fno-omit-frame-pointer
		CONFIG(sanitize-address) {
			QMAKE_CXXFLAGS += -fsanitize=address
			QMAKE_LFLAGS += -fsanitize=address
		}
		CONFIG(sanitize-undefined) {
			# UBSan does not play well with precompiled headers for some reason.
			noPch()
			QMAKE_CXXFLAGS += -fsanitize=undefined
			QMAKE_LFLAGS += -fsanitize=undefined
		}
		CONFIG(sanitize-thread) {
			QMAKE_CXXFLAGS += -fsanitize=thread
			QMAKE_LFLAGS += -fsanitize=thread
			LIBS += -ltsan
		}
	}
}


Revert "Build: Don't assume that the xmlpatterns command is available."

The check does not work on Windows since it does not take
the .exe suffix into account.

Task-number: QTCREATORBUG-11768

This reverts commit dcd71423d25baab4c797098a0363c51ea164e99f.

Change-Id: I448a449b7749ee533c43a5b8007eedca7380cff8
Reviewed-by: Eike Ziller <c142da16c73a95a82d35191bcc55b22835617128@digia.com>

depfile = $$replace(_PRO_FILE_PWD_, ([^/]+$), \\1/\\1_dependencies.pri)
exists($$depfile) {
    include($$depfile)
    isEmpty(QTC_PLUGIN_NAME): \
        error("$$basename(depfile) does not define QTC_PLUGIN_NAME.")
} else {
    isEmpty(QTC_PLUGIN_NAME): \
        error("QTC_PLUGIN_NAME is empty. Maybe you meant to create $$basename(depfile)?")
}
TARGET = $$QTC_PLUGIN_NAME

plugin_deps = $$QTC_PLUGIN_DEPENDS
plugin_recmds = $$QTC_PLUGIN_RECOMMENDS

include(../qtcreator.pri)

# for substitution in the .pluginspec
dependencyList = "<dependencyList>"
for(dep, plugin_deps) {
    dependencies_file =
    for(dir, QTC_PLUGIN_DIRS) {
        exists($$dir/$$dep/$${dep}_dependencies.pri) {
            dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
            break()
        }
    }
    isEmpty(dependencies_file): \
        error("Plugin dependency $$dep not found")
    include($$dependencies_file)
    dependencyList += "        <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\"/>"
}
for(dep, plugin_recmds) {
    dependencies_file =
    for(dir, QTC_PLUGIN_DIRS) {
        exists($$dir/$$dep/$${dep}_dependencies.pri) {
            dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
            break()
        }
    }
    isEmpty(dependencies_file): \
        error("Plugin dependency $$dep not found")
    include($$dependencies_file)
    dependencyList += "        <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\" type=\"optional\"/>"
}
dependencyList += "    </dependencyList>"
dependencyList = $$join(dependencyList, $$escape_expand(\\n))

# use gui precompiled header for plugins by default
isEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$PWD/shared/qtcreator_gui_pch.h

isEmpty(PROVIDER) {
    PROVIDER = QtProject
} else {
    LIBS += -L$$IDE_PLUGIN_PATH/QtProject
}

isEmpty(USE_USER_DESTDIR) {
    DESTDIR = $$IDE_PLUGIN_PATH/$$PROVIDER
} else {
    win32 {
        DESTDIRAPPNAME = "qtcreator"
        DESTDIRBASE = "$$(LOCALAPPDATA)"
        isEmpty(DESTDIRBASE):DESTDIRBASE="$$(USERPROFILE)\Local Settings\Application Data"
    } else:macx {
        DESTDIRAPPNAME = "Qt Creator"
        DESTDIRBASE = "$$(HOME)/Library/Application Support"
    } else:unix {
        DESTDIRAPPNAME = "qtcreator"
        DESTDIRBASE = "$$(XDG_DATA_HOME)"
        isEmpty(DESTDIRBASE):DESTDIRBASE = "$$(HOME)/.local/share/data"
        else:DESTDIRBASE = "$$DESTDIRBASE/data"
    }
    DESTDIR = "$$DESTDIRBASE/QtProject/$$DESTDIRAPPNAME/plugins/$$QTCREATOR_VERSION/$$PROVIDER"
}
LIBS += -L$$DESTDIR

# copy the plugin spec
isEmpty(TARGET) {
    error("qtcreatorplugin.pri: You must provide a TARGET")
}

isEqual(QT_MAJOR_VERSION, 5) {

defineReplace(stripOutDir) {
    return($$relative_path($$1, $$OUT_PWD))
}

} else { # qt5

defineReplace(stripOutDir) {
    1 ~= s|^$$re_escape($$OUT_PWD/)||$$i_flag
    return($$1)
}

} # qt5

PLUGINSPEC = $$_PRO_FILE_PWD_/$${TARGET}.pluginspec
PLUGINSPEC_IN = $${PLUGINSPEC}.in
exists($$PLUGINSPEC_IN) {
    OTHER_FILES += $$PLUGINSPEC_IN
    QMAKE_SUBSTITUTES += $$PLUGINSPEC_IN
    PLUGINSPEC = $$OUT_PWD/$${TARGET}.pluginspec
    copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripOutDir}
} else {
    # need to support that for external plugins
    OTHER_FILES += $$PLUGINSPEC
    copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripSrcDir}
}
copy2build.input = PLUGINSPEC
isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copy2build.name = COPY ${QMAKE_FILE_IN}
copy2build.CONFIG += no_link no_clean
QMAKE_EXTRA_COMPILERS += copy2build

greaterThan(QT_MAJOR_VERSION, 4) {
#   Create a Json file containing the plugin information required by
#   Qt 5's plugin system by running a XSLT sheet on the
#   pluginspec file before moc runs.
    XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)

    pluginspec2json.name = Create Qt 5 plugin json file
    pluginspec2json.input = PLUGINSPEC
    pluginspec2json.variable_out = GENERATED_FILES
    pluginspec2json.output = $${TARGET}.json
    pluginspec2json.commands = $$XMLPATTERNS -no-format -output $$pluginspec2json.output $$PWD/qtcreatorplugin2json.xsl $$PLUGINSPEC
    pluginspec2json.CONFIG += no_link
    moc_header.depends += $$pluginspec2json.output
    QMAKE_EXTRA_COMPILERS += pluginspec2json
}

macx {
    QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/PlugIns/$${PROVIDER}/
    QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../../,-rpath,@executable_path/../
} else:linux-* {
    #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
    QMAKE_RPATHDIR += \$\$ORIGIN
    QMAKE_RPATHDIR += \$\$ORIGIN/..
    QMAKE_RPATHDIR += \$\$ORIGIN/../..
    IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
    QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
    QMAKE_RPATHDIR =
}

contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols

TEMPLATE = lib
CONFIG += plugin plugin_with_soname
linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF

!macx {
    target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins/$$PROVIDER
    pluginspec.files += $${TARGET}.pluginspec
    pluginspec.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins/$$PROVIDER
    INSTALLS += target pluginspec
}

MIMETYPES = $$_PRO_FILE_PWD_/$${TARGET}.mimetypes.xml
exists($$MIMETYPES):OTHER_FILES += $$MIMETYPES

TARGET = $$qtLibraryName($$TARGET)

depfile = $$replace(_PRO_FILE_PWD_, ([^/]+$), \\1/\\1_dependencies.pri)
exists($$depfile) {
    include($$depfile)
    isEmpty(QTC_PLUGIN_NAME): \
        error("$$basename(depfile) does not define QTC_PLUGIN_NAME.")
} else {
    isEmpty(QTC_PLUGIN_NAME): \
        error("QTC_PLUGIN_NAME is empty. Maybe you meant to create $$basename(depfile)?")
}
TARGET = $$QTC_PLUGIN_NAME

plugin_deps = $$QTC_PLUGIN_DEPENDS
plugin_recmds = $$QTC_PLUGIN_RECOMMENDS

include(../qtcreator.pri)

# for substitution in the .pluginspec
dependencyList = "<dependencyList>"
for(dep, plugin_deps) {
    dependencies_file =
    for(dir, QTC_PLUGIN_DIRS) {
        exists($$dir/$$dep/$${dep}_dependencies.pri) {
            dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
            break()
        }
    }
    isEmpty(dependencies_file): \
        error("Plugin dependency $$dep not found")
    include($$dependencies_file)
    dependencyList += "        <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\"/>"
}
for(dep, plugin_recmds) {
    dependencies_file =
    for(dir, QTC_PLUGIN_DIRS) {
        exists($$dir/$$dep/$${dep}_dependencies.pri) {
            dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
            break()
        }
    }
    isEmpty(dependencies_file): \
        error("Plugin dependency $$dep not found")
    include($$dependencies_file)
    dependencyList += "        <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\" type=\"optional\"/>"
}
dependencyList += "    </dependencyList>"
dependencyList = $$join(dependencyList, $$escape_expand(\\n))

# use gui precompiled header for plugins by default
isEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$PWD/shared/qtcreator_gui_pch.h

isEmpty(PROVIDER) {
    PROVIDER = QtProject
} else {
    LIBS += -L$$IDE_PLUGIN_PATH/QtProject
}

isEmpty(USE_USER_DESTDIR) {
    DESTDIR = $$IDE_PLUGIN_PATH/$$PROVIDER
} else {
    win32 {
        DESTDIRAPPNAME = "qtcreator"
        DESTDIRBASE = "$$(LOCALAPPDATA)"
        isEmpty(DESTDIRBASE):DESTDIRBASE="$$(USERPROFILE)\Local Settings\Application Data"
    } else:macx {
        DESTDIRAPPNAME = "Qt Creator"
        DESTDIRBASE = "$$(HOME)/Library/Application Support"
    } else:unix {
        DESTDIRAPPNAME = "qtcreator"
        DESTDIRBASE = "$$(XDG_DATA_HOME)"
        isEmpty(DESTDIRBASE):DESTDIRBASE = "$$(HOME)/.local/share/data"
        else:DESTDIRBASE = "$$DESTDIRBASE/data"
    }
    DESTDIR = "$$DESTDIRBASE/QtProject/$$DESTDIRAPPNAME/plugins/$$QTCREATOR_VERSION/$$PROVIDER"
}
LIBS += -L$$DESTDIR

# copy the plugin spec
isEmpty(TARGET) {
    error("qtcreatorplugin.pri: You must provide a TARGET")
}

isEqual(QT_MAJOR_VERSION, 5) {

defineReplace(stripOutDir) {
    return($$relative_path($$1, $$OUT_PWD))
}

} else { # qt5

defineReplace(stripOutDir) {
    1 ~= s|^$$re_escape($$OUT_PWD/)||$$i_flag
    return($$1)
}

} # qt5

PLUGINSPEC = $$_PRO_FILE_PWD_/$${TARGET}.pluginspec
PLUGINSPEC_IN = $${PLUGINSPEC}.in
exists($$PLUGINSPEC_IN) {
    OTHER_FILES += $$PLUGINSPEC_IN
    QMAKE_SUBSTITUTES += $$PLUGINSPEC_IN
    PLUGINSPEC = $$OUT_PWD/$${TARGET}.pluginspec
    copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripOutDir}
} else {
    # need to support that for external plugins
    OTHER_FILES += $$PLUGINSPEC
    copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripSrcDir}
}
copy2build.input = PLUGINSPEC
isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copy2build.name = COPY ${QMAKE_FILE_IN}
copy2build.CONFIG += no_link no_clean
QMAKE_EXTRA_COMPILERS += copy2build

greaterThan(QT_MAJOR_VERSION, 4) {
#   Create a Json file containing the plugin information required by
#   Qt 5's plugin system by running a XSLT sheet on the
#   pluginspec file before moc runs.
    XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)
    !exists($$XMLPATTERNS): \
        error("Cannot find the Qt command line tool 'xmlpatterns'!")

    pluginspec2json.name = Create Qt 5 plugin json file
    pluginspec2json.input = PLUGINSPEC
    pluginspec2json.variable_out = GENERATED_FILES
    pluginspec2json.output = $${TARGET}.json
    pluginspec2json.commands = $$XMLPATTERNS -no-format -output $$pluginspec2json.output $$PWD/qtcreatorplugin2json.xsl $$PLUGINSPEC
    pluginspec2json.CONFIG += no_link
    moc_header.depends += $$pluginspec2json.output
    QMAKE_EXTRA_COMPILERS += pluginspec2json
}

macx {
    QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/PlugIns/$${PROVIDER}/
    QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../../,-rpath,@executable_path/../
} else:linux-* {
    #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
    QMAKE_RPATHDIR += \$\$ORIGIN
    QMAKE_RPATHDIR += \$\$ORIGIN/..
    QMAKE_RPATHDIR += \$\$ORIGIN/../..
    IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
    QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
    QMAKE_RPATHDIR =
}

contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols

TEMPLATE = lib
CONFIG += plugin plugin_with_soname
linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF

!macx {
    target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins/$$PROVIDER
    pluginspec.files += $${TARGET}.pluginspec
    pluginspec.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins/$$PROVIDER
    INSTALLS += target pluginspec
}

MIMETYPES = $$_PRO_FILE_PWD_/$${TARGET}.mimetypes.xml
exists($$MIMETYPES):OTHER_FILES += $$MIMETYPES

TARGET = $$qtLibraryName($$TARGET)