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


tooooo many empty strings in nxtOsek.pri

HEADERS += \
	nxtOSEK/elementGeneratorFactory.h \
	nxtOSEK/nxtFlashTool.h \
	nxtOSEK/nxtOSEKRobotGenerator.h \
	nxtOSEK/smartLine.h \
	nxtOSEK/generators/abstractElementGenerator.h \
	nxtOSEK/generators/functionElementGenerator.h \
	nxtOSEK/generators/ifElementGenerator.h \
	nxtOSEK/generators/loopElementGenerator.h \
	nxtOSEK/generators/simpleElementGenerator.h \
	nxtOSEK/generators/simpleElements/abstractSimpleElementGenerator.h \
	nxtOSEK/generators/simpleElements/enginesForwardGenerator.h \
	nxtOSEK/generators/simpleElements/enginesBackwardGenerator.h \
	nxtOSEK/generators/simpleElements/enginesStopGenerator.h \
	nxtOSEK/generators/simpleElements/timerGenerator.h \
	nxtOSEK/generators/simpleElements/beepGenerator.h \
	nxtOSEK/generators/simpleElements/playToneGenerator.h \
	nxtOSEK/generators/simpleElements/finalNodeGenerator.h \
	nxtOSEK/generators/simpleElements/nullificationEncoderGenerator.h \
	nxtOSEK/generators/simpleElements/initialBlockGenerator.h \
	nxtOSEK/generators/simpleElements/waitForColorBlockGenerator.h \
	nxtOSEK/generators/simpleElements/waitForColorIntensityBlockGenerator.h \
	nxtOSEK/generators/simpleElements/balanceGenerator.h \
	nxtOSEK/generators/simpleElements/waitForLightBlockGenerator.h \
	nxtOSEK/generators/simpleElements/waitForSonarBlockGenerator.h \
	nxtOSEK/generators/simpleElements/waitForEncoderBlockGenerator.h \
	nxtOSEK/generators/simpleElements/waitForTouchSensorBlockGenerator.h \
	nxtOSEK/generators/simpleElements/variableInitGenerator.h \
	nxtOSEK/generators/simpleElements/balanceInitGenerator.h \
	nxtOSEK/generators/simpleElementFactory.h \
	nxtOSEK/generators/simpleElements/initialNodeGenerator.h

SOURCES += \
	nxtOSEK/elementGeneratorFactory.cpp \
	nxtOSEK/nxtFlashTool.cpp \
	nxtOSEK/nxtOSEKRobotGenerator.cpp \
	nxtOSEK/smartLine.cpp \
	nxtOSEK/generators/abstractElementGenerator.cpp \
	nxtOSEK/generators/functionElementGenerator.cpp \
	nxtOSEK/generators/ifElementGenerator.cpp \
	nxtOSEK/generators/loopElementGenerator.cpp \
	nxtOSEK/generators/simpleElementGenerator.cpp \
	nxtOSEK/generators/simpleElements/abstractSimpleElementGenerator.cpp \
	nxtOSEK/generators/simpleElements/enginesForwardGenerator.cpp \
	nxtOSEK/generators/simpleElements/enginesBackwardGenerator.cpp \
	nxtOSEK/generators/simpleElements/enginesStopGenerator.cpp \
	nxtOSEK/generators/simpleElements/timerGenerator.cpp \
	nxtOSEK/generators/simpleElements/beepGenerator.cpp \
	nxtOSEK/generators/simpleElements/playToneGenerator.cpp \
	nxtOSEK/generators/simpleElements/finalNodeGenerator.cpp \
	nxtOSEK/generators/simpleElements/nullificationEncoderGenerator.cpp \
	nxtOSEK/generators/simpleElements/initialBlockGenerator.cpp \
	nxtOSEK/generators/simpleElements/waitForColorBlockGenerator.cpp \
	nxtOSEK/generators/simpleElements/waitForColorIntensityBlockGenerator.cpp \
	nxtOSEK/generators/simpleElements/balanceGenerator.cpp \
	nxtOSEK/generators/simpleElements/waitForLightBlockGenerator.cpp \
	nxtOSEK/generators/simpleElements/waitForSonarBlockGenerator.cpp \
	nxtOSEK/generators/simpleElements/waitForEncoderBlockGenerator.cpp \
	nxtOSEK/generators/simpleElements/waitForTouchSensorBlockGenerator.cpp \
	nxtOSEK/generators/simpleElements/variableInitGenerator.cpp \
	nxtOSEK/generators/simpleElements/balanceInitGenerator.cpp \
	nxtOSEK/generators/simpleElementFactory.cpp \
	nxtOSEK/generators/simpleElements/initialNodeGenerator.cpp


Pumping up version.

Pumping up version.


Version 8.43

Version 8.43


Version 5.2

Version 5.2


Version 6.9

Version 6.9


Version 4.3

Version 4.3


Update DriverStation.pri

Update DriverStation.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 += core
QT += network
CONFIG += c++11
QMAKE_CXXFLAGS += -std=c++0x

INCLUDEPATH += $$PWD/include

HEADERS += \
    $$PWD/include/DriverStation.h \
    $$PWD/src/Common.h \
    $$PWD/src/NetConsole.h \
    $$PWD/src/NetworkDiagnostics.h \
    $$PWD/src/Packets.h \
    $$PWD/src/VersionAnalyzer.h \
    $$PWD/src/Times.h

SOURCES += \
    $$PWD/src/Common.cpp \
    $$PWD/src/DriverStation.cpp \
    $$PWD/src/NetConsole.cpp \
    $$PWD/src/NetworkDiagnostics.cpp \
    $$PWD/src/Packets.cpp \
    $$PWD/src/VersionAnalyzer.cpp

#
# 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 += core
QT += network
CONFIG += c++11

INCLUDEPATH += $$PWD/include

HEADERS += \
    $$PWD/include/DriverStation.h \
    $$PWD/src/Common.h \
    $$PWD/src/NetConsole.h \
    $$PWD/src/NetworkDiagnostics.h \
    $$PWD/src/Packets.h \
    $$PWD/src/VersionAnalyzer.h \
    $$PWD/src/Times.h

SOURCES += \
    $$PWD/src/Common.cpp \
    $$PWD/src/DriverStation.cpp \
    $$PWD/src/NetConsole.cpp \
    $$PWD/src/NetworkDiagnostics.cpp \
    $$PWD/src/Packets.cpp \
    $$PWD/src/VersionAnalyzer.cpp


Server (pro file): Add a missing header

Server (pro file): Add a missing header

SOURCES += $$PWD/DefaultAuthorizationProvider.cpp
SOURCES += $$PWD/LocalCluster.cpp
SOURCES += $$PWD/ServerDhLayer.cpp
SOURCES += $$PWD/ServerRpcLayer.cpp
SOURCES += $$PWD/ServerRpcOperation.cpp
SOURCES += $$PWD/Session.cpp
SOURCES += $$PWD/RpcOperationFactory.cpp
SOURCES += $$PWD/TelegramServer.cpp
SOURCES += $$PWD/TelegramServerClient.cpp
SOURCES += $$PWD/TelegramServerUser.cpp
SOURCES += $$PWD/CServerTcpTransport.cpp
SOURCES += $$PWD/RemoteServerConnection.cpp
SOURCES += $$PWD/FunctionStreamOperators.cpp

HEADERS += $$PWD/AuthorizationProvider.hpp
HEADERS += $$PWD/DefaultAuthorizationProvider.hpp
HEADERS += $$PWD/LocalCluster.hpp
HEADERS += $$PWD/ServerApi.hpp
HEADERS += $$PWD/ServerDhLayer.hpp
HEADERS += $$PWD/ServerNamespace.hpp
HEADERS += $$PWD/ServerRpcLayer.hpp
HEADERS += $$PWD/ServerRpcOperation.hpp
HEADERS += $$PWD/Session.hpp
HEADERS += $$PWD/RpcOperationFactory.hpp
HEADERS += $$PWD/RpcOperationFactory_p.hpp
HEADERS += $$PWD/TelegramServer.hpp
HEADERS += $$PWD/TelegramServerClient.hpp
HEADERS += $$PWD/TelegramServerUser.hpp
HEADERS += $$PWD/CServerTcpTransport.hpp
HEADERS += $$PWD/RemoteServerConnection.hpp
HEADERS += $$PWD/FunctionStreamOperators.hpp

include(RpcOperations/operations.pri)

SOURCES += $$PWD/DefaultAuthorizationProvider.cpp
SOURCES += $$PWD/LocalCluster.cpp
SOURCES += $$PWD/ServerDhLayer.cpp
SOURCES += $$PWD/ServerRpcLayer.cpp
SOURCES += $$PWD/ServerRpcOperation.cpp
SOURCES += $$PWD/Session.cpp
SOURCES += $$PWD/RpcOperationFactory.cpp
SOURCES += $$PWD/TelegramServer.cpp
SOURCES += $$PWD/TelegramServerClient.cpp
SOURCES += $$PWD/TelegramServerUser.cpp
SOURCES += $$PWD/CServerTcpTransport.cpp
SOURCES += $$PWD/RemoteServerConnection.cpp
SOURCES += $$PWD/FunctionStreamOperators.cpp

HEADERS += $$PWD/AuthorizationProvider.hpp
HEADERS += $$PWD/DefaultAuthorizationProvider.hpp
HEADERS += $$PWD/LocalCluster.hpp
HEADERS += $$PWD/ServerApi.hpp
HEADERS += $$PWD/ServerDhLayer.hpp
HEADERS += $$PWD/ServerRpcLayer.hpp
HEADERS += $$PWD/ServerRpcOperation.hpp
HEADERS += $$PWD/Session.hpp
HEADERS += $$PWD/RpcOperationFactory.hpp
HEADERS += $$PWD/RpcOperationFactory_p.hpp
HEADERS += $$PWD/TelegramServer.hpp
HEADERS += $$PWD/TelegramServerClient.hpp
HEADERS += $$PWD/TelegramServerUser.hpp
HEADERS += $$PWD/CServerTcpTransport.hpp
HEADERS += $$PWD/RemoteServerConnection.hpp
HEADERS += $$PWD/FunctionStreamOperators.hpp

include(RpcOperations/operations.pri)


optimized code MusicUser.pro [512322]

optimized code MusicUser.pro [512322]

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

SOURCES += \
    usermanager/musicusermanager.cpp \
    usermanager/musicusermodel.cpp \
    usermanager/musicuserdialog.cpp \
    usermanager/musicuserlineedit.cpp \
    usermanager/musicuserwindow.cpp \
    usermanager/musicuserconfigmanager.cpp

HEADERS  += \
    usermanager/musicusermanager.h \
    usermanager/musicusermodel.h \
    usermanager/musicuserdialog.h \
    usermanager/musicuserlineedit.h \
    usermanager/musicuserwindow.h \
    usermanager/musicuserconfigmanager.h

FORMS    += \
    ui/usermanager/musicuserdialog.ui \
    ui/usermanager/musicuserwindow.ui \
    ui/usermanager/musicusermanager.ui

RESOURCES += \
    qrc/MusicPlayerShare.qrc \
    qrc/MusicPlayerUser.qrc \


Fixes:    - Creator documentation on Mac

Fixes:    - Creator documentation on Mac

unix {
    QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$(QTDIR)/tools/qdoc3/qdoc3
    HELPGENERATOR = $$(QTDIR)/bin/qhelpgenerator
} else {
    QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/doc/html&& $$(QTDIR)\tools\qdoc3\release\qdoc3.exe
    HELPGENERATOR = $$(QTDIR)\bin\qhelpgenerator.exe
}

QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
QCH_FILE = $$OUT_PWD/share/doc/qtcreator/qtcreator.qch

unix {
html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf
} else {
html_docs.commands = \"$$QDOC $$PWD/qtcreator.qdocconf\"
}
html_docs.depends += $$PWD/qtcreator.qdoc $$PWD/qtcreator.qdocconf
html_docs.files = $$QHP_FILE

qch_docs.commands = $$HELPGENERATOR -o $$QCH_FILE $$QHP_FILE
qch_docs.depends += html_docs
qch_docs.files = $$QCH_FILE

linux-* {
    qch_docs.path = /share/doc/qtcreator
    INSTALLS += qch_docs
}

macx {
    DOC_DIR = $${OUT_PWD}/bin/QtCreator.app/Contents/Resources/doc
    cp_docs.commands = mkdir -p $${DOC_DIR} ; $${QMAKE_COPY} $${QCH_FILE} $${DOC_DIR}
    cp_docs.depends += qch_docs
    docs.depends = cp_docs
    QMAKE_EXTRA_TARGETS += html_docs qch_docs cp_docs docs
}
!macx {
    docs.depends = qch_docs
    QMAKE_EXTRA_TARGETS += html_docs qch_docs docs
}

unix {
    QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$(QTDIR)/tools/qdoc3/qdoc3
    HELPGENERATOR = $$(QTDIR)/bin/qhelpgenerator
} else {
    QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/doc/html&& $$(QTDIR)\tools\qdoc3\release\qdoc3.exe
    HELPGENERATOR = $$(QTDIR)\bin\qhelpgenerator.exe
}

QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
QCH_FILE = $$OUT_PWD/share/doc/qtcreator/qtcreator.qch

unix {
html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf
} else {
html_docs.commands = \"$$QDOC $$PWD/qtcreator.qdocconf\"
}
html_docs.depends += $$PWD/qtcreator.qdoc $$PWD/qtcreator.qdocconf
html_docs.files = $$QHP_FILE

qch_docs.commands = $$HELPGENERATOR -o $$QCH_FILE $$QHP_FILE
qch_docs.depends += html_docs
qch_docs.files = $$QCH_FILE

linux-* {
    qch_docs.path = /share/doc/qtcreator
    INSTALLS += qch_docs
}

macx {
    cp_docs.commands = $${QMAKE_COPY_DIR} $${OUT_PWD}/doc $${OUT_PWD}/bin/QtCreator.app/Contents/Resources
    cp_docs.depends += qch_docs
    docs.depends = cp_docs
    QMAKE_EXTRA_TARGETS += html_docs qch_docs cp_docs docs
}
!macx {
    docs.depends = qch_docs
    QMAKE_EXTRA_TARGETS += html_docs qch_docs docs
}


Make qmake warning spec compatible with msvc

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

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

INCLUDEPATH += $$PWD

HEADERS += \
    $$PWD/connectiondata.h \
    $$PWD/connection.h \
    $$PWD/room.h \
    $$PWD/user.h \
    $$PWD/avatar.h \
    $$PWD/util.h \
    $$PWD/events/event.h \
    $$PWD/events/eventcontent.h \
    $$PWD/events/roommessageevent.h \
    $$PWD/events/simplestateevents.h \
    $$PWD/events/roommemberevent.h \
    $$PWD/events/roomavatarevent.h \
    $$PWD/events/typingevent.h \
    $$PWD/events/receiptevent.h \
    $$PWD/events/redactionevent.h \
    $$PWD/jobs/requestdata.h \
    $$PWD/jobs/basejob.h \
    $$PWD/jobs/checkauthmethods.h \
    $$PWD/jobs/passwordlogin.h \
    $$PWD/jobs/sendeventjob.h \
    $$PWD/jobs/postreceiptjob.h \
    $$PWD/jobs/joinroomjob.h \
    $$PWD/jobs/roommessagesjob.h \
    $$PWD/jobs/syncjob.h \
    $$PWD/jobs/mediathumbnailjob.h \
    $$PWD/jobs/setroomstatejob.h \
    $$files($$PWD/jobs/generated/*.h, false) \
    $$PWD/logging.h \
    $$PWD/settings.h \
    $$PWD/networksettings.h \
    $$PWD/networkaccessmanager.h \
    $$PWD/jobs/downloadfilejob.h

SOURCES += \
    $$PWD/connectiondata.cpp \
    $$PWD/connection.cpp \
    $$PWD/room.cpp \
    $$PWD/user.cpp \
    $$PWD/avatar.cpp \
    $$PWD/events/event.cpp \
    $$PWD/events/eventcontent.cpp \
    $$PWD/events/roommessageevent.cpp \
    $$PWD/events/roommemberevent.cpp \
    $$PWD/events/typingevent.cpp \
    $$PWD/events/receiptevent.cpp \
    $$PWD/events/redactionevent.cpp \
    $$PWD/jobs/requestdata.cpp \
    $$PWD/jobs/basejob.cpp \
    $$PWD/jobs/checkauthmethods.cpp \
    $$PWD/jobs/passwordlogin.cpp \
    $$PWD/jobs/sendeventjob.cpp \
    $$PWD/jobs/postreceiptjob.cpp \
    $$PWD/jobs/joinroomjob.cpp \
    $$PWD/jobs/roommessagesjob.cpp \
    $$PWD/jobs/syncjob.cpp \
    $$PWD/jobs/mediathumbnailjob.cpp \
    $$PWD/jobs/setroomstatejob.cpp \
    $$files($$PWD/jobs/generated/*.cpp, false) \
    $$PWD/logging.cpp \
    $$PWD/settings.cpp \
    $$PWD/networksettings.cpp \
    $$PWD/networkaccessmanager.cpp \
    $$PWD/jobs/downloadfilejob.cpp

QT += network
CONFIG += c++14 warn_on rtti_off
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter

INCLUDEPATH += $$PWD

HEADERS += \
    $$PWD/connectiondata.h \
    $$PWD/connection.h \
    $$PWD/room.h \
    $$PWD/user.h \
    $$PWD/avatar.h \
    $$PWD/util.h \
    $$PWD/events/event.h \
    $$PWD/events/eventcontent.h \
    $$PWD/events/roommessageevent.h \
    $$PWD/events/simplestateevents.h \
    $$PWD/events/roommemberevent.h \
    $$PWD/events/roomavatarevent.h \
    $$PWD/events/typingevent.h \
    $$PWD/events/receiptevent.h \
    $$PWD/events/redactionevent.h \
    $$PWD/jobs/requestdata.h \
    $$PWD/jobs/basejob.h \
    $$PWD/jobs/checkauthmethods.h \
    $$PWD/jobs/passwordlogin.h \
    $$PWD/jobs/sendeventjob.h \
    $$PWD/jobs/postreceiptjob.h \
    $$PWD/jobs/joinroomjob.h \
    $$PWD/jobs/roommessagesjob.h \
    $$PWD/jobs/syncjob.h \
    $$PWD/jobs/mediathumbnailjob.h \
    $$PWD/jobs/setroomstatejob.h \
    $$files($$PWD/jobs/generated/*.h, false) \
    $$PWD/logging.h \
    $$PWD/settings.h \
    $$PWD/networksettings.h \
    $$PWD/networkaccessmanager.h \
    $$PWD/jobs/downloadfilejob.h

SOURCES += \
    $$PWD/connectiondata.cpp \
    $$PWD/connection.cpp \
    $$PWD/room.cpp \
    $$PWD/user.cpp \
    $$PWD/avatar.cpp \
    $$PWD/events/event.cpp \
    $$PWD/events/eventcontent.cpp \
    $$PWD/events/roommessageevent.cpp \
    $$PWD/events/roommemberevent.cpp \
    $$PWD/events/typingevent.cpp \
    $$PWD/events/receiptevent.cpp \
    $$PWD/events/redactionevent.cpp \
    $$PWD/jobs/requestdata.cpp \
    $$PWD/jobs/basejob.cpp \
    $$PWD/jobs/checkauthmethods.cpp \
    $$PWD/jobs/passwordlogin.cpp \
    $$PWD/jobs/sendeventjob.cpp \
    $$PWD/jobs/postreceiptjob.cpp \
    $$PWD/jobs/joinroomjob.cpp \
    $$PWD/jobs/roommessagesjob.cpp \
    $$PWD/jobs/syncjob.cpp \
    $$PWD/jobs/mediathumbnailjob.cpp \
    $$PWD/jobs/setroomstatejob.cpp \
    $$files($$PWD/jobs/generated/*.cpp, false) \
    $$PWD/logging.cpp \
    $$PWD/settings.cpp \
    $$PWD/networksettings.cpp \
    $$PWD/networkaccessmanager.cpp \
    $$PWD/jobs/downloadfilejob.cpp


Qt lib licence

Qt lib licence

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

DEFINES += HAVE_SUITABLE_QT_VERSION=1

QT += websockets

INCLUDEPATH += $$PWD
INCLUDEPATH += $$PWD/builds/qt/
INCLUDEPATH += $$PWD/jansson/src/

DEPENDPATH += $$PWD

## FayeCpp sources
SOURCES += $$PWD/src/client.cpp \
           $$PWD/src/jsonutils.cpp \
           $$PWD/src/message.cpp \
           $$PWD/src/REBuffer.cpp \
           $$PWD/src/REBufferNoCopy.cpp \
           $$PWD/src/RELog.cpp \
           $$PWD/src/REMutableString.cpp \
           $$PWD/src/REMutex.cpp \
           $$PWD/src/REStaticString.cpp \
           $$PWD/src/REString.cpp \
           $$PWD/src/REStringBase.cpp \
           $$PWD/src/REStringList.cpp \
           $$PWD/src/REStringUtilsPrivate.cpp \
           $$PWD/src/REThread.cpp \
           $$PWD/src/REWideString.cpp \
           $$PWD/src/transport.cpp \
           $$PWD/src/variant.cpp \
           $$PWD/src/variantlist.cpp \
           $$PWD/src/variantmap.cpp \
           $$PWD/src/websocketqt.cpp

## FayeCpp headers
HEADERS += $$PWD/fayecpp.h \
           $$PWD/src/websocketqt.h

## jansson sources
SOURCES += $$PWD/jansson/src/dump.c \
           $$PWD/jansson/src/error.c \
           $$PWD/jansson/src/hashtable.c \
           $$PWD/jansson/src/hashtable_seed.c \
           $$PWD/jansson/src/load.c \
           $$PWD/jansson/src/memory.c \
           $$PWD/jansson/src/pack_unpack.c \
           $$PWD/jansson/src/strbuffer.c \
           $$PWD/jansson/src/strconv.c \
           $$PWD/jansson/src/utf.c \
           $$PWD/jansson/src/value.c

win32 {
DEFINES += __RE_OS_WINDOWS__=1
DEFINES += WIN32_LEAN_AND_MEAN
DEFINES += _WIN32
#DEFINES += USE_WINDOWS_CRYPTOAPI

}

macx {
DEFINES += __RE_OS_MACOSX__=1

#common defines
DEFINES += HAVE_INTTYPES_H=1
DEFINES += HAVE_STDINT_H=1

DEFINES += HAVE_SYS_TIME_H=1
DEFINES += HAVE_SYS_PARAM_H=1
DEFINES += HAVE_SYS_STAT_H=1
DEFINES += HAVE_SYS_TIME_H=1
DEFINES += HAVE_SYS_TYPES_H=1

DEFINES += HAVE_PTHREAD_H=1
DEFINES += HAVE_UNISTD_H=1
DEFINES += HAVE_FCNTL_H=1

DEFINES += HAVE_SCHED_H=1
DEFINES += HAVE_FUNCTION_PTHREAD_CANCEL=1
DEFINES += HAVE_FUNCTION_USLEEP=1
DEFINES += HAVE_FUNCTION_PTHREAD_ATTR_SETSCOPE=1
DEFINES += HAVE_FUNCTION_PTHREAD_ATTR_SETSTACKSIZE=1

## jansson defines
DEFINES += JSON_INLINE=inline

##  manually define jason int
DEFINES += JANSSON_USING_CMAKE=1
DEFINES += json_int_t=int64_t
DEFINES += json_strtoint=strtoll
DEFINES += JSON_INTEGER_FORMAT=PRIi64

##  automatically define jason int
#DEFINES += JSON_INTEGER_IS_LONG_LONG=1

## always define with 1 or 0
DEFINES += JSON_HAVE_LOCALECONV=1

}

linux-* {
DEFINES += __RE_OS_LINUX__=1

}


Remove -Zc:strictStrings flag that Qt 5.4 adds when using MSVS 2013.

include(qt.pri)

CONFIG *= warn_on

win32 {
	# Import dependency paths for windows
	include(winpaths_default.pri)

	INCLUDEPATH *= "$$BOOST_PATH/include" "$$BOOST_PATH/include/boost-1_49/"
	QMAKE_LIBDIR *= "$$OPENSSL_PATH/lib" "$$LIBSNDFILE_PATH/lib" "$$BOOST_PATH/lib"
	INCLUDEPATH *= "$$OPENSSL_PATH/include" "$$LIBSNDFILE_PATH/include"

	# Sanity check that DXSDK_DIR, LIB and INCLUDE are properly set up.
	#
	# On Windows/x86, we build using the VS2013 v120_xp toolchain, which targets
	# a slightly modified Win7 SDK that still allows building for Windows XP. In that
	# environment, we must use the "external" DirectX SDK (June 2010). This SDK is
	# specified via the SXSDK_DIR.
	#
	# On Windows/amd64, we build using the VS2013 v120 platform, and we target the
	# Windows 8.1 SDK. In this setup, we use the DirectX SDK included with the Windows
	# 8.1 SDK, but only to a point. The bundled SDK does not include all things that
	# we depend on for the overlay, such as d3dx{9,10,11}. To overcome this, we use
	# both SDKs: the one bundled with the Windows 8.1 SDK for most libraries, and the
	# external June 2010 variant for the things that are not in the Windows 8.1 SDK
	# variant of the DirectX SDK. This is the approach recommended by Microsoft:
	# http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275(v=vs.85).aspx
	# (see step 5).
	#
	# Because of these things, the Windows build currently expects the build environment
	# to properly set up the LIB and INCLUDE environment variables, with correct ordering
	# of the Windows SDK and DirectX depending on the platform we're targetting.
	# It's tough to check these things with qmake, we'll have to do with a simple sanity
	# check for the presence of the variables.
	DXSDK_DIR_VAR=$$(DXSDK_DIR)
	INCLUDE_VAR=$$(INCLUDE)
	LIB_VAR=$$(LIB)
	isEmpty(DXSDK_DIR_VAR) {
		error("Missing DXSDK_DIR environment variable. Are you missing the DirectX SDK (June 2010)?")
	}
	isEmpty(LIB_VAR) {
		error("The LIB environment variable is not set. Are you not in a build environment?")
	}
	isEmpty(INCLUDE_VAR) {
		error("The INCLUDE environment variable is not set. Are you not in a build environment?")
	}

	CONFIG(intelcpp) {
		DEFINES *= USE_INTEL_IPP
		DEFINES *= RESTRICT=restrict
		DEFINES *= VAR_ARRAYS
		QMAKE_CC = icl
		QMAKE_CXX = icl
		QMAKE_LIB = xilib /nologo
		QMAKE_LINK = xilink
		QMAKE_CFLAGS *= -Qstd=c99 -Qrestrict -Qvc9
		QMAKE_CXXFLAGS *= -Qstd=c++0x -Qrestrict -Qvc9

		QMAKE_CFLAGS_LTCG =
		QMAKE_CXXFLAGS_LTCG =
		QMAKE_LFLAGS_LTCG =

		QMAKE_CFLAGS_RELEASE *= -O3 -Ot -QxSSE2 -Qprec-div-
		QMAKE_CFLAGS_RELEASE -=-arch:SSE
		QMAKE_CFLAGS_RELEASE -= -GL

		QMAKE_CXXFLAGS_RELEASE *= -O3 -Ot -QxSSE2 -Qprec-div-
		QMAKE_CXXFLAGS_RELEASE -=-arch:SSE
		QMAKE_CXXFLAGS_RELEASE -= -GL

		QMAKE_CFLAGS_DEBUG *= -O2 -Ob0
		QMAKE_CXXFLAGS_DEBUG *= -O2 -Ob0

		CONFIG(optgen) {
			QMAKE_CFLAGS *= -Qprof-gen
			QMAKE_CXXFLAGS *= -Qprof-gen
		}

		CONFIG(optimize) {
			QMAKE_CFLAGS *= -Qprof-use
			QMAKE_CXXFLAGS *= -Qprof-use
		}
	} else {
		QMAKE_CFLAGS_RELEASE *= -Ox -Ot /fp:fast /Qfast_transcendentals -Ob2
		QMAKE_CXXFLAGS_RELEASE *= -Ox -Ot /fp:fast /Qfast_transcendentals -Ob2
		QMAKE_LFLAGS_RELEASE *= /NXCOMPAT /DYNAMICBASE
		equals(QMAKE_TARGET.arch, x86) {
			QMAKE_LFLAGS_RELEASE -= /SafeSEH
		}

		# MSVS 2012 and 2013's cl.exe will generate SSE2 code by default,
		# unless an explict arch is set.
		win32-msvc2012|win32-msvc2013 {
			QMAKE_CFLAGS_RELEASE *= -arch:SSE
			QMAKE_CXXFLAGS_RELEASE *= -arch:SSE
		}

		# Qt 5.4 uses -Zc:strictStrings by default on MSVS 2013.
		# TextToSpeech_win.cpp uses sapi.h, which isn't compatible
		# with the strictStrings option due to bad conversions
		# in some of its functions's default parameters.
		QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings
		QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
		QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
		QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings

		QMAKE_LFLAGS_CONSOLE -= /SUBSYSTEM:CONSOLE
		QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,5.01

		QMAKE_LFLAGS_WINDOWS -= /SUBSYSTEM:WINDOWS
		QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01

		CONFIG(analyze) {
			QMAKE_CFLAGS_DEBUG *= /analyze
			QMAKE_CXXFLAGS_DEBUG *= /analyze
			QMAKE_CFLAGS_RELEASE *= /analyze
			QMAKE_CXXFLAGS_RELEASE *= /analyze
		}
		DEFINES *= RESTRICT=
		CONFIG(sse2) {
		      QMAKE_CFLAGS_RELEASE -= -arch:SSE
		      QMAKE_CFLAGS_DEBUG -= -arch:SSE
		      QMAKE_CFLAGS += -arch:SSE2
		}
	}

	CONFIG(symbols) {
		QMAKE_CFLAGS_RELEASE *= -GR -Zi -Oy-
		QMAKE_CXXFLAGS_RELEASE *= -GR -Zi -Oy-

		QMAKE_CFLAGS_RELEASE -= -Oy
		QMAKE_CXXFLAGS_RELEASE -= -Oy

		QMAKE_LFLAGS *= /debug
		QMAKE_LFLAGS *= /OPT:REF /OPT:ICF
	}

	CONFIG(vld) {
		CONFIG(debug, debug|release) {
			DEFINES *= USE_VLD
			INCLUDEPATH *= "$$VLD_PATH/include"
			QMAKE_LIBDIR *= "$$VLD_PATH/lib"
		}
	}
}

unix {
	DEFINES *= RESTRICT=__restrict__
	QMAKE_CFLAGS *= -Wfatal-errors -fvisibility=hidden
	QMAKE_CXXFLAGS *= -Wfatal-errors -fvisibility=hidden
	!CONFIG(quiet-build-log) {
		QMAKE_CFLAGS *= -Wshadow -Wconversion -Wsign-compare
		QMAKE_CXXFLAGS *= -Wshadow -Woverloaded-virtual -Wold-style-cast -Wconversion -Wsign-compare
	}

	CONFIG(opt-gcc) {
		QMAKE_CC = /opt/gcc/bin/gcc
		QMAKE_CXX = /opt/gcc/bin/g++
		QMAKE_LINK = /opt/gcc/bin/g++
	}

	CONFIG(optgen) {
		QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
		QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
		QMAKE_LFLAGS *= -fprofile-generate
	}

	CONFIG(optimize) {
		QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
		QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
	}
}

unix:!macx {
	CONFIG(debug, debug|release) {
		QMAKE_CFLAGS *= -fstack-protector -fPIE -pie
		QMAKE_CXXFLAGS *= -fstack-protector -fPIE -pie
		QMAKE_LFLAGS = -Wl,--no-add-needed
	}

	DEFINES *= _FORTIFY_SOURCE=2
	QMAKE_LFLAGS *= -Wl,-z,relro -Wl,-z,now

	CONFIG(symbols) {
		QMAKE_CFLAGS *= -g
		QMAKE_CXXFLAGS *= -g
	}
}

macx {
	SYSTEM_INCLUDES = $$(MUMBLE_PREFIX)/include $$(MUMBLE_PREFIX)/include/boost_1_54_0 $$[QT_INSTALL_HEADERS]
	QMAKE_LIBDIR *= $$(MUMBLE_PREFIX)/lib

	for(inc, $$list($$SYSTEM_INCLUDES)) {
		QMAKE_CFLAGS += -isystem $$inc
		QMAKE_CXXFLAGS += -isystem $$inc
		QMAKE_OBJECTIVE_CFLAGS += -isystem $$inc
		QMAKE_OBJECTIVE_CXXFLAGS += -isystem $$inc
	}

	!CONFIG(universal) {
		CONFIG += no-pch

		# Qt 5.1 and greater want short-form OS X SDKs.
		isEqual(QT_MAJOR_VERSION, 5) {
			QMAKE_MAC_SDK = macosx
		} else {
			QMAKE_MAC_SDK = $$system(xcrun --sdk macosx --show-sdk-path 2>/dev/null)
			isEmpty(QMAKE_MAC_SDK) {
				QMAKE_MAC_SDK = $$system(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
				!exists($$QMAKE_MAC_SDK) {
					message("Unable to find usable OS X SDK")
					error("Aborting build")
				}
			}
		}

		QMAKE_CC = $$system(xcrun -find clang)
		QMAKE_CXX = $$system(xcrun -find clang++)
		QMAKE_LINK = $$system(xcrun -find clang++)
		QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
		QMAKE_CFLAGS += -mmacosx-version-min=10.6
		QMAKE_CXXFLAGS += -mmacosx-version-min=10.6
		QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.6
		QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=10.6
	} else {
		XCODE_PATH=$$system(xcode-select -print-path)
		CONFIG += x86 ppc no-cocoa
		QMAKE_MAC_SDK = $${XCODE_PATH}/SDKs/MacOSX10.5.sdk
		QMAKE_CC = $${XCODE_PATH}/usr/bin/gcc-4.2
		QMAKE_CXX = $${XCODE_PATH}/usr/bin/g++-4.2
		QMAKE_LINK = $${XCODE_PATH}/usr/bin/g++-4.2
		QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
		QMAKE_CFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_CXXFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		DEFINES += USE_MAC_UNIVERSAL
	}

	QMAKE_LFLAGS += -Wl,-dead_strip -framework Cocoa -framework Carbon

	CONFIG(symbols) {
		QMAKE_CFLAGS *= -gfull -gdwarf-2
		QMAKE_CXXFLAGS *= -gfull -gdwarf-2
	}
}

CONFIG(clang-analyzer) {
	QMAKE_CC = $$(CC)
	QMAKE_CXX = $$(CXX)
}

CONFIG(no-pch) {
	CONFIG -= precompile_header
} else {
 	CONFIG *= precompile_header
}

CONFIG(debug, debug|release) {
	DEFINES *= SNAPSHOT_BUILD
}

include(qt.pri)

CONFIG *= warn_on

win32 {
	# Import dependency paths for windows
	include(winpaths_default.pri)

	INCLUDEPATH *= "$$BOOST_PATH/include" "$$BOOST_PATH/include/boost-1_49/"
	QMAKE_LIBDIR *= "$$OPENSSL_PATH/lib" "$$LIBSNDFILE_PATH/lib" "$$BOOST_PATH/lib"
	INCLUDEPATH *= "$$OPENSSL_PATH/include" "$$LIBSNDFILE_PATH/include"

	# Sanity check that DXSDK_DIR, LIB and INCLUDE are properly set up.
	#
	# On Windows/x86, we build using the VS2013 v120_xp toolchain, which targets
	# a slightly modified Win7 SDK that still allows building for Windows XP. In that
	# environment, we must use the "external" DirectX SDK (June 2010). This SDK is
	# specified via the SXSDK_DIR.
	#
	# On Windows/amd64, we build using the VS2013 v120 platform, and we target the
	# Windows 8.1 SDK. In this setup, we use the DirectX SDK included with the Windows
	# 8.1 SDK, but only to a point. The bundled SDK does not include all things that
	# we depend on for the overlay, such as d3dx{9,10,11}. To overcome this, we use
	# both SDKs: the one bundled with the Windows 8.1 SDK for most libraries, and the
	# external June 2010 variant for the things that are not in the Windows 8.1 SDK
	# variant of the DirectX SDK. This is the approach recommended by Microsoft:
	# http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275(v=vs.85).aspx
	# (see step 5).
	#
	# Because of these things, the Windows build currently expects the build environment
	# to properly set up the LIB and INCLUDE environment variables, with correct ordering
	# of the Windows SDK and DirectX depending on the platform we're targetting.
	# It's tough to check these things with qmake, we'll have to do with a simple sanity
	# check for the presence of the variables.
	DXSDK_DIR_VAR=$$(DXSDK_DIR)
	INCLUDE_VAR=$$(INCLUDE)
	LIB_VAR=$$(LIB)
	isEmpty(DXSDK_DIR_VAR) {
		error("Missing DXSDK_DIR environment variable. Are you missing the DirectX SDK (June 2010)?")
	}
	isEmpty(LIB_VAR) {
		error("The LIB environment variable is not set. Are you not in a build environment?")
	}
	isEmpty(INCLUDE_VAR) {
		error("The INCLUDE environment variable is not set. Are you not in a build environment?")
	}

	CONFIG(intelcpp) {
		DEFINES *= USE_INTEL_IPP
		DEFINES *= RESTRICT=restrict
		DEFINES *= VAR_ARRAYS
		QMAKE_CC = icl
		QMAKE_CXX = icl
		QMAKE_LIB = xilib /nologo
		QMAKE_LINK = xilink
		QMAKE_CFLAGS *= -Qstd=c99 -Qrestrict -Qvc9
		QMAKE_CXXFLAGS *= -Qstd=c++0x -Qrestrict -Qvc9

		QMAKE_CFLAGS_LTCG =
		QMAKE_CXXFLAGS_LTCG =
		QMAKE_LFLAGS_LTCG =

		QMAKE_CFLAGS_RELEASE *= -O3 -Ot -QxSSE2 -Qprec-div-
		QMAKE_CFLAGS_RELEASE -=-arch:SSE
		QMAKE_CFLAGS_RELEASE -= -GL

		QMAKE_CXXFLAGS_RELEASE *= -O3 -Ot -QxSSE2 -Qprec-div-
		QMAKE_CXXFLAGS_RELEASE -=-arch:SSE
		QMAKE_CXXFLAGS_RELEASE -= -GL

		QMAKE_CFLAGS_DEBUG *= -O2 -Ob0
		QMAKE_CXXFLAGS_DEBUG *= -O2 -Ob0

		CONFIG(optgen) {
			QMAKE_CFLAGS *= -Qprof-gen
			QMAKE_CXXFLAGS *= -Qprof-gen
		}

		CONFIG(optimize) {
			QMAKE_CFLAGS *= -Qprof-use
			QMAKE_CXXFLAGS *= -Qprof-use
		}
	} else {
		QMAKE_CFLAGS_RELEASE *= -Ox -Ot /fp:fast /Qfast_transcendentals -Ob2
		QMAKE_CXXFLAGS_RELEASE *= -Ox -Ot /fp:fast /Qfast_transcendentals -Ob2
		QMAKE_LFLAGS_RELEASE *= /NXCOMPAT /DYNAMICBASE
		equals(QMAKE_TARGET.arch, x86) {
			QMAKE_LFLAGS_RELEASE -= /SafeSEH
		}

		# MSVS 2012 and 2013's cl.exe will generate SSE2 code by default,
		# unless an explict arch is set.
		win32-msvc2012|win32-msvc2013 {
			QMAKE_CFLAGS_RELEASE *= -arch:SSE
			QMAKE_CXXFLAGS_RELEASE *= -arch:SSE
		}

		QMAKE_LFLAGS_CONSOLE -= /SUBSYSTEM:CONSOLE
		QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,5.01

		QMAKE_LFLAGS_WINDOWS -= /SUBSYSTEM:WINDOWS
		QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01

		CONFIG(analyze) {
			QMAKE_CFLAGS_DEBUG *= /analyze
			QMAKE_CXXFLAGS_DEBUG *= /analyze
			QMAKE_CFLAGS_RELEASE *= /analyze
			QMAKE_CXXFLAGS_RELEASE *= /analyze
		}
		DEFINES *= RESTRICT=
		CONFIG(sse2) {
		      QMAKE_CFLAGS_RELEASE -= -arch:SSE
		      QMAKE_CFLAGS_DEBUG -= -arch:SSE
		      QMAKE_CFLAGS += -arch:SSE2
		}
	}

	CONFIG(symbols) {
		QMAKE_CFLAGS_RELEASE *= -GR -Zi -Oy-
		QMAKE_CXXFLAGS_RELEASE *= -GR -Zi -Oy-

		QMAKE_CFLAGS_RELEASE -= -Oy
		QMAKE_CXXFLAGS_RELEASE -= -Oy

		QMAKE_LFLAGS *= /debug
		QMAKE_LFLAGS *= /OPT:REF /OPT:ICF
	}

	CONFIG(vld) {
		CONFIG(debug, debug|release) {
			DEFINES *= USE_VLD
			INCLUDEPATH *= "$$VLD_PATH/include"
			QMAKE_LIBDIR *= "$$VLD_PATH/lib"
		}
	}
}

unix {
	DEFINES *= RESTRICT=__restrict__
	QMAKE_CFLAGS *= -Wfatal-errors -fvisibility=hidden
	QMAKE_CXXFLAGS *= -Wfatal-errors -fvisibility=hidden
	!CONFIG(quiet-build-log) {
		QMAKE_CFLAGS *= -Wshadow -Wconversion -Wsign-compare
		QMAKE_CXXFLAGS *= -Wshadow -Woverloaded-virtual -Wold-style-cast -Wconversion -Wsign-compare
	}

	CONFIG(opt-gcc) {
		QMAKE_CC = /opt/gcc/bin/gcc
		QMAKE_CXX = /opt/gcc/bin/g++
		QMAKE_LINK = /opt/gcc/bin/g++
	}

	CONFIG(optgen) {
		QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
		QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
		QMAKE_LFLAGS *= -fprofile-generate
	}

	CONFIG(optimize) {
		QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
		QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
	}
}

unix:!macx {
	CONFIG(debug, debug|release) {
		QMAKE_CFLAGS *= -fstack-protector -fPIE -pie
		QMAKE_CXXFLAGS *= -fstack-protector -fPIE -pie
		QMAKE_LFLAGS = -Wl,--no-add-needed
	}

	DEFINES *= _FORTIFY_SOURCE=2
	QMAKE_LFLAGS *= -Wl,-z,relro -Wl,-z,now

	CONFIG(symbols) {
		QMAKE_CFLAGS *= -g
		QMAKE_CXXFLAGS *= -g
	}
}

macx {
	SYSTEM_INCLUDES = $$(MUMBLE_PREFIX)/include $$(MUMBLE_PREFIX)/include/boost_1_54_0 $$[QT_INSTALL_HEADERS]
	QMAKE_LIBDIR *= $$(MUMBLE_PREFIX)/lib

	for(inc, $$list($$SYSTEM_INCLUDES)) {
		QMAKE_CFLAGS += -isystem $$inc
		QMAKE_CXXFLAGS += -isystem $$inc
		QMAKE_OBJECTIVE_CFLAGS += -isystem $$inc
		QMAKE_OBJECTIVE_CXXFLAGS += -isystem $$inc
	}

	!CONFIG(universal) {
		CONFIG += no-pch

		# Qt 5.1 and greater want short-form OS X SDKs.
		isEqual(QT_MAJOR_VERSION, 5) {
			QMAKE_MAC_SDK = macosx
		} else {
			QMAKE_MAC_SDK = $$system(xcrun --sdk macosx --show-sdk-path 2>/dev/null)
			isEmpty(QMAKE_MAC_SDK) {
				QMAKE_MAC_SDK = $$system(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
				!exists($$QMAKE_MAC_SDK) {
					message("Unable to find usable OS X SDK")
					error("Aborting build")
				}
			}
		}

		QMAKE_CC = $$system(xcrun -find clang)
		QMAKE_CXX = $$system(xcrun -find clang++)
		QMAKE_LINK = $$system(xcrun -find clang++)
		QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
		QMAKE_CFLAGS += -mmacosx-version-min=10.6
		QMAKE_CXXFLAGS += -mmacosx-version-min=10.6
		QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.6
		QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=10.6
	} else {
		XCODE_PATH=$$system(xcode-select -print-path)
		CONFIG += x86 ppc no-cocoa
		QMAKE_MAC_SDK = $${XCODE_PATH}/SDKs/MacOSX10.5.sdk
		QMAKE_CC = $${XCODE_PATH}/usr/bin/gcc-4.2
		QMAKE_CXX = $${XCODE_PATH}/usr/bin/g++-4.2
		QMAKE_LINK = $${XCODE_PATH}/usr/bin/g++-4.2
		QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
		QMAKE_CFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_CXXFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		DEFINES += USE_MAC_UNIVERSAL
	}

	QMAKE_LFLAGS += -Wl,-dead_strip -framework Cocoa -framework Carbon

	CONFIG(symbols) {
		QMAKE_CFLAGS *= -gfull -gdwarf-2
		QMAKE_CXXFLAGS *= -gfull -gdwarf-2
	}
}

CONFIG(clang-analyzer) {
	QMAKE_CC = $$(CC)
	QMAKE_CXX = $$(CXX)
}

CONFIG(no-pch) {
	CONFIG -= precompile_header
} else {
 	CONFIG *= precompile_header
}

CONFIG(debug, debug|release) {
	DEFINES *= SNAPSHOT_BUILD
}


inactivate networkconfig

inactivate networkconfig

SOURCES += \
    ../player-common/cmdparser.cpp \
    ../player-common/debug_infos.cpp \
    ../player-common/configdialog.cpp \
    ../player-common/screen.cpp

HEADERS  += \
    ../player-common/cmdparser.h \
    ../player-common/configdialog.h \
    ../player-common/debug_infos.h \
    ../player-common/screen.h

FORMS += \
    ../player-common/configdialog.ui \
    ../player-common/debug_infos.ui

#unix:!android | !win32 {
#    SOURCES += ../player-common/network_dialog.cpp
#    HEADERS += ../player-common/network_dialog.h
#    FORMS   +=  ../player-common/networkdialog.ui
#}

SOURCES += \
    ../player-common/cmdparser.cpp \
    ../player-common/debug_infos.cpp \
    ../player-common/configdialog.cpp \
    ../player-common/screen.cpp

HEADERS  += \
    ../player-common/cmdparser.h \
    ../player-common/configdialog.h \
    ../player-common/debug_infos.h \
    ../player-common/screen.h

FORMS += \
    ../player-common/configdialog.ui \
    ../player-common/debug_infos.ui

unix:!android | !win32 {
    SOURCES += ../player-common/network_dialog.cpp
    HEADERS += ../player-common/network_dialog.h
    FORMS   +=  ../player-common/networkdialog.ui
}


remove debug statements

remove debug statements

############################################## GLOBAL FUNCTIONS ###############################################
#Define minQtVersion Test
defineTest(minQtVersion) {
    maj = $$1
    min = $$2
    patch = $$3
    isEqual(QT_MAJOR_VERSION, $$maj) {
        isEqual(QT_MINOR_VERSION, $$min) {
            isEqual(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
            greaterThan(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
        }
        greaterThan(QT_MINOR_VERSION, $$min) {
            return(true)
        }
    }
    greaterThan(QT_MAJOR_VERSION, $$maj) {
        return(true)
    }
    return(false)
}

defineReplace(MacDeployArgs) {
    target = $$1
    target_ext = $$2
    mne_binary_dir = $$3
    mne_library_dir = $$4
    extra_args = $$5

    isEmpty($${target_ext}) {
        target_custom_ext = .app
    } else {
        target_custom_ext = $${target_ext}
    }

    deploy_cmd = macdeployqt

    deploy_target = $$shell_quote($$shell_path($${mne_binary_dir}/$${target}$${target_custom_ext}))

    deploy_libs_to_copy = -libpath=$${mne_library_dir}
    !isEmpty(extra_args) {
      deploy_libs_to_copy += $${extra_args}
    }
    return($$deploy_cmd $$deploy_target $$deploy_libs_to_copy)
 }

############################################### GLOBAL DEFINES ################################################

MNE_CPP_VERSION = 1.0.0
MNE_LIB_VERSION = 1

QMAKE_TARGET_PRODUCT = mne-cpp
QMAKE_TARGET_DESCRIPTION = MNE Qt 5 based C++ library.
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2018 Authors of mne-cpp. All rights reserved.

########################################### PROJECT CONFIGURATION #############################################

## To build only the minimal version, i.e, for mne_rt_server run: qmake MNECPP_CONFIG+=minimalVersion
## To set CodeCov coverage compiler flag run: qmake MNECPP_CONFIG+=withCodeCov
## To disable tests run: qmake MNECPP_CONFIG+=noTests
## To disable examples run: qmake MNECPP_CONFIG+=noExamples
## To build basic MNE Scan version run: qmake MNECPP_CONFIG+=buildBasicMneScanVersion
## To build MNE-CPP libraries as static libs: qmake MNECPP_CONFIG+=buildStaticLibraries

## Build MNE-CPP Deep library
MNECPP_CONFIG += buildDeep

#Build minimalVersion for qt versions < 5.10.0
!minQtVersion(5, 10, 0) {
    message("Building minimal version due to Qt version $${QT_VERSION}.")
    MNECPP_CONFIG += minimalVersion
}

########################################### DIRECTORY DEFINITIONS #############################################

# Eigen
EIGEN_INCLUDE_DIR = $$EIGEN_INCLUDE_DIR
isEmpty(EIGEN_INCLUDE_DIR) {
    EIGEN_INCLUDE_DIR = $${PWD}/include/3rdParty/eigen3
}

#CNTK
CNTK_INCLUDE_DIR = $$CNTK_INCLUDE_DIR
isEmpty( CNTK_INCLUDE_DIR ) {
    # Check CNTK Path options
    exists($$(CNTKPATH)/cntk/Include/Eval.h) {
        CNTK_TEST_DIR = $$(CNTKPATH)/cntk
    }
    exists($$(CNTKPATH)/Include/Eval.h) {
        CNTK_TEST_DIR = $$(CNTKPATH)
    }
    exists($$(MYCNTKPATH)/cntk/Include/Eval.h) {
        CNTK_TEST_DIR = $$(MYCNTKPATH)/cntk
    }
    exists($$(MYCNTKPATH)/Include/Eval.h) {
        CNTK_TEST_DIR = $$(MYCNTKPATH)
    }
    # Set CNTK path variables
    !isEmpty( CNTK_TEST_DIR ) {
        CNTK_INCLUDE_DIR = $${CNTK_TEST_DIR}/Include
        CNTK_LIBRARY_DIR = $${CNTK_TEST_DIR}/cntk
    }
}

# include
MNE_INCLUDE_DIR = $$MNE_INCLUDE_DIR
isEmpty( MNE_INCLUDE_DIR ) {
    MNE_INCLUDE_DIR = $${PWD}/libraries
}
MNE_SCAN_INCLUDE_DIR = $$MNE_SCAN_INCLUDE_DIR
isEmpty( MNE_SCAN_INCLUDE_DIR ) {
    MNE_SCAN_INCLUDE_DIR = $${PWD}/applications/mne_scan/libs
}
MNE_ANALYZE_INCLUDE_DIR = $$MNE_ANALYZE_INCLUDE_DIR
isEmpty( MNE_ANALYZE_INCLUDE_DIR ) {
    MNE_ANALYZE_INCLUDE_DIR = $${PWD}/applications/mne_analyze/libs
}
MNE_ANALYZE_EXTENSIONS_DIR = $$MNE_ANALYZE_EXTENSIONS_DIR
isEmpty( MNE_ANALYZE_EXTENSIONS_DIR ) {
    MNE_ANALYZE_EXTENSIONS_DIR = $${PWD}/applications/mne_analyze/extensions
}

# lib
MNE_LIBRARY_DIR = $$MNE_LIBRARY_DIR
isEmpty( MNE_LIBRARY_DIR ) {
    MNE_LIBRARY_DIR = $${PWD}/lib
}
contains(MNECPP_CONFIG, buildDeep) {
    CNTK_LIBRARY_DIR = $$CNTK_LIBRARY_DIR
    isEmpty( CNTK_LIBRARY_DIR ) {
        CNTK_LIBRARY_DIR = C:/local/cntk/cntk
    }
}

# bin
MNE_BINARY_DIR = $$MNE_BINARY_DIR
isEmpty( MNE_BINARY_DIR ) {
    MNE_BINARY_DIR = $${PWD}/bin
}

# repository dir
ROOT_DIR = $${PWD}

############################################## GLOBAL FUNCTIONS ###############################################
#Define minQtVersion Test
defineTest(minQtVersion) {
    maj = $$1
    min = $$2
    patch = $$3
    isEqual(QT_MAJOR_VERSION, $$maj) {
        isEqual(QT_MINOR_VERSION, $$min) {
            isEqual(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
            greaterThan(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
        }
        greaterThan(QT_MINOR_VERSION, $$min) {
            return(true)
        }
    }
    greaterThan(QT_MAJOR_VERSION, $$maj) {
        return(true)
    }
    return(false)
}

defineReplace(MacDeployArgs) {
    target = $$1
    target_ext = $$2
    mne_binary_dir = $$3
    mne_library_dir = $$4
    extra_args = $$5

    isEmpty($${target_ext}) {
        target_custom_ext = .app
    } else {
        target_custom_ext = $${target_ext}
    }

    deploy_cmd = macdeployqt

    deploy_target = $$shell_quote($$shell_path($${mne_binary_dir}/$${target}$${target_custom_ext}))

    message("$$extra_args")
    deploy_libs_to_copy = -libpath=$${mne_library_dir}
    !isEmpty(extra_args) {
      deploy_libs_to_copy += $${extra_args}
    }
    message("$$deploy_cmd $$deploy_target $$deploy_libs_to_copy")
    return($$deploy_cmd $$deploy_target $$deploy_libs_to_copy)
 }

############################################### GLOBAL DEFINES ################################################

MNE_CPP_VERSION = 1.0.0
MNE_LIB_VERSION = 1

QMAKE_TARGET_PRODUCT = mne-cpp
QMAKE_TARGET_DESCRIPTION = MNE Qt 5 based C++ library.
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2018 Authors of mne-cpp. All rights reserved.

########################################### PROJECT CONFIGURATION #############################################

## To build only the minimal version, i.e, for mne_rt_server run: qmake MNECPP_CONFIG+=minimalVersion
## To set CodeCov coverage compiler flag run: qmake MNECPP_CONFIG+=withCodeCov
## To disable tests run: qmake MNECPP_CONFIG+=noTests
## To disable examples run: qmake MNECPP_CONFIG+=noExamples
## To build basic MNE Scan version run: qmake MNECPP_CONFIG+=buildBasicMneScanVersion
## To build MNE-CPP libraries as static libs: qmake MNECPP_CONFIG+=buildStaticLibraries

## Build MNE-CPP Deep library
MNECPP_CONFIG += buildDeep

#Build minimalVersion for qt versions < 5.10.0
!minQtVersion(5, 10, 0) {
    message("Building minimal version due to Qt version $${QT_VERSION}.")
    MNECPP_CONFIG += minimalVersion
}

########################################### DIRECTORY DEFINITIONS #############################################

# Eigen
EIGEN_INCLUDE_DIR = $$EIGEN_INCLUDE_DIR
isEmpty(EIGEN_INCLUDE_DIR) {
    EIGEN_INCLUDE_DIR = $${PWD}/include/3rdParty/eigen3
}

#CNTK
CNTK_INCLUDE_DIR = $$CNTK_INCLUDE_DIR
isEmpty( CNTK_INCLUDE_DIR ) {
    # Check CNTK Path options
    exists($$(CNTKPATH)/cntk/Include/Eval.h) {
        CNTK_TEST_DIR = $$(CNTKPATH)/cntk
    }
    exists($$(CNTKPATH)/Include/Eval.h) {
        CNTK_TEST_DIR = $$(CNTKPATH)
    }
    exists($$(MYCNTKPATH)/cntk/Include/Eval.h) {
        CNTK_TEST_DIR = $$(MYCNTKPATH)/cntk
    }
    exists($$(MYCNTKPATH)/Include/Eval.h) {
        CNTK_TEST_DIR = $$(MYCNTKPATH)
    }
    # Set CNTK path variables
    !isEmpty( CNTK_TEST_DIR ) {
        CNTK_INCLUDE_DIR = $${CNTK_TEST_DIR}/Include
        CNTK_LIBRARY_DIR = $${CNTK_TEST_DIR}/cntk
    }
}

# include
MNE_INCLUDE_DIR = $$MNE_INCLUDE_DIR
isEmpty( MNE_INCLUDE_DIR ) {
    MNE_INCLUDE_DIR = $${PWD}/libraries
}
MNE_SCAN_INCLUDE_DIR = $$MNE_SCAN_INCLUDE_DIR
isEmpty( MNE_SCAN_INCLUDE_DIR ) {
    MNE_SCAN_INCLUDE_DIR = $${PWD}/applications/mne_scan/libs
}
MNE_ANALYZE_INCLUDE_DIR = $$MNE_ANALYZE_INCLUDE_DIR
isEmpty( MNE_ANALYZE_INCLUDE_DIR ) {
    MNE_ANALYZE_INCLUDE_DIR = $${PWD}/applications/mne_analyze/libs
}
MNE_ANALYZE_EXTENSIONS_DIR = $$MNE_ANALYZE_EXTENSIONS_DIR
isEmpty( MNE_ANALYZE_EXTENSIONS_DIR ) {
    MNE_ANALYZE_EXTENSIONS_DIR = $${PWD}/applications/mne_analyze/extensions
}

# lib
MNE_LIBRARY_DIR = $$MNE_LIBRARY_DIR
isEmpty( MNE_LIBRARY_DIR ) {
    MNE_LIBRARY_DIR = $${PWD}/lib
}
contains(MNECPP_CONFIG, buildDeep) {
    CNTK_LIBRARY_DIR = $$CNTK_LIBRARY_DIR
    isEmpty( CNTK_LIBRARY_DIR ) {
        CNTK_LIBRARY_DIR = C:/local/cntk/cntk
    }
}

# bin
MNE_BINARY_DIR = $$MNE_BINARY_DIR
isEmpty( MNE_BINARY_DIR ) {
    MNE_BINARY_DIR = $${PWD}/bin
}

# repository dir
ROOT_DIR = $${PWD}


version update

version update


Bumped version to 0.2.4 for a release.

Bumped version to 0.2.4 for a release.

Signed-off-by: Carl Wong <71f6120c3829ee10a91638f591f6c67d26f52dda@intel.com>


Use new Maliit reference plugin by default

RevBy: Jon Nordby

MALIIT_VERSION = 0.81.1.1
MALIIT_INTERFACE_VERSION = 1.0
MALIIT_PLUGINS_INTERFACE_VERSION = 0.80
MALIIT_PLUGINS_QUICK_INTERFACE_VERSION = 0.80
MALIIT_FRAMEWORK_INTERFACE_VERSION = 0.80

# For libmaliit
MALIIT_LIB = maliit-$${MALIIT_INTERFACE_VERSION}
MALIIT_HEADER = maliit/maliit-$${MALIIT_INTERFACE_VERSION}
MALIIT_FRAMEWORK_HEADER = maliit/framework-$${MALIIT_FRAMEWORK_INTERFACE_VERSION}

enable-legacy {
    include(defines-legacy.pri)
} else {
    include(defines.pri)
}

# Linker optimization for release build
QMAKE_LFLAGS_RELEASE+=-Wl,--as-needed
# Compiler warnings are error if the build type is debug
QMAKE_CXXFLAGS_DEBUG+=-Werror -O0
QMAKE_CFLAGS_DEBUG+=-Werror -O0

OBJECTS_DIR = .obj
MOC_DIR = .moc

isEmpty(M_IM_VERSION) {
    M_IM_VERSION=$$MALIIT_VERSION
}

isEmpty(M_IM_PREFIX) {
    M_IM_PREFIX = /usr
}
isEmpty(M_IM_INSTALL_BIN) {
    M_IM_INSTALL_BIN = $$M_IM_PREFIX/bin
}
isEmpty(M_IM_INSTALL_LIBS) {
    M_IM_INSTALL_LIBS = $$M_IM_PREFIX/lib
}
isEmpty(M_IM_INSTALL_HEADERS) {
    M_IM_INSTALL_HEADERS = $$M_IM_PREFIX/include
}
DATADIR = $$M_IM_PREFIX/share
isEmpty(M_IM_INSTALL_SCHEMAS) {
    M_IM_INSTALL_SCHEMAS = $$DATADIR/gconf/schemas
}

isEmpty(M_IM_INSTALL_DOCS) {
    M_IM_INSTALL_DOCS = $$DATADIR/doc
}

M_IM_PLUGINS_DIR = $$M_IM_INSTALL_LIBS/$$MALIIT_PLUGINS
DEFINES += M_IM_PLUGINS_DIR=\\\"$$M_IM_PLUGINS_DIR\\\"

M_IM_PLUGINS_DATA_DIR = $$DATADIR/$$MALIIT_PLUGINS_DATA
DEFINES += M_IM_PLUGINS_DATA_DIR=\\\"$$M_IM_PLUGINS_DATA_DIR\\\"

M_IM_FACTORY_PLUGINS_DIR = $$M_IM_PLUGINS_DIR/factories
DEFINES += M_IM_FACTORY_PLUGINS_DIR=\\\"$$M_IM_FACTORY_PLUGINS_DIR\\\"

isEmpty(M_IM_ENABLE_MULTITOUCH) {

    M_IM_ENABLE_MULTITOUCH=true
}

MALIIT_EXTENSIONS_DIR = $$DATADIR/$$MALIIT_ATTRIBUTE_EXTENSIONS/
DEFINES += MALIIT_EXTENSIONS_DIR=\\\"$$MALIIT_EXTENSIONS_DIR\\\"

enable-legacy {
    M_IM_DEFAULT_PLUGIN = libmeego-keyboard.so
    M_IM_DEFAULT_SUBVIEW = en_gb.xml
} else {
    M_IM_DEFAULT_PLUGIN = libmaliit-keyboard-plugin.so
    M_IM_DEFAULT_SUBVIEW = en_gb
}

MALIIT_TEST_DATADIR = $$DATADIR/$$MALIIT_TEST_SUITE
MALIIT_TEST_LIBDIR = $$M_IM_INSTALL_LIBS/$$MALIIT_TEST_SUITE
MALIIT_TEST_TMPDIR = /tmp/$$MALIIT_TEST_SUITE
MALIIT_TEST_PLUGINS_DIR = $$MALIIT_TEST_LIBDIR/plugins

DEFINES += MALIIT_TEST_PLUGINS_DIR=\\\"$$MALIIT_TEST_PLUGINS_DIR\\\"

DEFINES += MALIIT_CONFIG_ROOT=\\\"$$MALIIT_CONFIG_ROOT\\\"

DEFINES += MALIIT_FRAMEWORK_USE_INTERNAL_API

# Do not define keywords signals, slots, emit and foreach because of
# conflicts with 3rd party libraries.
CONFIG += no_keywords

mac {
    # Do mac stuff here
    M_BUILD_FEATURES = debug
    M_PROFILE_PARTS =
    INCLUDEPATH += include/
}

# Use x11 on unix systems without lighthouse (qpa)
unix:!qpa: {
    CONFIG += x11
}

enable-legacy {
    DEFINES += HAVE_LEGACY_NAMES
}

contains(QT_MAJOR_VERSION, 4) {
    QT_WIDGETS = gui
} else {
    QT_WIDGETS = gui widgets
}

defineTest(outputFile) {
    out = $$OUT_PWD/$$1
    in = $$PWD/$${1}.in

    !exists($$in) {
        error($$in does not exist!)
        return(false)
    }

    MALIIT_IN_DIR = $$IN_PWD
    MALIIT_OUT_DIR = $$OUT_PWD

    variables = M_IM_FRAMEWORK_FEATURE \
                M_IM_PREFIX \
                M_IM_INSTALL_BIN \
                M_IM_INSTALL_HEADERS \
                M_IM_INSTALL_LIBS \
                M_IM_INSTALL_DOCS \
                M_IM_PLUGINS_DIR \
                M_IM_PLUGINS_DATA_DIR \
                M_IM_FACTORY_PLUGINS_DIR \
                M_IM_VERSION \
                M_IM_ENABLE_MULTITOUCH \
                M_IM_DEFAULT_PLUGIN \
                M_IM_DEFAULT_SUBVIEW \
                M_IM_QUICK_FEATURE \
                MALIIT_PLUGINS_LIB \
                MALIIT_PLUGINS_HEADER \
                MALIIT_LIB \
                MALIIT_HEADER \
                MALIIT_PLUGINS_QUICK_LIB \
                MALIIT_PLUGINS_QUICK_HEADER \
                MALIIT_PLUGINS_QUICK_FACTORY \
                MALIIT_TEST_SUITE \
                MALIIT_TEST_DATADIR \
                MALIIT_TEST_LIBDIR \
                MALIIT_TEST_TMPDIR \
                MALIIT_IN_DIR \
                MALIIT_OUT_DIR \
                MALIIT_PACKAGENAME \
                MALIIT_PACKAGE_BRIEF \
                MALIIT_FRAMEWORK_HEADER \
                MALIIT_SERVER_ARGUMENTS \

    command = "sed"
    for(var, variables) {
       command += "-e \"s:@$$var@:$$eval($$var):g\""
    }
    command += $$in > $$out

    system(mkdir -p $$dirname(out))
    system($$command)
    system(chmod --reference=$$in $$out)

    return(true)
}

defineTest(outputFiles) {
    files = $$ARGS

    for(file, files) {
        !outputFile($$file):return(false)
    }

    return(true)
}

MALIIT_VERSION = 0.81.1.1
MALIIT_INTERFACE_VERSION = 1.0
MALIIT_PLUGINS_INTERFACE_VERSION = 0.80
MALIIT_PLUGINS_QUICK_INTERFACE_VERSION = 0.80
MALIIT_FRAMEWORK_INTERFACE_VERSION = 0.80

# For libmaliit
MALIIT_LIB = maliit-$${MALIIT_INTERFACE_VERSION}
MALIIT_HEADER = maliit/maliit-$${MALIIT_INTERFACE_VERSION}
MALIIT_FRAMEWORK_HEADER = maliit/framework-$${MALIIT_FRAMEWORK_INTERFACE_VERSION}

enable-legacy {
    include(defines-legacy.pri)
} else {
    include(defines.pri)
}

# Linker optimization for release build
QMAKE_LFLAGS_RELEASE+=-Wl,--as-needed
# Compiler warnings are error if the build type is debug
QMAKE_CXXFLAGS_DEBUG+=-Werror -O0
QMAKE_CFLAGS_DEBUG+=-Werror -O0

OBJECTS_DIR = .obj
MOC_DIR = .moc

isEmpty(M_IM_VERSION) {
    M_IM_VERSION=$$MALIIT_VERSION
}

isEmpty(M_IM_PREFIX) {
    M_IM_PREFIX = /usr
}
isEmpty(M_IM_INSTALL_BIN) {
    M_IM_INSTALL_BIN = $$M_IM_PREFIX/bin
}
isEmpty(M_IM_INSTALL_LIBS) {
    M_IM_INSTALL_LIBS = $$M_IM_PREFIX/lib
}
isEmpty(M_IM_INSTALL_HEADERS) {
    M_IM_INSTALL_HEADERS = $$M_IM_PREFIX/include
}
DATADIR = $$M_IM_PREFIX/share
isEmpty(M_IM_INSTALL_SCHEMAS) {
    M_IM_INSTALL_SCHEMAS = $$DATADIR/gconf/schemas
}

isEmpty(M_IM_INSTALL_DOCS) {
    M_IM_INSTALL_DOCS = $$DATADIR/doc
}

M_IM_PLUGINS_DIR = $$M_IM_INSTALL_LIBS/$$MALIIT_PLUGINS
DEFINES += M_IM_PLUGINS_DIR=\\\"$$M_IM_PLUGINS_DIR\\\"

M_IM_PLUGINS_DATA_DIR = $$DATADIR/$$MALIIT_PLUGINS_DATA
DEFINES += M_IM_PLUGINS_DATA_DIR=\\\"$$M_IM_PLUGINS_DATA_DIR\\\"

M_IM_FACTORY_PLUGINS_DIR = $$M_IM_PLUGINS_DIR/factories
DEFINES += M_IM_FACTORY_PLUGINS_DIR=\\\"$$M_IM_FACTORY_PLUGINS_DIR\\\"

isEmpty(M_IM_ENABLE_MULTITOUCH) {

    M_IM_ENABLE_MULTITOUCH=true
}

MALIIT_EXTENSIONS_DIR = $$DATADIR/$$MALIIT_ATTRIBUTE_EXTENSIONS/
DEFINES += MALIIT_EXTENSIONS_DIR=\\\"$$MALIIT_EXTENSIONS_DIR\\\"

enable-legacy {
    M_IM_DEFAULT_PLUGIN = libmeego-keyboard.so
    M_IM_DEFAULT_SUBVIEW = en_gb.xml
} else {
    M_IM_DEFAULT_PLUGIN = libmaliit-keyboard.so
    M_IM_DEFAULT_SUBVIEW =
}

MALIIT_TEST_DATADIR = $$DATADIR/$$MALIIT_TEST_SUITE
MALIIT_TEST_LIBDIR = $$M_IM_INSTALL_LIBS/$$MALIIT_TEST_SUITE
MALIIT_TEST_TMPDIR = /tmp/$$MALIIT_TEST_SUITE
MALIIT_TEST_PLUGINS_DIR = $$MALIIT_TEST_LIBDIR/plugins

DEFINES += MALIIT_TEST_PLUGINS_DIR=\\\"$$MALIIT_TEST_PLUGINS_DIR\\\"

DEFINES += MALIIT_CONFIG_ROOT=\\\"$$MALIIT_CONFIG_ROOT\\\"

DEFINES += MALIIT_FRAMEWORK_USE_INTERNAL_API

# Do not define keywords signals, slots, emit and foreach because of
# conflicts with 3rd party libraries.
CONFIG += no_keywords

mac {
    # Do mac stuff here
    M_BUILD_FEATURES = debug
    M_PROFILE_PARTS =
    INCLUDEPATH += include/
}

# Use x11 on unix systems without lighthouse (qpa)
unix:!qpa: {
    CONFIG += x11
}

enable-legacy {
    DEFINES += HAVE_LEGACY_NAMES
}

contains(QT_MAJOR_VERSION, 4) {
    QT_WIDGETS = gui
} else {
    QT_WIDGETS = gui widgets
}

defineTest(outputFile) {
    out = $$OUT_PWD/$$1
    in = $$PWD/$${1}.in

    !exists($$in) {
        error($$in does not exist!)
        return(false)
    }

    MALIIT_IN_DIR = $$IN_PWD
    MALIIT_OUT_DIR = $$OUT_PWD

    variables = M_IM_FRAMEWORK_FEATURE \
                M_IM_PREFIX \
                M_IM_INSTALL_BIN \
                M_IM_INSTALL_HEADERS \
                M_IM_INSTALL_LIBS \
                M_IM_INSTALL_DOCS \
                M_IM_PLUGINS_DIR \
                M_IM_PLUGINS_DATA_DIR \
                M_IM_FACTORY_PLUGINS_DIR \
                M_IM_VERSION \
                M_IM_ENABLE_MULTITOUCH \
                M_IM_DEFAULT_PLUGIN \
                M_IM_DEFAULT_SUBVIEW \
                M_IM_QUICK_FEATURE \
                MALIIT_PLUGINS_LIB \
                MALIIT_PLUGINS_HEADER \
                MALIIT_LIB \
                MALIIT_HEADER \
                MALIIT_PLUGINS_QUICK_LIB \
                MALIIT_PLUGINS_QUICK_HEADER \
                MALIIT_PLUGINS_QUICK_FACTORY \
                MALIIT_TEST_SUITE \
                MALIIT_TEST_DATADIR \
                MALIIT_TEST_LIBDIR \
                MALIIT_TEST_TMPDIR \
                MALIIT_IN_DIR \
                MALIIT_OUT_DIR \
                MALIIT_PACKAGENAME \
                MALIIT_PACKAGE_BRIEF \
                MALIIT_FRAMEWORK_HEADER \
                MALIIT_SERVER_ARGUMENTS \

    command = "sed"
    for(var, variables) {
       command += "-e \"s:@$$var@:$$eval($$var):g\""
    }
    command += $$in > $$out

    system(mkdir -p $$dirname(out))
    system($$command)
    system(chmod --reference=$$in $$out)

    return(true)
}

defineTest(outputFiles) {
    files = $$ARGS

    for(file, files) {
        !outputFile($$file):return(false)
    }

    return(true)
}


Fixes:    make sure plugins get the 'd' suffix if appropriate (debug version)

TEMPLATE = lib
DEPENDPATH += .
INCLUDEPATH += .
DESTDIR = $$PWD/../plugins/script
QT += script
CONFIG += debug_and_release
GENERATEDCPP = $$PWD/../generated_cpp
TARGET=$$qtLibraryTarget($$TARGET)


Updated to boost 1.68

Updated to boost 1.68

# 1. Before using autotools & make, make sure to set the macOS target platform in the shell:
# export MACOSX_DEPLOYMENT_TARGET=10.10

# 2. Install all libraries with homebrew:
# brew install autoconf automake libtool pkg-config openssl@1.1 libevent boost gcc wget

# (2a optional) Fix for xCode to stop complaining about not finding the string.h file
# https://stackoverflow.com/questions/48839127/qmake-derived-clang-in-osx-10-13-cannot-find-string-h
# INCLUDEPATH += /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include

ICON = $$PWD/qt/res/assets/icons/spectre.icns

    # to build tor with autotools, call in subfolder tor:
    # ./autogen.sh && ./configure --with-ssl-dir=/usr/local/Cellar/openssl@1.1/1.1.1 --disable-asciidoc --disable-lzma
#    LIBS += -L$$PWD/../tor/src/or -ltor \
#    -L$$PWD/../tor/src/common -lor \
#    -L$$PWD/../tor/src/common -lor-ctime \
#    -L$$PWD/../tor/src/common -lor-crypto \
#    -L$$PWD/../tor/src/common -lor-event \
#    -L$$PWD/../tor/src/trunnel -lor-trunnel \
#    -L$$PWD/../tor/src/common -lcurve25519_donna \
#    -L$$PWD/../tor/src/ext/ed25519/donna -led25519_donna \
#    -L$$PWD/../tor/src/ext/ed25519/ref10 -led25519_ref10 \
#    -L$$PWD/../tor/src/ext/keccak-tiny -lkeccak-tiny \

#    INCLUDEPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny
#    DEPENDPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny

#    PRE_TARGETDEPS += $$PWD/../tor/src/or/libtor.a \
#    $$PWD/../tor/src/common/libor.a \
#    $$PWD/../tor/src/common/libor-ctime.a \
#    $$PWD/../tor/src/common/libor-crypto.a \
#    $$PWD/../tor/src/common/libor-event.a \
#    $$PWD/../tor/src/trunnel/libor-trunnel.a \
#    $$PWD/../tor/src/common/libcurve25519_donna.a \
#    $$PWD/../tor/src/ext/ed25519/donna/libed25519_donna.a \
#    $$PWD/../tor/src/ext/ed25519/ref10/libed25519_ref10.a \
#    $$PWD/../tor/src/ext/keccak-tiny/libkeccak-tiny.a \

    # brew install zlib
    _ZLIB_PATH = /usr/local/opt/zlib
    INCLUDEPATH += "$${_ZLIB_PATH}/include/"
    LIBS += -L$${_ZLIB_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -lz

    # to build BerkeleyDB with autotools, call in subfolder db4.8:
    # ./configure --enable-cxx --disable-shared --disable-replication --with-pic && make
    _BERKELEY_PATH = $$PWD/../db4.8/build_unix
    LIBS += $${_BERKELEY_PATH}/libdb_cxx.a \ # link static
    $${_BERKELEY_PATH}/libdb.a

    DEPENDPATH += $${_BERKELEY_PATH}
    INCLUDEPATH += $${_BERKELEY_PATH}

    # to build leveldb call in subfolder leveldb:
    # ./build_detect_platform build_config.mk ./ && make
    LIBS += -L$$PWD/../leveldb/out-static -lleveldb \
    -L$$PWD/../leveldb/out-static -lmemenv

    INCLUDEPATH += $$PWD/../leveldb/out-static
    DEPENDPATH += $$PWD/../leveldb/out-static
    INCLUDEPATH += $$PWD/../leveldb/include
    DEPENDPATH += $$PWD/../leveldb/include
    INCLUDEPATH += $$PWD/../leveldb/helpers
    DEPENDPATH += $$PWD/../leveldb/helpers

    PRE_TARGETDEPS += $$PWD/../leveldb/out-static/libleveldb.a \
    $$PWD/../leveldb/out-static/libmemenv.a

HEADERS +=              $$PWD/qt/macdockiconhandler.h \
                        $$PWD/qt/macnotificationhandler.h \

OBJECTIVE_SOURCES +=    $$PWD/qt/macdockiconhandler.mm \
                        $$PWD/qt/macnotificationhandler.mm \

DEFINES += FORTIFY_SOURCE=1

QMAKE_LFLAGS += -fstack-protector
QMAKE_CXXFLAGS += -pthread -fPIC -fstack-protector -O2 -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wno-ignored-qualifiers -Woverloaded-virtual -Wformat -Wformat-security -Wno-unused-parameter

DEFINES += MAC_OSX
DEFINES += HAVE_BUILD_INFO
# Mac: compile for maximum compatibility (10.0 Yosemite, 32-bit)
QMAKE_CXXFLAGS += -std=c++17 -mmacosx-version-min=10.10 -isysroot

    # https://www.reddit.com/r/cpp/comments/334s4r/how_to_enable_c14_in_qt_creator_on_a_mac/
    # TODO might be obsolete with C++17: Turns out, there's a glitch in the Mac version where the standard library isn't correctly included when using the C++14 config flag. Adding this additional line to the .pro file fixes the problem:
    QMAKE_CXXFLAGS += -stdlib=libc++

    #add in core foundation framework
    QMAKE_LFLAGS += -F /System/Library/Frameworks/CoreFoundation.framework/
    LIBS += -framework CoreFoundation

    QMAKE_LFLAGS += -F /System/Library/Frameworks/AppKit.framework/
    LIBS += -framework AppKit

    QMAKE_LFLAGS += -F /System/Library/Frameworks/ApplicationServices.framework/
    LIBS += -framework ApplicationServices

    #brew install boost
    _BOOST_PATH = /usr/local/Cellar/boost/1.68.0_1
    INCLUDEPATH += "$${_BOOST_PATH}/include/"
    LIBS += -L$${_BOOST_PATH}/lib
    LIBS += -lboost_system-mt -lboost_chrono-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_unit_test_framework-mt -lboost_timer-mt # using dynamic lib (not sure if you need that "-mt" at the end or not)
    DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES BOOST_SPIRIT_THREADSAFE BOOST_THREAD_USE_LIB BOOST_THREAD_POSIX BOOST_HAS_THREADS
    #LIBS += $${_BOOST_PATH}/lib/libboost_chrono-mt.a # using static lib

    #brew install openssl@1.1
    # $OPENSSL_PATH is set via environment
#    _OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.1
#    OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.0h
    # See http://doc.qt.io/archives/qt-4.8/qmake-advanced-usage.html#variables
    INCLUDEPATH += "${OPENSSL_PATH}/include/"
    LIBS += -L${OPENSSL_PATH}/lib
    LIBS += -lssl -lcrypto # using dynamic lib (not sure if you need that "-mt" at the end or not)

    #libevent-2.1.6.dylib
    #brew install libevent
    _LIBEVENT_PATH = /usr/local/Cellar/libevent/2.1.8
    INCLUDEPATH += "$${_LIBEVENT_PATH}/include/"
    LIBS += -L$${_LIBEVENT_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -levent_extra -levent -levent_core -levent_openssl -levent_pthreads

# 1. Before using autotools & make, make sure to set the macOS target platform in the shell:
# export MACOSX_DEPLOYMENT_TARGET=10.10

# 2. Install all libraries with homebrew:
# brew install autoconf automake libtool pkg-config openssl@1.1 libevent boost gcc wget

# (2a optional) Fix for xCode to stop complaining about not finding the string.h file
# https://stackoverflow.com/questions/48839127/qmake-derived-clang-in-osx-10-13-cannot-find-string-h
# INCLUDEPATH += /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include

ICON = $$PWD/qt/res/assets/icons/spectre.icns

    # to build tor with autotools, call in subfolder tor:
    # ./autogen.sh && ./configure --with-ssl-dir=/usr/local/Cellar/openssl@1.1/1.1.1 --disable-asciidoc --disable-lzma
#    LIBS += -L$$PWD/../tor/src/or -ltor \
#    -L$$PWD/../tor/src/common -lor \
#    -L$$PWD/../tor/src/common -lor-ctime \
#    -L$$PWD/../tor/src/common -lor-crypto \
#    -L$$PWD/../tor/src/common -lor-event \
#    -L$$PWD/../tor/src/trunnel -lor-trunnel \
#    -L$$PWD/../tor/src/common -lcurve25519_donna \
#    -L$$PWD/../tor/src/ext/ed25519/donna -led25519_donna \
#    -L$$PWD/../tor/src/ext/ed25519/ref10 -led25519_ref10 \
#    -L$$PWD/../tor/src/ext/keccak-tiny -lkeccak-tiny \

#    INCLUDEPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny
#    DEPENDPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny

#    PRE_TARGETDEPS += $$PWD/../tor/src/or/libtor.a \
#    $$PWD/../tor/src/common/libor.a \
#    $$PWD/../tor/src/common/libor-ctime.a \
#    $$PWD/../tor/src/common/libor-crypto.a \
#    $$PWD/../tor/src/common/libor-event.a \
#    $$PWD/../tor/src/trunnel/libor-trunnel.a \
#    $$PWD/../tor/src/common/libcurve25519_donna.a \
#    $$PWD/../tor/src/ext/ed25519/donna/libed25519_donna.a \
#    $$PWD/../tor/src/ext/ed25519/ref10/libed25519_ref10.a \
#    $$PWD/../tor/src/ext/keccak-tiny/libkeccak-tiny.a \

    # brew install zlib
    _ZLIB_PATH = /usr/local/opt/zlib
    INCLUDEPATH += "$${_ZLIB_PATH}/include/"
    LIBS += -L$${_ZLIB_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -lz

    # to build BerkeleyDB with autotools, call in subfolder db4.8:
    # ./configure --enable-cxx --disable-shared --disable-replication --with-pic && make
    _BERKELEY_PATH = $$PWD/../db4.8/build_unix
    LIBS += $${_BERKELEY_PATH}/libdb_cxx.a \ # link static
    $${_BERKELEY_PATH}/libdb.a

    DEPENDPATH += $${_BERKELEY_PATH}
    INCLUDEPATH += $${_BERKELEY_PATH}

    # to build leveldb call in subfolder leveldb:
    # ./build_detect_platform build_config.mk ./ && make
    LIBS += -L$$PWD/../leveldb/out-static -lleveldb \
    -L$$PWD/../leveldb/out-static -lmemenv

    INCLUDEPATH += $$PWD/../leveldb/out-static
    DEPENDPATH += $$PWD/../leveldb/out-static
    INCLUDEPATH += $$PWD/../leveldb/include
    DEPENDPATH += $$PWD/../leveldb/include
    INCLUDEPATH += $$PWD/../leveldb/helpers
    DEPENDPATH += $$PWD/../leveldb/helpers

    PRE_TARGETDEPS += $$PWD/../leveldb/out-static/libleveldb.a \
    $$PWD/../leveldb/out-static/libmemenv.a

HEADERS +=              $$PWD/qt/macdockiconhandler.h \
                        $$PWD/qt/macnotificationhandler.h \

OBJECTIVE_SOURCES +=    $$PWD/qt/macdockiconhandler.mm \
                        $$PWD/qt/macnotificationhandler.mm \

DEFINES += FORTIFY_SOURCE=1

QMAKE_LFLAGS += -fstack-protector
QMAKE_CXXFLAGS += -pthread -fPIC -fstack-protector -O2 -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wno-ignored-qualifiers -Woverloaded-virtual -Wformat -Wformat-security -Wno-unused-parameter

DEFINES += MAC_OSX
DEFINES += HAVE_BUILD_INFO
# Mac: compile for maximum compatibility (10.0 Yosemite, 32-bit)
QMAKE_CXXFLAGS += -std=c++17 -mmacosx-version-min=10.10 -isysroot

    # https://www.reddit.com/r/cpp/comments/334s4r/how_to_enable_c14_in_qt_creator_on_a_mac/
    # TODO might be obsolete with C++17: Turns out, there's a glitch in the Mac version where the standard library isn't correctly included when using the C++14 config flag. Adding this additional line to the .pro file fixes the problem:
    QMAKE_CXXFLAGS += -stdlib=libc++

    #add in core foundation framework
    QMAKE_LFLAGS += -F /System/Library/Frameworks/CoreFoundation.framework/
    LIBS += -framework CoreFoundation

    QMAKE_LFLAGS += -F /System/Library/Frameworks/AppKit.framework/
    LIBS += -framework AppKit

    QMAKE_LFLAGS += -F /System/Library/Frameworks/ApplicationServices.framework/
    LIBS += -framework ApplicationServices

    #brew install boost
    _BOOST_PATH = /usr/local/Cellar/boost/1.67.0_1
    INCLUDEPATH += "$${_BOOST_PATH}/include/"
    LIBS += -L$${_BOOST_PATH}/lib
    LIBS += -lboost_system-mt -lboost_chrono-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_unit_test_framework-mt -lboost_timer-mt # using dynamic lib (not sure if you need that "-mt" at the end or not)
    DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES BOOST_SPIRIT_THREADSAFE BOOST_THREAD_USE_LIB BOOST_THREAD_POSIX BOOST_HAS_THREADS
    #LIBS += $${_BOOST_PATH}/lib/libboost_chrono-mt.a # using static lib

    #brew install openssl@1.1
    # $OPENSSL_PATH is set via environment
#    _OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.1
#    OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.0h
    # See http://doc.qt.io/archives/qt-4.8/qmake-advanced-usage.html#variables
    INCLUDEPATH += "${OPENSSL_PATH}/include/"
    LIBS += -L${OPENSSL_PATH}/lib
    LIBS += -lssl -lcrypto # using dynamic lib (not sure if you need that "-mt" at the end or not)

    #libevent-2.1.6.dylib
    #brew install libevent
    _LIBEVENT_PATH = /usr/local/Cellar/libevent/2.1.8
    INCLUDEPATH += "$${_LIBEVENT_PATH}/include/"
    LIBS += -L$${_LIBEVENT_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -levent_extra -levent -levent_core -levent_openssl -levent_pthreads


install qhttpheader

install qhttpheader

INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD

SOURCES += qxtabstracthttpconnector.cpp
SOURCES += qxtabstractwebservice.cpp
SOURCES += qxtabstractwebsessionmanager.cpp
SOURCES += qxthtmltemplate.cpp
SOURCES += qxthttpserverconnector.cpp
SOURCES += qxthttpsessionmanager.cpp
SOURCES += qxtscgiserverconnector.cpp
SOURCES += qxtwebcgiservice.cpp
SOURCES += qxtwebcontent.cpp
SOURCES += qxtwebevent.cpp
SOURCES += qxtwebjsonrpcservice.cpp
SOURCES += qxtwebservicedirectory.cpp
SOURCES += qxtwebslotservice.cpp
#SOURCES += qxtwebtemplate.cpp

HEADERS += qxtabstracthttpconnector.h
HEADERS += qxtabstractwebservice.h
HEADERS += qxtabstractwebsessionmanager.h
HEADERS += qxtabstractwebsessionmanager_p.h
HEADERS += qxthtmltemplate.h
HEADERS += qxthttpsessionmanager.h
HEADERS += qxtwebcgiservice.h
HEADERS += qxtwebcgiservice_p.h
HEADERS += qxtwebcontent.h
HEADERS += qxtwebevent.h
HEADERS += qxtweb.h
HEADERS += qxtwebjsonrpcservice.h
HEADERS += qxtwebjsonrpcservice_p.h
HEADERS += qxtwebservicedirectory.h
HEADERS += qxtwebservicedirectory_p.h
HEADERS += qxtwebslotservice.h
HEADERS += qhttpheader.h
#HEADERS += qxtwebtemplate.h
#HEADERS += qxtwebtemplate_p.h

INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD

SOURCES += qxtabstracthttpconnector.cpp
SOURCES += qxtabstractwebservice.cpp
SOURCES += qxtabstractwebsessionmanager.cpp
SOURCES += qxthtmltemplate.cpp
SOURCES += qxthttpserverconnector.cpp
SOURCES += qxthttpsessionmanager.cpp
SOURCES += qxtscgiserverconnector.cpp
SOURCES += qxtwebcgiservice.cpp
SOURCES += qxtwebcontent.cpp
SOURCES += qxtwebevent.cpp
SOURCES += qxtwebjsonrpcservice.cpp
SOURCES += qxtwebservicedirectory.cpp
SOURCES += qxtwebslotservice.cpp
#SOURCES += qxtwebtemplate.cpp

HEADERS += qxtabstracthttpconnector.h
HEADERS += qxtabstractwebservice.h
HEADERS += qxtabstractwebsessionmanager.h
HEADERS += qxtabstractwebsessionmanager_p.h
HEADERS += qxthtmltemplate.h
HEADERS += qxthttpsessionmanager.h
HEADERS += qxtwebcgiservice.h
HEADERS += qxtwebcgiservice_p.h
HEADERS += qxtwebcontent.h
HEADERS += qxtwebevent.h
HEADERS += qxtweb.h
HEADERS += qxtwebjsonrpcservice.h
HEADERS += qxtwebjsonrpcservice_p.h
HEADERS += qxtwebservicedirectory.h
HEADERS += qxtwebservicedirectory_p.h
HEADERS += qxtwebslotservice.h
#HEADERS += qxtwebtemplate.h
#HEADERS += qxtwebtemplate_p.h


Generate PDB files in debug builds on win32

TEMPLATE = lib
!win32:VERSION = 0.6
DESTDIR = $${QXT_BUILD_TREE}/lib
win32:DLLDESTDIR = $${QXT_BUILD_TREE}/bin
target.path = $${QXT_INSTALL_LIBS}
win32:dlltarget.path = $${QXT_INSTALL_BINS}
headers.path = $${QXT_INSTALL_HEADERS}/$${CLEAN_TARGET}
contains(CONVENIENCE, $${CLEAN_TARGET}){
    for(header,HEADERS){
        headers.files += $$header
    }
    headers.files += $${QXT_SOURCE_TREE}/include/$${CLEAN_TARGET}/*
}
INSTALLS += target headers
win32:INSTALLS += dlltarget

defineReplace(qxtLibraryTarget) {
   unset(LIBRARY_NAME)
   LIBRARY_NAME = $$1
   mac:!static:contains(QT_CONFIG, qt_framework) {
      QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
      export(QMAKE_FRAMEWORK_BUNDLE_NAME)
   }
   contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) {
      !debug_and_release|build_pass {
          mac:RET = $$member(LIBRARY_NAME, 0)
          else:win32:RET = $$member(LIBRARY_NAME, 0)d
      }
   }
   isEmpty(RET):RET = $$LIBRARY_NAME
   return($$RET)
}

TARGET = $$qxtLibraryTarget($$CLEAN_TARGET)

include(qxtlibs.pri)

macx {
    CONFIG += absolute_library_soname
    CONFIG(qt_framework, qt_framework|qt_no_framework): CONFIG += lib_bundle
    FRAMEWORK_HEADERS.version = Versions
    FRAMEWORK_HEADERS.files   = $${HEADERS}
    FRAMEWORK_HEADERS.path    = Headers
    QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
    QMAKE_LFLAGS += -F$${QXT_BUILD_TREE}/lib
}
win32:QMAKE_LFLAGS_DEBUG += /PDB:$$DESTDIR/$${TARGET}.pdb

astyle.params += --pad=oper
astyle.params += --unpad=paren
astyle.params += --convert-tabs
astyle.params += --brackets=break
astyle.params += --indent-namespaces
astyle.commands = astyle $$astyle.params $$HEADERS $$SOURCES
QMAKE_EXTRA_TARGETS += astyle

# cannot use .moc/.obj with gcov ("cannot open graph file")
!symbian:!contains(CONFIG, coverage) {
    CONFIG(debug, debug|release) {
        MOC_DIR          = debug/.moc
        OBJECTS_DIR      = debug/.obj
        RCC_DIR          = debug/.rcc
    } else {
        MOC_DIR          = release/.moc
        OBJECTS_DIR      = release/.obj
        RCC_DIR          = release/.rcc
    }
}
QMAKE_CLEAN += *.gcda *.gcno

contains(CONFIG, coverage) {
    QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
    QMAKE_LIBS += -lgcov

    zerocounters.commands = @lcov --directory \$(OBJECTS_DIR) --zerocounters
    QMAKE_EXTRA_UNIX_TARGETS *= zerocounters

    capture.commands = @mkdir -p ../../coverage
    capture.commands += && lcov --directory \$(OBJECTS_DIR) --capture --output-file ../../coverage/\$(QMAKE_TARGET).cov
    capture.filters = \"/usr/*\" \"moc_*.cpp\" \"qrc_*.cpp\"
    capture.commands += && lcov --remove ../../coverage/\$(QMAKE_TARGET).cov $$capture.filters --output-file ../../coverage/\$(QMAKE_TARGET).cov
    QMAKE_EXTRA_UNIX_TARGETS *= capture

    genhtml.commands = @genhtml --output-directory ../../coverage/\$(QMAKE_TARGET) ../../coverage/\$(QMAKE_TARGET).cov
    genhtml.commands += && xdg-open ../../coverage/\$(QMAKE_TARGET)/index.html
    QMAKE_EXTRA_UNIX_TARGETS *= genhtml
}

TEMPLATE = lib
!win32:VERSION = 0.6
DESTDIR = $${QXT_BUILD_TREE}/lib
win32:DLLDESTDIR = $${QXT_BUILD_TREE}/bin

target.path = $${QXT_INSTALL_LIBS}
win32:dlltarget.path = $${QXT_INSTALL_BINS}
headers.path = $${QXT_INSTALL_HEADERS}/$${CLEAN_TARGET}
contains(CONVENIENCE, $${CLEAN_TARGET}){
    for(header,HEADERS){
        headers.files += $$header
    }
    headers.files += $${QXT_SOURCE_TREE}/include/$${CLEAN_TARGET}/*
}
INSTALLS += target headers
win32:INSTALLS += dlltarget

defineReplace(qxtLibraryTarget) {
   unset(LIBRARY_NAME)
   LIBRARY_NAME = $$1
   mac:!static:contains(QT_CONFIG, qt_framework) {
      QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
      export(QMAKE_FRAMEWORK_BUNDLE_NAME)
   }
   contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) {
      !debug_and_release|build_pass {
          mac:RET = $$member(LIBRARY_NAME, 0)
          else:win32:RET = $$member(LIBRARY_NAME, 0)d
      }
   }
   isEmpty(RET):RET = $$LIBRARY_NAME
   return($$RET)
}

TARGET = $$qxtLibraryTarget($$CLEAN_TARGET)

include(qxtlibs.pri)

macx {
    CONFIG += absolute_library_soname
    CONFIG(qt_framework, qt_framework|qt_no_framework): CONFIG += lib_bundle
    FRAMEWORK_HEADERS.version = Versions
    FRAMEWORK_HEADERS.files   = $${HEADERS}
    FRAMEWORK_HEADERS.path    = Headers
    QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
    QMAKE_LFLAGS += -F$${QXT_BUILD_TREE}/lib
}

astyle.params += --pad=oper
astyle.params += --unpad=paren
astyle.params += --convert-tabs
astyle.params += --brackets=break
astyle.params += --indent-namespaces
astyle.commands = astyle $$astyle.params $$HEADERS $$SOURCES
QMAKE_EXTRA_TARGETS += astyle

# cannot use .moc/.obj with gcov ("cannot open graph file")
!symbian:!contains(CONFIG, coverage) {
    CONFIG(debug, debug|release) {
        MOC_DIR          = debug/.moc
        OBJECTS_DIR      = debug/.obj
        RCC_DIR          = debug/.rcc
    } else {
        MOC_DIR          = release/.moc
        OBJECTS_DIR      = release/.obj
        RCC_DIR          = release/.rcc
    }
}
QMAKE_CLEAN += *.gcda *.gcno

contains(CONFIG, coverage) {
    QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
    QMAKE_LIBS += -lgcov

    zerocounters.commands = @lcov --directory \$(OBJECTS_DIR) --zerocounters
    QMAKE_EXTRA_UNIX_TARGETS *= zerocounters

    capture.commands = @mkdir -p ../../coverage
    capture.commands += && lcov --directory \$(OBJECTS_DIR) --capture --output-file ../../coverage/\$(QMAKE_TARGET).cov
    capture.filters = \"/usr/*\" \"moc_*.cpp\" \"qrc_*.cpp\"
    capture.commands += && lcov --remove ../../coverage/\$(QMAKE_TARGET).cov $$capture.filters --output-file ../../coverage/\$(QMAKE_TARGET).cov
    QMAKE_EXTRA_UNIX_TARGETS *= capture

    genhtml.commands = @genhtml --output-directory ../../coverage/\$(QMAKE_TARGET) ../../coverage/\$(QMAKE_TARGET).cov
    genhtml.commands += && xdg-open ../../coverage/\$(QMAKE_TARGET)/index.html
    QMAKE_EXTRA_UNIX_TARGETS *= genhtml
}


Remove reference to pulseaudio flags from Qt configure step.

Reviewed-by: Dmytro Poplavskiy

INCLUDEPATH += effects \
               ./

unix:!mac:!symbian {
   contains(QT_CONFIG, pulseaudio) {
        CONFIG += link_pkgconfig
        PKGCONFIG += libpulse

        DEFINES += QT_MULTIMEDIA_PULSEAUDIO
        PRIVATE_HEADERS += effects/qsoundeffect_pulse_p.h
        SOURCES += effects/qsoundeffect_pulse_p.cpp
    } else {
        DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
        PRIVATE_HEADERS += effects/qsoundeffect_qmedia_p.h
        SOURCES += effects/qsoundeffect_qmedia_p.cpp
    }
} else {
    PRIVATE_HEADERS += effects/qsoundeffect_qsound_p.h
    SOURCES += effects/qsoundeffect_qsound_p.cpp
}

PRIVATE_HEADERS += effects/wavedecoder_p.h
PUBLIC_HEADERS += effects/qsoundeffect.h

SOURCES += \
    effects/qsoundeffect.cpp \
    effects/wavedecoder_p.cpp

INCLUDEPATH += effects \
               ./

unix:!mac:!symbian {
   contains(QT_CONFIG, pulseaudio) {
        CONFIG += link_pkgconfig
        PKGCONFIG += libpulse

        DEFINES += QT_MULTIMEDIA_PULSEAUDIO
        PRIVATE_HEADERS += effects/qsoundeffect_pulse_p.h
        SOURCES += effects/qsoundeffect_pulse_p.cpp
        QMAKE_CXXFLAGS += $$QT_CFLAGS_PULSEAUDIO
        LIBS += $$QT_LIBS_PULSEAUDIO
    } else {
        DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
        PRIVATE_HEADERS += effects/qsoundeffect_qmedia_p.h
        SOURCES += effects/qsoundeffect_qmedia_p.cpp
    }
} else {
    PRIVATE_HEADERS += effects/qsoundeffect_qsound_p.h
    SOURCES += effects/qsoundeffect_qsound_p.cpp
}

PRIVATE_HEADERS += effects/wavedecoder_p.h
PUBLIC_HEADERS += effects/qsoundeffect.h

SOURCES += \
    effects/qsoundeffect.cpp \
    effects/wavedecoder_p.cpp


Link against glib if necessary.

Link against glib if necessary.

Change-Id: Ie0f87c24d15a6784cc9ed1201d3578ffbf94d191
Done-with: Carsten Munk <4e44faebcaca4d7f6873872134e9be9c64d67d71@jollamobile.com>
Reviewed-by: Andrew Knight <ccebd4d9fbda4a2105d17b207d80666fa00da2e1@digia.com>

QT += core-private gui-private platformsupport-private
CONFIG += link_pkgconfig qpa/genericunixfontdatabase

!equals(QT_WAYLAND_GL_CONFIG, nogl) {
    DEFINES += QT_WAYLAND_GL_SUPPORT
}

config_xkbcommon {
    !contains(QT_CONFIG, no-pkg-config) {
        PKGCONFIG += xkbcommon
    } else {
        LIBS += -lxkbcommon
    }
} else {
    DEFINES += QT_NO_WAYLAND_XKB
}

!contains(QT_CONFIG, no-pkg-config) {
    PKGCONFIG += wayland-client wayland-cursor
    contains(QT_CONFIG, glib): PKGCONFIG_PRIVATE += glib-2.0
} else {
    LIBS += -lwayland-client -lwayland-cursor $$QT_LIBS_GLIB
}

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

CONFIG += wayland-scanner
WAYLANDCLIENTSOURCES += ../../../3rdparty/protocol/wayland.xml

QT += core-private gui-private platformsupport-private
CONFIG += link_pkgconfig qpa/genericunixfontdatabase

!equals(QT_WAYLAND_GL_CONFIG, nogl) {
    DEFINES += QT_WAYLAND_GL_SUPPORT
}

config_xkbcommon {
    !contains(QT_CONFIG, no-pkg-config) {
        PKGCONFIG += xkbcommon
    } else {
        LIBS += -lxkbcommon
    }
} else {
    DEFINES += QT_NO_WAYLAND_XKB
}

!contains(QT_CONFIG, no-pkg-config) {
    PKGCONFIG += wayland-client wayland-cursor
} else {
    LIBS += -lwayland-client -lwayland-cursor
}

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

CONFIG += wayland-scanner
WAYLANDCLIENTSOURCES += ../../../3rdparty/protocol/wayland.xml


ensure "make check" works for out of source builds

include(../qdjango.pri)

QT -= gui
QT += testlib
CONFIG -= app_bundle
CONFIG += testcase

QMAKE_RPATHDIR += $$OUT_PWD/../../../src/db $$OUT_PWD/../../../src/http $$OUT_PWD/../../../src/script
INCLUDEPATH += $$PWD $$QDJANGO_INCLUDEPATH

include(../qdjango.pri)

QT -= gui
QT += testlib
CONFIG -= app_bundle
CONFIG += testcase

QMAKE_RPATHDIR += ../../../src/db ../../../src/http ../../../src/script
INCLUDEPATH += $$PWD $$QDJANGO_INCLUDEPATH


symbian now compiles

symbian now compiles

QT *= network

INCLUDEPATH	 += $$PWD $$PWD/cpp

HEADERS  += $$PWD/mosquitto.h           \
            $$PWD/logging_mosq.h        \
            $$PWD/memory_mosq.h         \
            $$PWD/messages_mosq.h       \
            $$PWD/net_mosq.h            \
            $$PWD/read_handle.h         \
            $$PWD/send_mosq.h           \
            $$PWD/time_mosq.h           \
            $$PWD/tls_mosq.h            \
            $$PWD/util_mosq.h           \
            $$PWD/will_mosq.h           \
            $$PWD/mosquitto_internal.h  \
            $$PWD/mqtt3_protocol.h      \
            $$PWD/mq_config.h

SOURCES  += $$PWD/mosquitto.c           \
            $$PWD/logging_mosq.c        \
            $$PWD/memory_mosq.c         \
            $$PWD/messages_mosq.c       \
            $$PWD/net_mosq.c            \
            $$PWD/read_handle.c         \
            $$PWD/read_handle_client.c  \
            $$PWD/read_handle_shared.c  \
            $$PWD/send_mosq.c           \
            $$PWD/send_client_mosq.c    \
            $$PWD/thread_mosq.c         \
            $$PWD/time_mosq.c           \
            $$PWD/tls_mosq.c            \
            $$PWD/util_mosq.c           \
            $$PWD/will_mosq.c

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

win32 {
    LIBS *= -lssleay32 -lWs2_32
} else {
!symbian {
    # Win32 and symbian don't have pthreads, everyone else does.
    DEFINES *= WITH_THREADING
}
}

DEFINES *= WITH_TLS WITH_TLS_PSK WITH_STATIC_MOSQ
# These aren't strictly required. They're here for completeness
DEFINES *= WITH_BRIDGE WITH_PERSISTENCE WITH_MEMORY_TRACKING WITH_SYS_TREE

blackberry {
    DEFINES *= NO_PSELECT
}

win32 {
    LIBS *= -llibeay32
}

QT *= network

INCLUDEPATH	 += $$PWD $$PWD/cpp

HEADERS  += $$PWD/mosquitto.h           \
            $$PWD/logging_mosq.h        \
            $$PWD/memory_mosq.h         \
            $$PWD/messages_mosq.h       \
            $$PWD/net_mosq.h            \
            $$PWD/read_handle.h         \
            $$PWD/send_mosq.h           \
            $$PWD/time_mosq.h           \
            $$PWD/tls_mosq.h            \
            $$PWD/util_mosq.h           \
            $$PWD/will_mosq.h           \
            $$PWD/mosquitto_internal.h  \
            $$PWD/mqtt3_protocol.h      \
            $$PWD/mq_config.h

SOURCES  += $$PWD/mosquitto.c           \
            $$PWD/logging_mosq.c        \
            $$PWD/memory_mosq.c         \
            $$PWD/messages_mosq.c       \
            $$PWD/net_mosq.c            \
            $$PWD/read_handle.c         \
            $$PWD/read_handle_client.c  \
            $$PWD/read_handle_shared.c  \
            $$PWD/send_mosq.c           \
            $$PWD/send_client_mosq.c    \
            $$PWD/thread_mosq.c         \
            $$PWD/time_mosq.c           \
            $$PWD/tls_mosq.c            \
            $$PWD/util_mosq.c           \
            $$PWD/will_mosq.c

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

win32 {
    LIBS *= -lssleay32 -lWs2_32
} else {
    # Win32 doesn't have pthreads, everyone else does.
    DEFINES *= WITH_THREADING
}

DEFINES *= WITH_TLS WITH_TLS_PSK WITH_STATIC_MOSQ
# These aren't strictly required. They're here for completeness
DEFINES *= WITH_BRIDGE WITH_PERSISTENCE WITH_MEMORY_TRACKING WITH_SYS_TREE

blackberry {
    DEFINES *= NO_PSELECT
}

win32 {
    LIBS *= -llibeay32
}