fixed project file

fixed project file

QT += widgets

INCLUDEPATH += \
	$$PWD/include/ \
	$$PWD/../../../../ \
	$$PWD/../../../../qrgui \
	$$PWD/../../interpreters/interpreterBase/include \

LIBS += -L../../../../bin -lqrkernel -lqrutils -lqrrepo -linterpreterBase

DEFINES += ROBOTS_GENERATOR_LIBRARY

TRANSLATIONS = generatorBase_ru.ts

RESOURCES = generatorBase.qrc

HEADERS += \
	$$PWD/include/generatorBase/robotsGeneratorDeclSpec.h \
	$$PWD/include/generatorBase/generatorKitPluginInterface.h \
	$$PWD/include/generatorBase/robotsGeneratorPluginBase.h \
	$$PWD/include/generatorBase/masterGeneratorBase.h \
	$$PWD/include/generatorBase/generatorCustomizer.h \
	$$PWD/include/generatorBase/controlFlowGeneratorBase.h \
	$$PWD/include/generatorBase/generatorFactoryBase.h \
	$$PWD/include/generatorBase/templateParametrizedEntity.h \
	$$PWD/include/generatorBase/robotsDiagramVisitor.h \
	$$PWD/include/generatorBase/primaryControlFlowValidator.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree.h \
	$$PWD/include/generatorBase/semanticTree/semanticNode.h \
	$$PWD/include/generatorBase/semanticTree/nonZoneNode.h \
	$$PWD/include/generatorBase/semanticTree/zoneNode.h \
	$$PWD/include/generatorBase/semanticTree/simpleNode.h \
	$$PWD/include/generatorBase/semanticTree/finalNode.h \
	$$PWD/include/generatorBase/semanticTree/conditionalNode.h \
	$$PWD/include/generatorBase/semanticTree/ifNode.h \
	$$PWD/include/generatorBase/semanticTree/loopNode.h \
	$$PWD/include/generatorBase/semanticTree/rootNode.h \
	$$PWD/include/generatorBase/parts/variables.h \
	$$PWD/include/generatorBase/parts/subprograms.h \
	$$PWD/include/generatorBase/parts/engines.h \
	$$PWD/include/generatorBase/parts/initTerminateCodeGenerator.h \
	$$PWD/include/generatorBase/parts/sensors.h \
	$$PWD/include/generatorBase/parts/functions.h \
	$$PWD/include/generatorBase/parts/images.h \

HEADERS += \
	$$PWD/src/readableControlFlowGenerator.h \
	$$PWD/src/gotoControlFlowGenerator.h \
	$$PWD/src/rules/semanticTransformationRule.h \
	$$PWD/src/rules/simpleRules/simpleBlockRuleBase.h \
	$$PWD/src/rules/simpleRules/simpleUnvisitedRule.h \
	$$PWD/src/rules/simpleRules/simpleVisitedOneZoneRule.h \
	$$PWD/src/rules/simpleRules/simpleVisitedRuleBase.h \
	$$PWD/src/rules/simpleRules/simpleMergedIfBranchesRule.h \
	$$PWD/src/rules/simpleRules/simpleIfInsideCycleRule.h \
	$$PWD/src/rules/ifRules/ifBlockRuleBase.h \
	$$PWD/src/rules/ifRules/ifWithBothUnvisitedRule.h \
	$$PWD/src/rules/ifRules/ifWithOneVisitedRule.h \
	$$PWD/src/rules/loopRules/loopBlockRuleBase.h \
	$$PWD/src/rules/loopRules/loopWithBothUnvisitedRule.h \
	$$PWD/src/rules/loopRules/loopWithIterationVisitedRule.h \
	$$PWD/src/rules/loopRules/loopWithNextVisitedRule.h \

SOURCES += \
	$$PWD/src/robotsGeneratorPluginBase.cpp \
	$$PWD/src/masterGeneratorBase.cpp \
	$$PWD/src/generatorCustomizer.cpp \
	$$PWD/src/controlFlowGeneratorBase.cpp \
	$$PWD/src/readableControlFlowGenerator.cpp \
	$$PWD/src/gotoControlFlowGenerator.cpp \
	$$PWD/src/robotsDiagramVisitor.cpp \
	$$PWD/src/primaryControlFlowValidator.cpp \
	$$PWD/src/generatorFactoryBase.cpp \
	$$PWD/src/templateParametrizedEntity.cpp \
	$$PWD/src/parts/variables.cpp \
	$$PWD/src/parts/subprograms.cpp \
	$$PWD/src/parts/engines.cpp \
	$$PWD/src/parts/initTerminateCodeGenerator.cpp \
	$$PWD/src/parts/sensors.cpp \
	$$PWD/src/parts/functions.cpp \
	$$PWD/src/parts/images.cpp \
	$$PWD/src/semanticTree/semanticTree.cpp \
	$$PWD/src/semanticTree/semanticNode.cpp \
	$$PWD/src/semanticTree/nonZoneNode.cpp \
	$$PWD/src/semanticTree/zoneNode.cpp \
	$$PWD/src/semanticTree/simpleNode.cpp \
	$$PWD/src/semanticTree/finalNode.cpp \
	$$PWD/src/semanticTree/conditionalNode.cpp \
	$$PWD/src/semanticTree/ifNode.cpp \
	$$PWD/src/semanticTree/loopNode.cpp \
	$$PWD/src/semanticTree/rootNode.cpp \
	$$PWD/src/rules/semanticTransformationRule.cpp \
	$$PWD/src/rules/simpleRules/simpleBlockRuleBase.cpp \
	$$PWD/src/rules/simpleRules/simpleUnvisitedRule.cpp \
	$$PWD/src/rules/simpleRules/simpleVisitedOneZoneRule.cpp \
	$$PWD/src/rules/simpleRules/simpleVisitedRuleBase.cpp \
	$$PWD/src/rules/simpleRules/simpleMergedIfBranchesRule.cpp \
	$$PWD/src/rules/simpleRules/simpleIfInsideCycleRule.cpp \
	$$PWD/src/rules/ifRules/ifBlockRuleBase.cpp \
	$$PWD/src/rules/ifRules/ifWithBothUnvisitedRule.cpp \
	$$PWD/src/rules/ifRules/ifWithOneVisitedRule.cpp \
	$$PWD/src/rules/loopRules/loopBlockRuleBase.cpp \
	$$PWD/src/rules/loopRules/loopWithBothUnvisitedRule.cpp \
	$$PWD/src/rules/loopRules/loopWithIterationVisitedRule.cpp \
	$$PWD/src/rules/loopRules/loopWithNextVisitedRule.cpp \

# Simple element generators & converters

HEADERS += \
	$$PWD/include/generatorBase/converters/templateParametrizedConverter.h \
	$$PWD/include/generatorBase/converters/templateParametrizedMultiConverter.h \
	$$PWD/include/generatorBase/converters/stringPropertyConverter.h \
	$$PWD/include/generatorBase/simpleGenerators/abstractSimpleGenerator.h \
	$$PWD/include/generatorBase/simpleGenerators/binding.h \
	$$PWD/include/generatorBase/simpleGenerators/bindingGenerator.h \

HEADERS += \
	$$PWD/src/converters/enumConverterBase.h \
	$$PWD/src/converters/codeConverterBase.h \
	$$PWD/src/converters/intPropertyConverter.h \
	$$PWD/src/converters/floatPropertyConverter.h \
	$$PWD/src/converters/boolPropertyConverter.h \
	$$PWD/src/converters/nameNormalizerConverter.h \
	$$PWD/src/converters/functionBlockConverter.h \
	$$PWD/src/converters/inequalitySignConverter.h \
	$$PWD/src/converters/colorConverter.h \
	$$PWD/src/converters/breakModeConverter.h \
	$$PWD/src/converters/outputPortConverter.h \
	$$PWD/src/converters/enginePortsConverter.h \
	$$PWD/src/converters/typeConverter.h \
	$$PWD/src/converters/inputPortConverter.h \
	$$PWD/src/converters/functionInvocationConverter.h \
	$$PWD/src/simpleGenerators/nullGenerator.h \
	$$PWD/src/simpleGenerators/commentElementGenerator.h \
	$$PWD/src/simpleGenerators/functionElementGenerator.h \
	$$PWD/src/simpleGenerators/ifElementGenerator.h \
	$$PWD/src/simpleGenerators/infiniteLoopGenerator.h \
	$$PWD/src/simpleGenerators/forLoopGenerator.h \
	$$PWD/src/simpleGenerators/whileLoopGenerator.h \
	$$PWD/src/simpleGenerators/enginesStopGenerator.h \
	$$PWD/src/simpleGenerators/timerGenerator.h \
	$$PWD/src/simpleGenerators/beepGenerator.h \
	$$PWD/src/simpleGenerators/playToneGenerator.h \
	$$PWD/src/simpleGenerators/finalNodeGenerator.h \
	$$PWD/src/simpleGenerators/nullificationEncoderGenerator.h \
	$$PWD/src/simpleGenerators/waitForColorBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForColorIntensityBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForLightBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForSonarBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForEncoderBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForTouchSensorBlockGenerator.h \
	$$PWD/src/simpleGenerators/initialNodeGenerator.h \
	$$PWD/src/simpleGenerators/enginesGenerator.h \
	$$PWD/src/simpleGenerators/waitForSoundBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForGyroscopeBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForAccelerometerBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawPixelBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForButtonsBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawLineBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawCircleBlockGenerator.h \
	$$PWD/src/simpleGenerators/printTextBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawRectBlockGenerator.h \
	$$PWD/src/simpleGenerators/clearScreenBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawBlockGenerator.h \
	$$PWD/src/simpleGenerators/subprogramsSimpleGenerator.h \
	$$PWD/src/simpleGenerators/breakGenerator.h \
	$$PWD/src/simpleGenerators/continueGenerator.h \
	$$PWD/src/simpleGenerators/labelGenerator.h \
	$$PWD/src/simpleGenerators/gotoSimpleGenerator.h \

SOURCES += \
	$$PWD/src/converters/templateParametrizedConverter.cpp \
	$$PWD/src/converters/templateParametrizedMultiConverter.cpp \
	$$PWD/src/converters/enumConverterBase.cpp \
	$$PWD/src/converters/codeConverterBase.cpp \
	$$PWD/src/converters/intPropertyConverter.cpp \
	$$PWD/src/converters/floatPropertyConverter.cpp \
	$$PWD/src/converters/boolPropertyConverter.cpp \
	$$PWD/src/converters/stringPropertyConverter.cpp \
	$$PWD/src/converters/nameNormalizerConverter.cpp \
	$$PWD/src/converters/functionBlockConverter.cpp \
	$$PWD/src/converters/inequalitySignConverter.cpp \
	$$PWD/src/converters/colorConverter.cpp \
	$$PWD/src/converters/breakModeConverter.cpp \
	$$PWD/src/converters/outputPortConverter.cpp \
	$$PWD/src/converters/enginePortsConverter.cpp \
	$$PWD/src/converters/typeConverter.cpp \
	$$PWD/src/converters/inputPortConverter.cpp \
	$$PWD/src/converters/functionInvocationConverter.cpp \
	$$PWD/src/simpleGenerators/abstractSimpleGenerator.cpp \
	$$PWD/src/simpleGenerators/nullGenerator.cpp \
	$$PWD/src/simpleGenerators/commentElementGenerator.cpp \
	$$PWD/src/simpleGenerators/functionElementGenerator.cpp \
	$$PWD/src/simpleGenerators/ifElementGenerator.cpp \
	$$PWD/src/simpleGenerators/infiniteLoopGenerator.cpp \
	$$PWD/src/simpleGenerators/forLoopGenerator.cpp \
	$$PWD/src/simpleGenerators/whileLoopGenerator.cpp \
	$$PWD/src/simpleGenerators/bindingGenerator.cpp \
	$$PWD/src/simpleGenerators/binding.cpp \
	$$PWD/src/simpleGenerators/enginesStopGenerator.cpp \
	$$PWD/src/simpleGenerators/timerGenerator.cpp \
	$$PWD/src/simpleGenerators/beepGenerator.cpp \
	$$PWD/src/simpleGenerators/playToneGenerator.cpp \
	$$PWD/src/simpleGenerators/finalNodeGenerator.cpp \
	$$PWD/src/simpleGenerators/nullificationEncoderGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForColorBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForColorIntensityBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForLightBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForSonarBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForEncoderBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForTouchSensorBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/initialNodeGenerator.cpp \
	$$PWD/src/simpleGenerators/enginesGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForSoundBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForGyroscopeBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForAccelerometerBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawPixelBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForButtonsBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawLineBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawCircleBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/printTextBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawRectBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/clearScreenBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/subprogramsSimpleGenerator.cpp \
	$$PWD/src/simpleGenerators/breakGenerator.cpp \
	$$PWD/src/simpleGenerators/continueGenerator.cpp \
	$$PWD/src/simpleGenerators/labelGenerator.cpp \
	$$PWD/src/simpleGenerators/gotoSimpleGenerator.cpp \

QT += widgets

INCLUDEPATH += \
	$$PWD/include/ \
	$$PWD/../../../../ \
	$$PWD/../../../../qrgui \
	$$PWD/../../interpreters/interpreterBase/include \

LIBS += -L../../../../bin -lqrkernel -lqrutils -lqrrepo -linterpreterBase

DEFINES += ROBOTS_GENERATOR_LIBRARY

TRANSLATIONS = generatorBase_ru.ts

RESOURCES = generatorBase.qrc

HEADERS += \
	$$PWD/include/generatorBase/robotsGeneratorDeclSpec.h \
	$$PWD/include/generatorBase/generatorKitPluginInterface.h \
	$$PWD/include/generatorBase/robotsGeneratorPluginBase.h \
	$$PWD/include/generatorBase/masterGeneratorBase.h \
	$$PWD/include/generatorBase/generatorCustomizer.h \
	$$PWD/include/generatorBase/controlFlowGeneratorBase.h \
	$$PWD/include/generatorBase/generatorFactoryBase.h \
	$$PWD/include/generatorBase/templateParametrizedEntity.h \
	$$PWD/include/generatorBase/robotsDiagramVisitor.h \
	$$PWD/include/generatorBase/primaryControlFlowValidator.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree/semanticNode.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree/nonZoneNode.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree/zoneNode.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree/simpleNode.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree/finalNode.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree/conditionalNode.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree/ifNode.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree/loopNode.h \
	$$PWD/include/generatorBase/semanticTree/semanticTree/rootNode.h \
	$$PWD/include/generatorBase/parts/variables.h \
	$$PWD/include/generatorBase/parts/subprograms.h \
	$$PWD/include/generatorBase/parts/engines.h \
	$$PWD/include/generatorBase/parts/initTerminateCodeGenerator.h \
	$$PWD/include/generatorBase/parts/sensors.h \
	$$PWD/include/generatorBase/parts/functions.h \
	$$PWD/include/generatorBase/parts/images.h \

HEADERS += \
	$$PWD/src/readableControlFlowGenerator.h \
	$$PWD/src/gotoControlFlowGenerator.h \
	$$PWD/src/rules/semanticTransformationRule.h \
	$$PWD/src/rules/simpleRules/simpleBlockRuleBase.h \
	$$PWD/src/rules/simpleRules/simpleUnvisitedRule.h \
	$$PWD/src/rules/simpleRules/simpleVisitedOneZoneRule.h \
	$$PWD/src/rules/simpleRules/simpleVisitedRuleBase.h \
	$$PWD/src/rules/simpleRules/simpleMergedIfBranchesRule.h \
	$$PWD/src/rules/simpleRules/simpleIfInsideCycleRule.h \
	$$PWD/src/rules/ifRules/ifBlockRuleBase.h \
	$$PWD/src/rules/ifRules/ifWithBothUnvisitedRule.h \
	$$PWD/src/rules/ifRules/ifWithOneVisitedRule.h \
	$$PWD/src/rules/loopRules/loopBlockRuleBase.h \
	$$PWD/src/rules/loopRules/loopWithBothUnvisitedRule.h \
	$$PWD/src/rules/loopRules/loopWithIterationVisitedRule.h \
	$$PWD/src/rules/loopRules/loopWithNextVisitedRule.h \

SOURCES += \
	$$PWD/src/robotsGeneratorPluginBase.cpp \
	$$PWD/src/masterGeneratorBase.cpp \
	$$PWD/src/generatorCustomizer.cpp \
	$$PWD/src/controlFlowGeneratorBase.cpp \
	$$PWD/src/readableControlFlowGenerator.cpp \
	$$PWD/src/gotoControlFlowGenerator.cpp \
	$$PWD/src/robotsDiagramVisitor.cpp \
	$$PWD/src/primaryControlFlowValidator.cpp \
	$$PWD/src/generatorFactoryBase.cpp \
	$$PWD/src/templateParametrizedEntity.cpp \
	$$PWD/src/parts/variables.cpp \
	$$PWD/src/parts/subprograms.cpp \
	$$PWD/src/parts/engines.cpp \
	$$PWD/src/parts/initTerminateCodeGenerator.cpp \
	$$PWD/src/parts/sensors.cpp \
	$$PWD/src/parts/functions.cpp \
	$$PWD/src/parts/images.cpp \
	$$PWD/src/semanticTree/semanticTree.cpp \
	$$PWD/src/semanticTree/semanticNode.cpp \
	$$PWD/src/semanticTree/nonZoneNode.cpp \
	$$PWD/src/semanticTree/zoneNode.cpp \
	$$PWD/src/semanticTree/simpleNode.cpp \
	$$PWD/src/semanticTree/finalNode.cpp \
	$$PWD/src/semanticTree/conditionalNode.cpp \
	$$PWD/src/semanticTree/ifNode.cpp \
	$$PWD/src/semanticTree/loopNode.cpp \
	$$PWD/src/semanticTree/rootNode.cpp \
	$$PWD/src/rules/semanticTransformationRule.cpp \
	$$PWD/src/rules/simpleRules/simpleBlockRuleBase.cpp \
	$$PWD/src/rules/simpleRules/simpleUnvisitedRule.cpp \
	$$PWD/src/rules/simpleRules/simpleVisitedOneZoneRule.cpp \
	$$PWD/src/rules/simpleRules/simpleVisitedRuleBase.cpp \
	$$PWD/src/rules/simpleRules/simpleMergedIfBranchesRule.cpp \
	$$PWD/src/rules/simpleRules/simpleIfInsideCycleRule.cpp \
	$$PWD/src/rules/ifRules/ifBlockRuleBase.cpp \
	$$PWD/src/rules/ifRules/ifWithBothUnvisitedRule.cpp \
	$$PWD/src/rules/ifRules/ifWithOneVisitedRule.cpp \
	$$PWD/src/rules/loopRules/loopBlockRuleBase.cpp \
	$$PWD/src/rules/loopRules/loopWithBothUnvisitedRule.cpp \
	$$PWD/src/rules/loopRules/loopWithIterationVisitedRule.cpp \
	$$PWD/src/rules/loopRules/loopWithNextVisitedRule.cpp \

# Simple element generators & converters

HEADERS += \
	$$PWD/include/generatorBase/converters/templateParametrizedConverter.h \
	$$PWD/include/generatorBase/converters/templateParametrizedMultiConverter.h \
	$$PWD/include/generatorBase/converters/stringPropertyConverter.h \
	$$PWD/include/generatorBase/simpleGenerators/abstractSimpleGenerator.h \
	$$PWD/include/generatorBase/simpleGenerators/binding.h \
	$$PWD/include/generatorBase/simpleGenerators/bindingGenerator.h \

HEADERS += \
	$$PWD/src/converters/enumConverterBase.h \
	$$PWD/src/converters/codeConverterBase.h \
	$$PWD/src/converters/intPropertyConverter.h \
	$$PWD/src/converters/floatPropertyConverter.h \
	$$PWD/src/converters/boolPropertyConverter.h \
	$$PWD/src/converters/nameNormalizerConverter.h \
	$$PWD/src/converters/functionBlockConverter.h \
	$$PWD/src/converters/inequalitySignConverter.h \
	$$PWD/src/converters/colorConverter.h \
	$$PWD/src/converters/breakModeConverter.h \
	$$PWD/src/converters/outputPortConverter.h \
	$$PWD/src/converters/enginePortsConverter.h \
	$$PWD/src/converters/typeConverter.h \
	$$PWD/src/converters/inputPortConverter.h \
	$$PWD/src/converters/functionInvocationConverter.h \
	$$PWD/src/simpleGenerators/nullGenerator.h \
	$$PWD/src/simpleGenerators/commentElementGenerator.h \
	$$PWD/src/simpleGenerators/functionElementGenerator.h \
	$$PWD/src/simpleGenerators/ifElementGenerator.h \
	$$PWD/src/simpleGenerators/infiniteLoopGenerator.h \
	$$PWD/src/simpleGenerators/forLoopGenerator.h \
	$$PWD/src/simpleGenerators/whileLoopGenerator.h \
	$$PWD/src/simpleGenerators/enginesStopGenerator.h \
	$$PWD/src/simpleGenerators/timerGenerator.h \
	$$PWD/src/simpleGenerators/beepGenerator.h \
	$$PWD/src/simpleGenerators/playToneGenerator.h \
	$$PWD/src/simpleGenerators/finalNodeGenerator.h \
	$$PWD/src/simpleGenerators/nullificationEncoderGenerator.h \
	$$PWD/src/simpleGenerators/waitForColorBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForColorIntensityBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForLightBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForSonarBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForEncoderBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForTouchSensorBlockGenerator.h \
	$$PWD/src/simpleGenerators/initialNodeGenerator.h \
	$$PWD/src/simpleGenerators/enginesGenerator.h \
	$$PWD/src/simpleGenerators/waitForSoundBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForGyroscopeBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForAccelerometerBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawPixelBlockGenerator.h \
	$$PWD/src/simpleGenerators/waitForButtonsBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawLineBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawCircleBlockGenerator.h \
	$$PWD/src/simpleGenerators/printTextBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawRectBlockGenerator.h \
	$$PWD/src/simpleGenerators/clearScreenBlockGenerator.h \
	$$PWD/src/simpleGenerators/drawBlockGenerator.h \
	$$PWD/src/simpleGenerators/subprogramsSimpleGenerator.h \
	$$PWD/src/simpleGenerators/breakGenerator.h \
	$$PWD/src/simpleGenerators/continueGenerator.h \
	$$PWD/src/simpleGenerators/labelGenerator.h \
	$$PWD/src/simpleGenerators/gotoSimpleGenerator.h \

SOURCES += \
	$$PWD/src/converters/templateParametrizedConverter.cpp \
	$$PWD/src/converters/templateParametrizedMultiConverter.cpp \
	$$PWD/src/converters/enumConverterBase.cpp \
	$$PWD/src/converters/codeConverterBase.cpp \
	$$PWD/src/converters/intPropertyConverter.cpp \
	$$PWD/src/converters/floatPropertyConverter.cpp \
	$$PWD/src/converters/boolPropertyConverter.cpp \
	$$PWD/src/converters/stringPropertyConverter.cpp \
	$$PWD/src/converters/nameNormalizerConverter.cpp \
	$$PWD/src/converters/functionBlockConverter.cpp \
	$$PWD/src/converters/inequalitySignConverter.cpp \
	$$PWD/src/converters/colorConverter.cpp \
	$$PWD/src/converters/breakModeConverter.cpp \
	$$PWD/src/converters/outputPortConverter.cpp \
	$$PWD/src/converters/enginePortsConverter.cpp \
	$$PWD/src/converters/typeConverter.cpp \
	$$PWD/src/converters/inputPortConverter.cpp \
	$$PWD/src/converters/functionInvocationConverter.cpp \
	$$PWD/src/simpleGenerators/abstractSimpleGenerator.cpp \
	$$PWD/src/simpleGenerators/nullGenerator.cpp \
	$$PWD/src/simpleGenerators/commentElementGenerator.cpp \
	$$PWD/src/simpleGenerators/functionElementGenerator.cpp \
	$$PWD/src/simpleGenerators/ifElementGenerator.cpp \
	$$PWD/src/simpleGenerators/infiniteLoopGenerator.cpp \
	$$PWD/src/simpleGenerators/forLoopGenerator.cpp \
	$$PWD/src/simpleGenerators/whileLoopGenerator.cpp \
	$$PWD/src/simpleGenerators/bindingGenerator.cpp \
	$$PWD/src/simpleGenerators/binding.cpp \
	$$PWD/src/simpleGenerators/enginesStopGenerator.cpp \
	$$PWD/src/simpleGenerators/timerGenerator.cpp \
	$$PWD/src/simpleGenerators/beepGenerator.cpp \
	$$PWD/src/simpleGenerators/playToneGenerator.cpp \
	$$PWD/src/simpleGenerators/finalNodeGenerator.cpp \
	$$PWD/src/simpleGenerators/nullificationEncoderGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForColorBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForColorIntensityBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForLightBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForSonarBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForEncoderBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForTouchSensorBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/initialNodeGenerator.cpp \
	$$PWD/src/simpleGenerators/enginesGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForSoundBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForGyroscopeBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForAccelerometerBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawPixelBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/waitForButtonsBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawLineBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawCircleBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/printTextBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawRectBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/clearScreenBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/drawBlockGenerator.cpp \
	$$PWD/src/simpleGenerators/subprogramsSimpleGenerator.cpp \
	$$PWD/src/simpleGenerators/breakGenerator.cpp \
	$$PWD/src/simpleGenerators/continueGenerator.cpp \
	$$PWD/src/simpleGenerators/labelGenerator.cpp \
	$$PWD/src/simpleGenerators/gotoSimpleGenerator.cpp \


make coverage: don't xdg-open the browser

######################################################################
# Communi
######################################################################

isEmpty(IRC_MODULE):error(IRC_MODULE must be set)

TEMPLATE = lib
TARGET = $$qtLibraryTarget($$IRC_MODULE)
QT = core network
!verbose:CONFIG += silent
contains(QT_CONFIG, debug_and_release) {
    win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all
}

include(../version.pri)
!win32:VERSION = $$IRC_VERSION

isEmpty(IRC_BUILDDIR):IRC_BUILDDIR = $$OUT_PWD/../..

DESTDIR = $$IRC_BUILDDIR/lib
DLLDESTDIR = $$IRC_BUILDDIR/bin

CONFIG(debug, debug|release) {
    OBJECTS_DIR = debug
    MOC_DIR = debug
} else {
    OBJECTS_DIR = release
    MOC_DIR = release
}

coverage {
    QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno

    LIBS += -lgcov
    QMAKE_CXXFLAGS += -g -Wall -fprofile-arcs -ftest-coverage -O0
    QMAKE_LDFLAGS += -g -Wall -fprofile-arcs -ftest-coverage  -O0

    zerocounters.commands = @lcov --directory \$(OBJECTS_DIR) --zerocounters
    QMAKE_EXTRA_TARGETS += zerocounters

    capture.file = ../../coverage/$${IRC_MODULE}.cov
    capture.commands = @mkdir -p ../../coverage
    capture.commands += && lcov --base-directory $$_PRO_FILE_PWD_ --directory \$(OBJECTS_DIR) --capture --output-file $$capture.file
    capture.filters = \"/usr/*\" \"moc_*.cpp\"
    !isEqual(IRC_MODULE, "IrcCore"):capture.filters += \"*/IrcCore/*\"
    capture.commands += && lcov --remove $$capture.file $$capture.filters --output-file $$capture.file
    QMAKE_EXTRA_TARGETS += capture

    genhtml.dir = ../../coverage/$${IRC_MODULE}
    genhtml.commands = @genhtml --output-directory $$genhtml.dir $$capture.file
    QMAKE_EXTRA_TARGETS += genhtml
}

######################################################################
# Communi
######################################################################

isEmpty(IRC_MODULE):error(IRC_MODULE must be set)

TEMPLATE = lib
TARGET = $$qtLibraryTarget($$IRC_MODULE)
QT = core network
!verbose:CONFIG += silent
contains(QT_CONFIG, debug_and_release) {
    win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all
}

include(../version.pri)
!win32:VERSION = $$IRC_VERSION

isEmpty(IRC_BUILDDIR):IRC_BUILDDIR = $$OUT_PWD/../..

DESTDIR = $$IRC_BUILDDIR/lib
DLLDESTDIR = $$IRC_BUILDDIR/bin

CONFIG(debug, debug|release) {
    OBJECTS_DIR = debug
    MOC_DIR = debug
} else {
    OBJECTS_DIR = release
    MOC_DIR = release
}

coverage {
    QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno

    LIBS += -lgcov
    QMAKE_CXXFLAGS += -g -Wall -fprofile-arcs -ftest-coverage -O0
    QMAKE_LDFLAGS += -g -Wall -fprofile-arcs -ftest-coverage  -O0

    zerocounters.commands = @lcov --directory \$(OBJECTS_DIR) --zerocounters
    QMAKE_EXTRA_TARGETS += zerocounters

    capture.file = ../../coverage/$${IRC_MODULE}.cov
    capture.commands = @mkdir -p ../../coverage
    capture.commands += && lcov --base-directory $$_PRO_FILE_PWD_ --directory \$(OBJECTS_DIR) --capture --output-file $$capture.file
    capture.filters = \"/usr/*\" \"moc_*.cpp\"
    !isEqual(IRC_MODULE, "IrcCore"):capture.filters += \"*/IrcCore/*\"
    capture.commands += && lcov --remove $$capture.file $$capture.filters --output-file $$capture.file
    QMAKE_EXTRA_TARGETS += capture

    genhtml.dir = ../../coverage/$${IRC_MODULE}
    genhtml.commands = @genhtml --output-directory $$genhtml.dir $$capture.file
    genhtml.commands += && xdg-open $$genhtml.dir/index.html
    QMAKE_EXTRA_TARGETS += genhtml
}


Modify install prefix

Modify install prefix

QT       += core gui widgets

greaterThan(QT_VERSION, 4.7): lessThan(QT_VERSION, 5.0): QT += declarative
greaterThan(QT_MAJOR_VERSION, 4): QT += quick

DEFINES += QZXING_LIBRARY \
        ZXING_ICONV_CONST \
        DISABLE_LIBRARY_FEATURES

INCLUDEPATH  += $$PWD \
                $$PWD/zxing

HEADERS += $$PWD/QZXing_global.h \
    $$PWD/CameraImageWrapper.h \
    $$PWD/imagehandler.h \
    $$PWD/QZXing.h \
    $$PWD/zxing/zxing/ZXing.h \
    $$PWD/zxing/zxing/IllegalStateException.h \
    $$PWD/zxing/zxing/InvertedLuminanceSource.h \
    $$PWD/zxing/zxing/ChecksumException.h \
    $$PWD/zxing/zxing/ResultPointCallback.h \
    $$PWD/zxing/zxing/ResultPoint.h \
    $$PWD/zxing/zxing/Result.h \
    $$PWD/zxing/zxing/ReaderException.h \
    $$PWD/zxing/zxing/Reader.h \
    $$PWD/zxing/zxing/NotFoundException.h \
    $$PWD/zxing/zxing/MultiFormatReader.h \
    $$PWD/zxing/zxing/LuminanceSource.h \
    $$PWD/zxing/zxing/FormatException.h \
    $$PWD/zxing/zxing/Exception.h \
    $$PWD/zxing/zxing/DecodeHints.h \
    $$PWD/zxing/zxing/BinaryBitmap.h \
    $$PWD/zxing/zxing/Binarizer.h \
    $$PWD/zxing/zxing/BarcodeFormat.h \
    $$PWD/zxing/zxing/aztec/AztecReader.h \
    $$PWD/zxing/zxing/aztec/AztecDetectorResult.h \
    $$PWD/zxing/zxing/aztec/decoder/Decoder.h \
    $$PWD/zxing/zxing/aztec/detector/Detector.h \
    $$PWD/zxing/zxing/common/StringUtils.h \
    $$PWD/zxing/zxing/common/Str.h \
    $$PWD/zxing/zxing/common/Point.h \
    $$PWD/zxing/zxing/common/PerspectiveTransform.h \
    $$PWD/zxing/zxing/common/IllegalArgumentException.h \
    $$PWD/zxing/zxing/common/HybridBinarizer.h \
    $$PWD/zxing/zxing/common/GridSampler.h \
    $$PWD/zxing/zxing/common/GreyscaleRotatedLuminanceSource.h \
    $$PWD/zxing/zxing/common/GreyscaleLuminanceSource.h \
    $$PWD/zxing/zxing/common/GlobalHistogramBinarizer.h \
    $$PWD/zxing/zxing/common/DetectorResult.h \
    $$PWD/zxing/zxing/common/DecoderResult.h \
    $$PWD/zxing/zxing/common/Counted.h \
    $$PWD/zxing/zxing/common/CharacterSetECI.h \
    $$PWD/zxing/zxing/common/BitSource.h \
    $$PWD/zxing/zxing/common/BitMatrix.h \
    $$PWD/zxing/zxing/common/BitArray.h \
    $$PWD/zxing/zxing/common/Array.h \
    $$PWD/zxing/zxing/common/detector/MathUtils.h \
    $$PWD/zxing/zxing/common/detector/JavaMath.h \
    $$PWD/zxing/zxing/common/detector/WhiteRectangleDetector.h \
    $$PWD/zxing/zxing/common/detector/MonochromeRectangleDetector.h \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonException.h \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.h \
    $$PWD/zxing/zxing/common/reedsolomon/GenericGFPoly.h \
    $$PWD/zxing/zxing/common/reedsolomon/GenericGF.h \
    $$PWD/zxing/zxing/datamatrix/Version.h \
    $$PWD/zxing/zxing/datamatrix/DataMatrixReader.h \
    $$PWD/zxing/zxing/datamatrix/decoder/Decoder.h \
    $$PWD/zxing/zxing/datamatrix/decoder/DecodedBitStreamParser.h \
    $$PWD/zxing/zxing/datamatrix/decoder/DataBlock.h \
    $$PWD/zxing/zxing/datamatrix/decoder/BitMatrixParser.h \
    $$PWD/zxing/zxing/datamatrix/detector/DetectorException.h \
    $$PWD/zxing/zxing/datamatrix/detector/Detector.h \
    $$PWD/zxing/zxing/datamatrix/detector/CornerPoint.h \
    $$PWD/zxing/zxing/oned/UPCEReader.h \
    $$PWD/zxing/zxing/oned/UPCEANReader.h \
    $$PWD/zxing/zxing/oned/UPCAReader.h \
    $$PWD/zxing/zxing/oned/OneDResultPoint.h \
    $$PWD/zxing/zxing/oned/OneDReader.h \
    $$PWD/zxing/zxing/oned/MultiFormatUPCEANReader.h \
    $$PWD/zxing/zxing/oned/MultiFormatOneDReader.h \
    $$PWD/zxing/zxing/oned/ITFReader.h \
    $$PWD/zxing/zxing/oned/EAN13Reader.h \
    $$PWD/zxing/zxing/oned/EAN8Reader.h \
    $$PWD/zxing/zxing/oned/Code128Reader.h \
    $$PWD/zxing/zxing/oned/Code39Reader.h \
    $$PWD/zxing/zxing/oned/CodaBarReader.h \
    $$PWD/zxing/zxing/oned/Code93Reader.h \
    $$PWD/zxing/zxing/qrcode/Version.h \
    $$PWD/zxing/zxing/qrcode/QRCodeReader.h \
    $$PWD/zxing/zxing/qrcode/FormatInformation.h \
    $$PWD/zxing/zxing/qrcode/ErrorCorrectionLevel.h \
    $$PWD/zxing/zxing/qrcode/decoder/Mode.h \
    $$PWD/zxing/zxing/qrcode/decoder/Decoder.h \
    $$PWD/zxing/zxing/qrcode/decoder/DecodedBitStreamParser.h \
    $$PWD/zxing/zxing/qrcode/decoder/DataMask.h \
    $$PWD/zxing/zxing/qrcode/decoder/DataBlock.h \
    $$PWD/zxing/zxing/qrcode/decoder/BitMatrixParser.h \
    $$PWD/zxing/zxing/qrcode/detector/FinderPatternInfo.h \
    $$PWD/zxing/zxing/qrcode/detector/FinderPatternFinder.h \
    $$PWD/zxing/zxing/qrcode/detector/FinderPattern.h \
    $$PWD/zxing/zxing/qrcode/detector/Detector.h \
    $$PWD/zxing/zxing/qrcode/detector/AlignmentPatternFinder.h \
    $$PWD/zxing/zxing/qrcode/detector/AlignmentPattern.h \
    $$PWD/zxing/zxing/multi/MultipleBarcodeReader.h \
    $$PWD/zxing/zxing/multi/GenericMultipleBarcodeReader.h \
    $$PWD/zxing/zxing/multi/ByQuadrantReader.h \
    $$PWD/zxing/zxing/multi/qrcode/QRCodeMultiReader.h \
    $$PWD/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h \
    $$PWD/zxing/zxing/multi/qrcode/detector/MultiDetector.h \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.h \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ModulusGF.h \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ModulusPoly.h \
    $$PWD/zxing/zxing/pdf417/decoder/BitMatrixParser.h \
    $$PWD/zxing/zxing/pdf417/decoder/DecodedBitStreamParser.h \
    $$PWD/zxing/zxing/pdf417/decoder/Decoder.h \
    $$PWD/zxing/zxing/pdf417/detector/Detector.h \
    $$PWD/zxing/zxing/pdf417/detector/LinesSampler.h \
    $$PWD/zxing/zxing/pdf417/PDF417Reader.h \
    $$PWD/zxing/bigint/NumberlikeArray.hh \
    $$PWD/zxing/bigint/BigUnsignedInABase.hh \
    $$PWD/zxing/bigint/BigUnsigned.hh \
    $$PWD/zxing/bigint/BigIntegerUtils.hh \
    $$PWD/zxing/bigint/BigIntegerLibrary.hh \
    $$PWD/zxing/bigint/BigIntegerAlgorithms.hh \
    $$PWD/zxing/bigint/BigInteger.hh \
    $$PWD/zxing/zxing/qrcode/encoder/BlockPair.h \
    $$PWD/zxing/zxing/qrcode/encoder/ByteMatrix.h \
    $$PWD/zxing/zxing/qrcode/encoder/Encoder.h \
    $$PWD/zxing/zxing/qrcode/encoder/MaskUtil.h \
    $$PWD/zxing/zxing/qrcode/encoder/MatrixUtil.h \
    $$PWD/zxing/zxing/qrcode/encoder/QRCode.h \
    $$PWD/zxing/zxing/WriterException.h \
    $$PWD/zxing/zxing/EncodeHint.h \
    $$PWD/zxing/zxing/UnsupportedEncodingException.h \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonEncoder.h

SOURCES += $$PWD/CameraImageWrapper.cpp \
    $$PWD/qzxing.cpp \
    $$PWD/imagehandler.cpp \
    $$PWD/zxing/zxing/ResultIO.cpp \
    $$PWD/zxing/zxing/InvertedLuminanceSource.cpp \
    $$PWD/zxing/zxing/ChecksumException.cpp \
    $$PWD/zxing/zxing/ResultPointCallback.cpp \
    $$PWD/zxing/zxing/ResultPoint.cpp \
    $$PWD/zxing/zxing/Result.cpp \
    $$PWD/zxing/zxing/Reader.cpp \
    $$PWD/zxing/zxing/MultiFormatReader.cpp \
    $$PWD/zxing/zxing/LuminanceSource.cpp \
    $$PWD/zxing/zxing/FormatException.cpp \
    $$PWD/zxing/zxing/Exception.cpp \
    $$PWD/zxing/zxing/DecodeHints.cpp \
    $$PWD/zxing/zxing/BinaryBitmap.cpp \
    $$PWD/zxing/zxing/Binarizer.cpp \
    $$PWD/zxing/zxing/BarcodeFormat.cpp \
    $$PWD/zxing/zxing/aztec/AztecReader.cpp \
    $$PWD/zxing/zxing/aztec/AztecDetectorResult.cpp \
    $$PWD/zxing/zxing/common/StringUtils.cpp \
    $$PWD/zxing/zxing/common/Str.cpp \
    $$PWD/zxing/zxing/common/PerspectiveTransform.cpp \
    $$PWD/zxing/zxing/common/IllegalArgumentException.cpp \
    $$PWD/zxing/zxing/common/HybridBinarizer.cpp \
    $$PWD/zxing/zxing/common/GridSampler.cpp \
    $$PWD/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp \
    $$PWD/zxing/zxing/common/GreyscaleLuminanceSource.cpp \
    $$PWD/zxing/zxing/common/GlobalHistogramBinarizer.cpp \
    $$PWD/zxing/zxing/common/DetectorResult.cpp \
    $$PWD/zxing/zxing/common/DecoderResult.cpp \
    $$PWD/zxing/zxing/common/CharacterSetECI.cpp \
    $$PWD/zxing/zxing/common/BitSource.cpp \
    $$PWD/zxing/zxing/common/BitMatrix.cpp \
    $$PWD/zxing/zxing/common/BitArray.cpp \
    $$PWD/zxing/zxing/common/BitArrayIO.cpp \
    $$PWD/zxing/zxing/common/detector/WhiteRectangleDetector.cpp \
    $$PWD/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonException.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/GenericGF.cpp \
    $$PWD/zxing/zxing/datamatrix/DataMatrixReader.cpp \
    $$PWD/zxing/zxing/oned/UPCEReader.cpp \
    $$PWD/zxing/zxing/oned/UPCEANReader.cpp \
    $$PWD/zxing/zxing/oned/UPCAReader.cpp \
    $$PWD/zxing/zxing/oned/OneDResultPoint.cpp \
    $$PWD/zxing/zxing/oned/OneDReader.cpp \
    $$PWD/zxing/zxing/oned/MultiFormatUPCEANReader.cpp \
    $$PWD/zxing/zxing/oned/MultiFormatOneDReader.cpp \
    $$PWD/zxing/zxing/oned/ITFReader.cpp \
    $$PWD/zxing/zxing/oned/EAN13Reader.cpp \
    $$PWD/zxing/zxing/oned/EAN8Reader.cpp \
    $$PWD/zxing/zxing/oned/Code128Reader.cpp \
    $$PWD/zxing/zxing/oned/Code39Reader.cpp \
    $$PWD/zxing/zxing/oned/CodaBarReader.cpp \
    $$PWD/zxing/zxing/oned/Code93Reader.cpp \
    $$PWD/zxing/zxing/qrcode/QRCodeReader.cpp \
    $$PWD/zxing/zxing/multi/MultipleBarcodeReader.cpp \
    $$PWD/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp \
    $$PWD/zxing/zxing/multi/ByQuadrantReader.cpp \
    $$PWD/zxing/zxing/multi/qrcode/QRCodeMultiReader.cpp \
    $$PWD/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp \
    $$PWD/zxing/zxing/multi/qrcode/detector/MultiDetector.cpp \
    $$PWD/zxing/zxing/aztec/decoder/AztecDecoder.cpp \
    $$PWD/zxing/zxing/aztec/detector/AztecDetector.cpp \
    $$PWD/zxing/zxing/datamatrix/DataMatrixVersion.cpp \
    $$PWD/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp \
    $$PWD/zxing/zxing/datamatrix/decoder/DataMatrixBitMatrixParser.cpp \
    $$PWD/zxing/zxing/datamatrix/decoder/DataMatrixDataBlock.cpp \
    $$PWD/zxing/zxing/datamatrix/decoder/DataMatrixDecodedBitStreamParser.cpp \
    $$PWD/zxing/zxing/datamatrix/detector/DataMatrixCornerPoint.cpp \
    $$PWD/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp \
    $$PWD/zxing/zxing/datamatrix/detector/DataMatrixDetectorException.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRBitMatrixParser.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRDataBlock.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRDataMask.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRDecodedBitStreamParser.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRDecoder.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRMode.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRAlignmentPatternFinder.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRDetector.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRFinderPattern.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRFinderPatternInfo.cpp \
    $$PWD/zxing/zxing/qrcode/QRVersion.cpp \
    $$PWD/zxing/zxing/qrcode/QRFormatInformation.cpp \
    $$PWD/zxing/zxing/qrcode/QRErrorCorrectionLevel.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ModulusPoly.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp \
    $$PWD/zxing/zxing/pdf417/detector/PDF417Detector.cpp \
    $$PWD/zxing/zxing/pdf417/detector/LinesSampler.cpp \
    $$PWD/zxing/zxing/pdf417/PDF417Reader.cpp \
    $$PWD/zxing/bigint/BigUnsignedInABase.cc \
    $$PWD/zxing/bigint/BigUnsigned.cc \
    $$PWD/zxing/bigint/BigIntegerUtils.cc \
    $$PWD/zxing/bigint/BigIntegerAlgorithms.cc \
    $$PWD/zxing/bigint/BigInteger.cc \
    $$PWD/zxing/zxing/qrcode/encoder/ByteMatrix.cpp \
    $$PWD/zxing/zxing/qrcode/encoder/QREncoder.cpp \
    $$PWD/zxing/zxing/qrcode/encoder/MaskUtil.cpp \
    $$PWD/zxing/zxing/qrcode/encoder/MatrixUtil.cpp \
    $$PWD/zxing/zxing/qrcode/encoder/QRCode.cpp \
    $$PWD/zxing/zxing/EncodeHint.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonEncoder.cpp

symbian {
    TARGET.UID3 = 0xE618743C
    TARGET.EPOCALLOWDLLDATA = 1

    #TARGET.CAPABILITY = All -TCB -AllFiles -DRM
    TARGET.CAPABILITY += NetworkServices \
        ReadUserData \
        WriteUserData \
        LocalServices \
        UserEnvironment \
        Location
}

!symbian {
    isEmpty(PREFIX) {
        maemo5 {
            target.path = /opt/usr/lib
        } else {
            target.path = /usr/lib
        }
    }

    DEFINES += NOFMAXL

	# Installation
	headers.files = qzxing.h QZXing_global.h
	headers.path = $$PREFIX/include
	target.path = $$PREFIX/lib
	INSTALLS += headers target

	# pkg-config support
	CONFIG += create_pc create_prl no_install_prl
	QMAKE_PKGCONFIG_DESTDIR = pkgconfig
	QMAKE_PKGCONFIG_LIBDIR = ${prefix}/lib
	QMAKE_PKGCONFIG_INCDIR = ${prefix}/include

	unix:QMAKE_CLEAN += -r pkgconfig lib$${TARGET}.prl
}

win32-msvc*{

    INCLUDEPATH += $$PWD/zxing/win32/zxing \
	            $$PWD/zxing/win32/zxing/msvc
    HEADERS += $$PWD/zxing/win32/zxing/msvc/stdint.h \
                $$PWD/zxing/win32/zxing/iconv.h

    SOURCES += $$PWD/zxing/win32/zxing/win_iconv.c
}

win32-g++{

    INCLUDEPATH += $$PWD/zxing/win32/zxing

    HEADERS += $$PWD/zxing/win32/zxing/iconv.h

    SOURCES += $$PWD/zxing/win32/zxing/win_iconv.c
}

!win32{
    DEFINES += NO_ICONV
}
winrt {
    DEFINES += NO_ICONV
}

QT       += core gui widgets

greaterThan(QT_VERSION, 4.7): lessThan(QT_VERSION, 5.0): QT += declarative
greaterThan(QT_MAJOR_VERSION, 4): QT += quick

DEFINES += QZXING_LIBRARY \
        ZXING_ICONV_CONST \
        DISABLE_LIBRARY_FEATURES

INCLUDEPATH  += $$PWD \
                $$PWD/zxing

HEADERS += $$PWD/QZXing_global.h \
    $$PWD/CameraImageWrapper.h \
    $$PWD/imagehandler.h \
    $$PWD/QZXing.h \
    $$PWD/zxing/zxing/ZXing.h \
    $$PWD/zxing/zxing/IllegalStateException.h \
    $$PWD/zxing/zxing/InvertedLuminanceSource.h \
    $$PWD/zxing/zxing/ChecksumException.h \
    $$PWD/zxing/zxing/ResultPointCallback.h \
    $$PWD/zxing/zxing/ResultPoint.h \
    $$PWD/zxing/zxing/Result.h \
    $$PWD/zxing/zxing/ReaderException.h \
    $$PWD/zxing/zxing/Reader.h \
    $$PWD/zxing/zxing/NotFoundException.h \
    $$PWD/zxing/zxing/MultiFormatReader.h \
    $$PWD/zxing/zxing/LuminanceSource.h \
    $$PWD/zxing/zxing/FormatException.h \
    $$PWD/zxing/zxing/Exception.h \
    $$PWD/zxing/zxing/DecodeHints.h \
    $$PWD/zxing/zxing/BinaryBitmap.h \
    $$PWD/zxing/zxing/Binarizer.h \
    $$PWD/zxing/zxing/BarcodeFormat.h \
    $$PWD/zxing/zxing/aztec/AztecReader.h \
    $$PWD/zxing/zxing/aztec/AztecDetectorResult.h \
    $$PWD/zxing/zxing/aztec/decoder/Decoder.h \
    $$PWD/zxing/zxing/aztec/detector/Detector.h \
    $$PWD/zxing/zxing/common/StringUtils.h \
    $$PWD/zxing/zxing/common/Str.h \
    $$PWD/zxing/zxing/common/Point.h \
    $$PWD/zxing/zxing/common/PerspectiveTransform.h \
    $$PWD/zxing/zxing/common/IllegalArgumentException.h \
    $$PWD/zxing/zxing/common/HybridBinarizer.h \
    $$PWD/zxing/zxing/common/GridSampler.h \
    $$PWD/zxing/zxing/common/GreyscaleRotatedLuminanceSource.h \
    $$PWD/zxing/zxing/common/GreyscaleLuminanceSource.h \
    $$PWD/zxing/zxing/common/GlobalHistogramBinarizer.h \
    $$PWD/zxing/zxing/common/DetectorResult.h \
    $$PWD/zxing/zxing/common/DecoderResult.h \
    $$PWD/zxing/zxing/common/Counted.h \
    $$PWD/zxing/zxing/common/CharacterSetECI.h \
    $$PWD/zxing/zxing/common/BitSource.h \
    $$PWD/zxing/zxing/common/BitMatrix.h \
    $$PWD/zxing/zxing/common/BitArray.h \
    $$PWD/zxing/zxing/common/Array.h \
    $$PWD/zxing/zxing/common/detector/MathUtils.h \
    $$PWD/zxing/zxing/common/detector/JavaMath.h \
    $$PWD/zxing/zxing/common/detector/WhiteRectangleDetector.h \
    $$PWD/zxing/zxing/common/detector/MonochromeRectangleDetector.h \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonException.h \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.h \
    $$PWD/zxing/zxing/common/reedsolomon/GenericGFPoly.h \
    $$PWD/zxing/zxing/common/reedsolomon/GenericGF.h \
    $$PWD/zxing/zxing/datamatrix/Version.h \
    $$PWD/zxing/zxing/datamatrix/DataMatrixReader.h \
    $$PWD/zxing/zxing/datamatrix/decoder/Decoder.h \
    $$PWD/zxing/zxing/datamatrix/decoder/DecodedBitStreamParser.h \
    $$PWD/zxing/zxing/datamatrix/decoder/DataBlock.h \
    $$PWD/zxing/zxing/datamatrix/decoder/BitMatrixParser.h \
    $$PWD/zxing/zxing/datamatrix/detector/DetectorException.h \
    $$PWD/zxing/zxing/datamatrix/detector/Detector.h \
    $$PWD/zxing/zxing/datamatrix/detector/CornerPoint.h \
    $$PWD/zxing/zxing/oned/UPCEReader.h \
    $$PWD/zxing/zxing/oned/UPCEANReader.h \
    $$PWD/zxing/zxing/oned/UPCAReader.h \
    $$PWD/zxing/zxing/oned/OneDResultPoint.h \
    $$PWD/zxing/zxing/oned/OneDReader.h \
    $$PWD/zxing/zxing/oned/MultiFormatUPCEANReader.h \
    $$PWD/zxing/zxing/oned/MultiFormatOneDReader.h \
    $$PWD/zxing/zxing/oned/ITFReader.h \
    $$PWD/zxing/zxing/oned/EAN13Reader.h \
    $$PWD/zxing/zxing/oned/EAN8Reader.h \
    $$PWD/zxing/zxing/oned/Code128Reader.h \
    $$PWD/zxing/zxing/oned/Code39Reader.h \
    $$PWD/zxing/zxing/oned/CodaBarReader.h \
    $$PWD/zxing/zxing/oned/Code93Reader.h \
    $$PWD/zxing/zxing/qrcode/Version.h \
    $$PWD/zxing/zxing/qrcode/QRCodeReader.h \
    $$PWD/zxing/zxing/qrcode/FormatInformation.h \
    $$PWD/zxing/zxing/qrcode/ErrorCorrectionLevel.h \
    $$PWD/zxing/zxing/qrcode/decoder/Mode.h \
    $$PWD/zxing/zxing/qrcode/decoder/Decoder.h \
    $$PWD/zxing/zxing/qrcode/decoder/DecodedBitStreamParser.h \
    $$PWD/zxing/zxing/qrcode/decoder/DataMask.h \
    $$PWD/zxing/zxing/qrcode/decoder/DataBlock.h \
    $$PWD/zxing/zxing/qrcode/decoder/BitMatrixParser.h \
    $$PWD/zxing/zxing/qrcode/detector/FinderPatternInfo.h \
    $$PWD/zxing/zxing/qrcode/detector/FinderPatternFinder.h \
    $$PWD/zxing/zxing/qrcode/detector/FinderPattern.h \
    $$PWD/zxing/zxing/qrcode/detector/Detector.h \
    $$PWD/zxing/zxing/qrcode/detector/AlignmentPatternFinder.h \
    $$PWD/zxing/zxing/qrcode/detector/AlignmentPattern.h \
    $$PWD/zxing/zxing/multi/MultipleBarcodeReader.h \
    $$PWD/zxing/zxing/multi/GenericMultipleBarcodeReader.h \
    $$PWD/zxing/zxing/multi/ByQuadrantReader.h \
    $$PWD/zxing/zxing/multi/qrcode/QRCodeMultiReader.h \
    $$PWD/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h \
    $$PWD/zxing/zxing/multi/qrcode/detector/MultiDetector.h \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.h \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ModulusGF.h \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ModulusPoly.h \
    $$PWD/zxing/zxing/pdf417/decoder/BitMatrixParser.h \
    $$PWD/zxing/zxing/pdf417/decoder/DecodedBitStreamParser.h \
    $$PWD/zxing/zxing/pdf417/decoder/Decoder.h \
    $$PWD/zxing/zxing/pdf417/detector/Detector.h \
    $$PWD/zxing/zxing/pdf417/detector/LinesSampler.h \
    $$PWD/zxing/zxing/pdf417/PDF417Reader.h \
    $$PWD/zxing/bigint/NumberlikeArray.hh \
    $$PWD/zxing/bigint/BigUnsignedInABase.hh \
    $$PWD/zxing/bigint/BigUnsigned.hh \
    $$PWD/zxing/bigint/BigIntegerUtils.hh \
    $$PWD/zxing/bigint/BigIntegerLibrary.hh \
    $$PWD/zxing/bigint/BigIntegerAlgorithms.hh \
    $$PWD/zxing/bigint/BigInteger.hh \
    $$PWD/zxing/zxing/qrcode/encoder/BlockPair.h \
    $$PWD/zxing/zxing/qrcode/encoder/ByteMatrix.h \
    $$PWD/zxing/zxing/qrcode/encoder/Encoder.h \
    $$PWD/zxing/zxing/qrcode/encoder/MaskUtil.h \
    $$PWD/zxing/zxing/qrcode/encoder/MatrixUtil.h \
    $$PWD/zxing/zxing/qrcode/encoder/QRCode.h \
    $$PWD/zxing/zxing/WriterException.h \
    $$PWD/zxing/zxing/EncodeHint.h \
    $$PWD/zxing/zxing/UnsupportedEncodingException.h \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonEncoder.h

SOURCES += $$PWD/CameraImageWrapper.cpp \
    $$PWD/qzxing.cpp \
    $$PWD/imagehandler.cpp \
    $$PWD/zxing/zxing/ResultIO.cpp \
    $$PWD/zxing/zxing/InvertedLuminanceSource.cpp \
    $$PWD/zxing/zxing/ChecksumException.cpp \
    $$PWD/zxing/zxing/ResultPointCallback.cpp \
    $$PWD/zxing/zxing/ResultPoint.cpp \
    $$PWD/zxing/zxing/Result.cpp \
    $$PWD/zxing/zxing/Reader.cpp \
    $$PWD/zxing/zxing/MultiFormatReader.cpp \
    $$PWD/zxing/zxing/LuminanceSource.cpp \
    $$PWD/zxing/zxing/FormatException.cpp \
    $$PWD/zxing/zxing/Exception.cpp \
    $$PWD/zxing/zxing/DecodeHints.cpp \
    $$PWD/zxing/zxing/BinaryBitmap.cpp \
    $$PWD/zxing/zxing/Binarizer.cpp \
    $$PWD/zxing/zxing/BarcodeFormat.cpp \
    $$PWD/zxing/zxing/aztec/AztecReader.cpp \
    $$PWD/zxing/zxing/aztec/AztecDetectorResult.cpp \
    $$PWD/zxing/zxing/common/StringUtils.cpp \
    $$PWD/zxing/zxing/common/Str.cpp \
    $$PWD/zxing/zxing/common/PerspectiveTransform.cpp \
    $$PWD/zxing/zxing/common/IllegalArgumentException.cpp \
    $$PWD/zxing/zxing/common/HybridBinarizer.cpp \
    $$PWD/zxing/zxing/common/GridSampler.cpp \
    $$PWD/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp \
    $$PWD/zxing/zxing/common/GreyscaleLuminanceSource.cpp \
    $$PWD/zxing/zxing/common/GlobalHistogramBinarizer.cpp \
    $$PWD/zxing/zxing/common/DetectorResult.cpp \
    $$PWD/zxing/zxing/common/DecoderResult.cpp \
    $$PWD/zxing/zxing/common/CharacterSetECI.cpp \
    $$PWD/zxing/zxing/common/BitSource.cpp \
    $$PWD/zxing/zxing/common/BitMatrix.cpp \
    $$PWD/zxing/zxing/common/BitArray.cpp \
    $$PWD/zxing/zxing/common/BitArrayIO.cpp \
    $$PWD/zxing/zxing/common/detector/WhiteRectangleDetector.cpp \
    $$PWD/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonException.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/GenericGF.cpp \
    $$PWD/zxing/zxing/datamatrix/DataMatrixReader.cpp \
    $$PWD/zxing/zxing/oned/UPCEReader.cpp \
    $$PWD/zxing/zxing/oned/UPCEANReader.cpp \
    $$PWD/zxing/zxing/oned/UPCAReader.cpp \
    $$PWD/zxing/zxing/oned/OneDResultPoint.cpp \
    $$PWD/zxing/zxing/oned/OneDReader.cpp \
    $$PWD/zxing/zxing/oned/MultiFormatUPCEANReader.cpp \
    $$PWD/zxing/zxing/oned/MultiFormatOneDReader.cpp \
    $$PWD/zxing/zxing/oned/ITFReader.cpp \
    $$PWD/zxing/zxing/oned/EAN13Reader.cpp \
    $$PWD/zxing/zxing/oned/EAN8Reader.cpp \
    $$PWD/zxing/zxing/oned/Code128Reader.cpp \
    $$PWD/zxing/zxing/oned/Code39Reader.cpp \
    $$PWD/zxing/zxing/oned/CodaBarReader.cpp \
    $$PWD/zxing/zxing/oned/Code93Reader.cpp \
    $$PWD/zxing/zxing/qrcode/QRCodeReader.cpp \
    $$PWD/zxing/zxing/multi/MultipleBarcodeReader.cpp \
    $$PWD/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp \
    $$PWD/zxing/zxing/multi/ByQuadrantReader.cpp \
    $$PWD/zxing/zxing/multi/qrcode/QRCodeMultiReader.cpp \
    $$PWD/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp \
    $$PWD/zxing/zxing/multi/qrcode/detector/MultiDetector.cpp \
    $$PWD/zxing/zxing/aztec/decoder/AztecDecoder.cpp \
    $$PWD/zxing/zxing/aztec/detector/AztecDetector.cpp \
    $$PWD/zxing/zxing/datamatrix/DataMatrixVersion.cpp \
    $$PWD/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp \
    $$PWD/zxing/zxing/datamatrix/decoder/DataMatrixBitMatrixParser.cpp \
    $$PWD/zxing/zxing/datamatrix/decoder/DataMatrixDataBlock.cpp \
    $$PWD/zxing/zxing/datamatrix/decoder/DataMatrixDecodedBitStreamParser.cpp \
    $$PWD/zxing/zxing/datamatrix/detector/DataMatrixCornerPoint.cpp \
    $$PWD/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp \
    $$PWD/zxing/zxing/datamatrix/detector/DataMatrixDetectorException.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRBitMatrixParser.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRDataBlock.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRDataMask.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRDecodedBitStreamParser.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRDecoder.cpp \
    $$PWD/zxing/zxing/qrcode/decoder/QRMode.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRAlignmentPatternFinder.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRDetector.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRFinderPattern.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp \
    $$PWD/zxing/zxing/qrcode/detector/QRFinderPatternInfo.cpp \
    $$PWD/zxing/zxing/qrcode/QRVersion.cpp \
    $$PWD/zxing/zxing/qrcode/QRFormatInformation.cpp \
    $$PWD/zxing/zxing/qrcode/QRErrorCorrectionLevel.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/ec/ModulusPoly.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp \
    $$PWD/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp \
    $$PWD/zxing/zxing/pdf417/detector/PDF417Detector.cpp \
    $$PWD/zxing/zxing/pdf417/detector/LinesSampler.cpp \
    $$PWD/zxing/zxing/pdf417/PDF417Reader.cpp \
    $$PWD/zxing/bigint/BigUnsignedInABase.cc \
    $$PWD/zxing/bigint/BigUnsigned.cc \
    $$PWD/zxing/bigint/BigIntegerUtils.cc \
    $$PWD/zxing/bigint/BigIntegerAlgorithms.cc \
    $$PWD/zxing/bigint/BigInteger.cc \
    $$PWD/zxing/zxing/qrcode/encoder/ByteMatrix.cpp \
    $$PWD/zxing/zxing/qrcode/encoder/QREncoder.cpp \
    $$PWD/zxing/zxing/qrcode/encoder/MaskUtil.cpp \
    $$PWD/zxing/zxing/qrcode/encoder/MatrixUtil.cpp \
    $$PWD/zxing/zxing/qrcode/encoder/QRCode.cpp \
    $$PWD/zxing/zxing/EncodeHint.cpp \
    $$PWD/zxing/zxing/common/reedsolomon/ReedSolomonEncoder.cpp

symbian {
    TARGET.UID3 = 0xE618743C
    TARGET.EPOCALLOWDLLDATA = 1

    #TARGET.CAPABILITY = All -TCB -AllFiles -DRM
    TARGET.CAPABILITY += NetworkServices \
        ReadUserData \
        WriteUserData \
        LocalServices \
        UserEnvironment \
        Location
}

unix:!symbian {
    maemo5 {
        target.path = /opt/usr/lib
    } else {
        target.path = /usr/lib
    }

    DEFINES += NOFMAXL
    INSTALLS += target
}

win32-msvc*{

    INCLUDEPATH += $$PWD/zxing/win32/zxing \
	            $$PWD/zxing/win32/zxing/msvc
    HEADERS += $$PWD/zxing/win32/zxing/msvc/stdint.h \
                $$PWD/zxing/win32/zxing/iconv.h

    SOURCES += $$PWD/zxing/win32/zxing/win_iconv.c
}

win32-g++{

    INCLUDEPATH += $$PWD/zxing/win32/zxing

    HEADERS += $$PWD/zxing/win32/zxing/iconv.h

    SOURCES += $$PWD/zxing/win32/zxing/win_iconv.c
}

!win32{
    DEFINES += NO_ICONV
}
winrt {
    DEFINES += NO_ICONV
}


Qt4 Changes

Qt4 Changes

# Begin CVS Header
#   $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/common.pri,v $
#   $Revision: 1.101 $
#   $Name:  $
#   $Author: aekamal $
#   $Date: 2009/02/05 21:51:17 $
# End CVS Header

# Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc., EML Research, gGmbH, University of Heidelberg,
# and The University of Manchester.
# All rights reserved.

# Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc. and EML Research, gGmbH.
# All rights reserved.

######################################################################
# $Revision: 1.101 $ $Author: aekamal $ $Date: 2009/02/05 21:51:17 $
######################################################################

# In the case the BUILD_OS is not specified we make a guess.
isEmpty(BUILD_OS) {
  win32 {
    BUILD_OS = WIN32

    MY_QT4DIR = $$system(echo %QT4DIR%)
    contains(MY_QT4DIR, %QT4DIR%) {
      MY_QTDIR = $$system(echo %QTDIR%)
      contains(MY_QTDIR, %QTDIR%) {
        QMAKE_QMAKE = qmake.exe
        !build_pass: message("Configuring for $${BUILD_OS} with QTDIR=???.")
      } else {
        QMAKE_QMAKE = $(QTDIR)\bin\qmake.exe
        !build_pass: message("Configuring for $${BUILD_OS} with QTDIR=$(QTDIR).")
      }
	} else {
      !build_pass: message("Configuring for $${BUILD_OS} with QTDIR=$(QT4DIR).")
	}

  } else {
    BUILD_OS = $$system(uname)
    message("Configuring for $${BUILD_OS} with QTDIR=$(QTDIR).")
  }
}
DEFINES += $$BUILD_OS

TARGETDEPS += Makefile

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

#ifdef COPASI_LICENSE_COM
# COPASI License to use
DEFINES -= COPASI_LICENSE_US
DEFINES -= COPASI_LICENSE_DE
DEFINES -= COPASI_LICENSE_COM
DEFINES += COPASI_LICENSE_$$USE_LICENSE
#endif // COPASI_LICENSE_COM

INCLUDEPATH += ../..
QMAKE_CFLAGS   += $$(CFLAGS)
QMAKE_CXXFLAGS += $$(CXXFLAGS)
QMAKE_LFLAGS  += $$(LDFLAGS)

DEFINES += COPASI_TSSA

debug {
  DEFINES += COPASI_DEBUG

  isEmpty(COPASI_SRC_PACKAGE) {
    # DEFINES += COPASI_TSS
    #  stoichiometric stability analysis:
    # DEFINES += COPASI_SSA
  }
}

isEmpty(COPASI_SRC_PACKAGE) {
  DEFINES += HAVE_MML
}

contains(STATIC_LINKAGE, yes) {
  DEFINES+=XML_STATIC
  DEFINES+=LIBSBML_STATIC
  DEFINES+=LIBLAX_STATIC
  DEFINES+=RAPTOR_STATIC
  DEFINES+=SBW_STATIC
}

!contains(BUILD_OS, WIN32) {
  #Release code optimization
  QMAKE_CFLAGS_RELEASE -= -O1
  QMAKE_CFLAGS_RELEASE -= -O2
  QMAKE_CFLAGS_RELEASE -= -O4
  QMAKE_CFLAGS_RELEASE += -O3

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE -= -O2
  QMAKE_CXXFLAGS_RELEASE -= -O4
  QMAKE_CXXFLAGS_RELEASE += -O3

  QMAKE_LEX = ../../admin/flex.sh
  QMAKE_YACC = ../../admin/yacc.sh

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

contains(BUILD_OS, Darwin) {
  release {
    contains(TEMPLATE, app) {
      QMAKE_POST_LINK = strip $(TARGET)
    }
  }

  INCLUDEPATH += /System/Library/Frameworks/Accelerate.framework/Headers
  INCLUDEPATH += /System/Library/Frameworks/Carbon.framework/Headers

  !isEmpty(SBML_PATH){
    LIBS +=  $${SBML_PATH}/lib/libsbml.a
    INCLUDEPATH += $${SBML_PATH}/include
  } else {
    LIBS += -lsbml
  }

  !isEmpty(EXPAT_PATH){
    LIBS+=  $${EXPAT_PATH}/lib/libexpat.a
    INCLUDEPATH += $${EXPAT_PATH}/include
  } else {
    LIBS += -lexpat
  }

  !isEmpty(RAPTOR_PATH){
    LIBS+=  $${RAPTOR_PATH}/lib/libraptor.a
    INCLUDEPATH += $${RAPTOR_PATH}/include
  } else {
    LIBS += -lraptor
  }

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      LIBS+=  $${SBW_PATH}/lib/libSBW.a
      INCLUDEPATH += $${SBW_PATH}/include
      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES += LINUX DARWIN
    }

    !isEmpty(QWT_PATH){
       LIBS+=  $${QWT_PATH}/lib/libqwt.a
       INCLUDEPATH += $${QWT_PATH}/include
    } else {
      LIBS += -lqwt
    }

    !isEmpty(QWT3D_PATH){
      LIBS +=  $${QWT3D_PATH}/lib/libqwtplot3d.a
      INCLUDEPATH += $${QWT3D_PATH}/include
    } else {
      LIBS += -lqwtplot3d
    }
  }

  LIBS += -framework Accelerate
  LIBS += -framework Carbon
  LIBS += -framework QuickTime
  LIBS += -lz
}

contains(BUILD_OS, WIN32) {
  QMAKE_LEX = C:\cygwin\bin\bash ../../admin/flex.sh
  QMAKE_YACC = C:\cygwin\bin\bash ../../admin/yacc.sh

  DEFINES -= UNICODE

  debug {
    QMAKE_LFLAGS += /NODEFAULTLIB:\"msvcrt.lib\"
  }

  QMAKE_LFLAGS += /NODEFAULTLIB:\"libcmt.lib\"

  #Release code optimization
  QMAKE_CFLAGS_RELEASE -= -O1
  QMAKE_CFLAGS_RELEASE += -O2

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE += -O2

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    QMAKE_CXXFLAGS += -I\"$${MKL_PATH}\include\"
    QMAKE_LFLAGS += /LIBPATH:\"$${MKL_PATH}\ia32\lib\"
    QMAKE_LFLAGS += /LIBPATH:\"$${MKL_PATH}\..\Compiler\C++\9.0\IA32\Lib\"
    LIBS += mkl_c.lib
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      QMAKE_CXXFLAGS   += -I\"$${CLAPACK_PATH}\include\"
      QMAKE_LFLAGS += /LIBPATH:\"$${CLAPACK_PATH}\lib\"
      LIBS += clapack.lib
    } else {
      error( "Either MKL_PATH or CLAPACK_PATH must be specified" )
    }
  }

  !isEmpty(EXPAT_PATH) {
    QMAKE_CXXFLAGS   += -I\"$${EXPAT_PATH}\Source\lib\"
    QMAKE_CXXFLAGS   += -I\"$${EXPAT_PATH}\include\"
    QMAKE_LFLAGS += /LIBPATH:\"$${EXPAT_PATH}\StaticLibs\"
    QMAKE_LFLAGS += /LIBPATH:\"$${EXPAT_PATH}\bin\"
    QMAKE_LFLAGS += /LIBPATH:\"$${EXPAT_PATH}\lib\"
    contains(STATIC_LINKAGE, yes) {
      LIBS += libexpatMT.lib
    } else {
      LIBS += libexpat.lib
    }
  } else {
    error( "EXPAT_PATH must be specified" )
  }

  # Add libsbml
  win32-msvc2005 {
    contains(STATIC_LINKAGE, yes) {
      release: LIBS += libsbmlStatic.lib
      debug:   LIBS += libsbmlStaticD.lib
    } else {
      release: LIBS += libsbml.lib
      debug:   LIBS += libsbmlD.lib
    }
  } else {
    LIBS += libsbml.lib
  }

  !isEmpty(SBML_PATH) {
    QMAKE_CXXFLAGS   += -I\"$${SBML_PATH}\include\"
    QMAKE_LFLAGS += /LIBPATH:\"$${SBML_PATH}\lib\"
    QMAKE_LFLAGS += /LIBPATH:\"$${SBML_PATH}\bin\"
  } else {
    error( "SBML_PATH must be specified" )
  }

# The raptor library
  contains(STATIC_LINKAGE, yes) {
    release: LIBS += raptorStatic.lib
    debug:   LIBS += raptorStaticD.lib
  } else {
    release: LIBS += raptor.lib
    debug:   LIBS += raptorD.lib
  }

  !isEmpty(RAPTOR_PATH) {
    QMAKE_CXXFLAGS   += -I\"$${RAPTOR_PATH}\include\"
    QMAKE_LFLAGS += /LIBPATH:\"$${RAPTOR_PATH}\lib\"
  } else {
    error( "RAPTOR_PATH must be specified" )
  }

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      contains(STATIC_LINKAGE, yes) {
        release: LIBS += SBWStatic.lib
        debug:   LIBS += SBWStaticD.lib

        LIBS += Ws2_32.lib
      } else {
        release: LIBS += SBW.lib
        debug:   LIBS += SBWD.lib
      }

      INCLUDEPATH += $${SBW_PATH}/include
      QMAKE_LFLAGS += /LIBPATH:\"$${SBW_PATH}\lib\"

      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES *= WIN32
    }

  !isEmpty(QWT_PATH){
       LIBS+=  -L$${QWT_PATH}/lib
       INCLUDEPATH += $${QWT_PATH}/include
    }
    LIBS += -lqwt

    !isEmpty(QWT3D_PATH){
      LIBS += -L$${QWT3D_PATH}/lib/
      INCLUDEPATH += $${QWT3D_PATH}/include
    }
    release: LIBS += -lqwtplot3d
    debug: LIBS += -lqwtplot3dD
  }
}

contains(BUILD_OS, SunOS) {
contains(STATIC_LINKAGE, yes) {
# :TODO: This should be set through configure.
  LIBS += -L/export/home/shoops/copasi/gcc/lib
}

  release {
    contains(TEMPLATE, app) {
# Note: This must be the SunOS strip command.
      QMAKE_POST_LINK = /usr/ccs/bin/strip $(TARGET)
    }
  }

  !isEmpty(CLAPACK_PATH) {
    DEFINES += USE_CLAPACK
    INCLUDEPATH += $${CLAPACK_PATH}/include
#    LIBS += -llapack -lblas -lF77 -lfl
    LIBS += -llapack -lblas -lF77
    LIBS += -L$${CLAPACK_PATH}/lib
  } else {
    !isEmpty(LAPACK_PATH) {
      message("Using lapack.")
      DEFINES += USE_LAPACK
      INCLUDEPATH += $${LAPACK_PATH}/include
      LIBS += -llapack -lblas  -lg2c
      LIBS += -L$${LAPACK_PATH}/lib
    } else {
      message("Using sunperf.")
      DEFINES += USE_SUNPERF
      LIBS += -lsunperf
      QMAKE_CFLAGS   += -dalign
      QMAKE_CXXFLAGS   += -dalign
    }
  }
  !isEmpty(EXPAT_PATH){
      LIBS+=  -L$${EXPAT_PATH}/lib
      INCLUDEPATH += $${EXPAT_PATH}/include
  }
  !isEmpty(SBML_PATH){
      LIBS+=  -L$${SBML_PATH}/lib
      INCLUDEPATH += $${SBML_PATH}/include
  }

  LIBS += -lsbml -lexpat

# The raptor library
  LIBS += -lraptor
  !isEmpty(RAPTOR_PATH){
      LIBS+=  -L$${RAPTOR_PATH}/lib
      INCLUDEPATH += $${RAPTOR_PATH}/include
  }

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      LIBS+=  $${SBW_PATH}/lib/libSBW.a
      INCLUDEPATH += $${SBW_PATH}/include
      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES += LINUX SOLARIS
    }

    !isEmpty(QWT_PATH){
       LIBS+=  -L$${QWT_PATH}/lib
       INCLUDEPATH += $${QWT_PATH}/include
    }
    LIBS += -lqwt

    !isEmpty(QWT3D_PATH){
      LIBS += -L$${QWT3D_PATH}/lib/
      INCLUDEPATH += $${QWT3D_PATH}/include
    } else {
      LIBS += -lqwtplot3d
    }

    LIBS += -lSM
  } else {
    QMAKE_LIBS_THREAD -= -lpthread
    QMAKE_LIBS_THREAD -= -lrt
  }
}

contains(BUILD_OS, Linux) {
  release {
    contains(TEMPLATE, app) {
      QMAKE_POST_LINK = strip $(TARGET)
    }
  }

  contains(PACKAGE, yes) {
    QMAKE_LFLAGS -= -static
  }
  else {
    contains(STATIC_LINKAGE, yes) {
      QMAKE_LFLAGS += -static
    }
    else {
      QMAKE_LFLAGS -= -static
    }
  }

  !isEmpty(SBML_PATH){
    INCLUDEPATH += $${SBML_PATH}/include
    INCLUDEPATH += $${SBML_PATH}/include/sbml

    contains(PACKAGE, yes) {
      LIBS += $${SBML_PATH}/lib/libsbml.a
    }
    else {
      LIBS += -L$${SBML_PATH}/lib
      LIBS += -lsbml
    }
  }
  else {
    contains(PACKAGE, yes) {
      error("SBML_PATH must be given.")
    }
    else {
      LIBS += -lsbml
    }
  }

  !isEmpty(EXPAT_PATH){
    INCLUDEPATH += $${EXPAT_PATH}/include

    contains(PACKAGE, yes) {
      LIBS += $${EXPAT_PATH}/lib/libexpat.a
    }
    else {
      LIBS += -L$${EXPAT_PATH}/lib
      LIBS += -lexpat
    }
  }
  else {
    contains(PACKAGE, yes) {
      error("EXPAT_PATH must be given.")
    }
    else {
      LIBS += -lexpat
    }
  }

# The raptor library
  !isEmpty(RAPTOR_PATH){
      LIBS +=  -L$${RAPTOR_PATH}/lib
      INCLUDEPATH += $${RAPTOR_PATH}/include

    contains(PACKAGE, yes) {
      LIBS += $${RAPTOR_PATH}/lib/libraptor.a
    }
    else {
      LIBS += -L$${RAPTOR_PATH}/lib
      LIBS += -lraptor
    }
  }
  else {
    contains(PACKAGE, yes) {
      error("RAPTOR_PATH must be given.")
    }
    else {
      LIBS += -lraptor
    }
  }

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    INCLUDEPATH += $${MKL_PATH}/include
#    LIBS += -lmkl_lapack -lmkl_ia32 -lg2c -lpthread
    LIBS += -lmkl_lapack -lmkl_ia32 -lguide -lpthread
    LIBS  +=  -L$${MKL_PATH}/lib/32
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      INCLUDEPATH += $${CLAPACK_PATH}/include
#      LIBS += -llapack -lblas -lF77 -lfl
      LIBS += -llapack -lblas -lF77
      LIBS += -L$${CLAPACK_PATH}/lib
    } else {
      !isEmpty(LAPACK_PATH) {
        message("Using lapack.")
        DEFINES += USE_LAPACK
        INCLUDEPATH += $${LAPACK_PATH}/include

        contains(PACKAGE, yes) {
          LIBS += $${LAPACK_PATH}/lib/liblapack.a
          LIBS += $${LAPACK_PATH}/lib/libblas.a
          LIBS += $$system(locate libg2c.a)
        }
        else {
          LIBS += -L$${LAPACK_PATH}/lib
          LIBS += -llapack
          LIBS += -lblas
          HAVE_G2C = $$system(locate libg2c)
          !isEmpty(HAVE_G2C) LIBS += -lg2c
        }
      } else {
        error( "Either MKL_PATH, CLAPACK_PATH, or LAPACK_PATH must be specified" )
      }
    }
  }

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      LIBS+=  $${SBW_PATH}/lib/libSBW.a
      INCLUDEPATH += $${SBW_PATH}/include
      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES += LINUX
    }

    !isEmpty(QWT_PATH){
       LIBS +=  -L$${QWT_PATH}/lib
       INCLUDEPATH += $${QWT_PATH}/include
    }
    LIBS += -lqwt

    !isEmpty(QWT3D_PATH){
      LIBS += -L$${QWT3D_PATH}/lib/
      INCLUDEPATH += $${QWT3D_PATH}/include
    } else {
      LIBS += -lqwtplot3d
    }
  }
}

DEP1.target   = depend
DEP1.depends  = qmake

QMAKE_EXTRA_UNIX_TARGETS += DEP1

!equals(TEMPLATE, subdirs) {
  # Copy the sources for the tar ball
  src_distribution.depends = Makefile
  src_distribution.commands =   \
    $(CHK_DIR_EXISTS) ../../copasi_src || $(MKDIR) ../../copasi_src; \
    $(CHK_DIR_EXISTS) ../../copasi_src/copasi || \
      $(MKDIR) ../../copasi_src/copasi; \
    $(CHK_DIR_EXISTS) ../../copasi_src/copasi/$$SRC_TARGET || \
      $(MKDIR) ../../copasi_src/copasi/$$SRC_TARGET; \
    $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) \
      ../../copasi_src/copasi/$$SRC_TARGET/

  QMAKE_EXTRA_UNIX_TARGETS += src_distribution
}

# addSubdirs(subdirs,deps): Adds directories to the project that depend on
# other directories
defineTest(addSubdirs) {
    for(subdirs, 1) {
        entries = $$files($$subdirs)
        for(entry, entries) {
            name = $$replace(entry, [/\\\\], _)
            SUBDIRS += $$name
            eval ($${name}.subdir = $$entry)
            for(dep, 2):eval ($${name}.depends += $$replace(dep, [/\\\\], _))
            export ($${name}.subdir)
            export ($${name}.depends)
        }
    }
    export (SUBDIRS)
}

# Begin CVS Header
#   $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/common.pri,v $
#   $Revision: 1.100 $
#   $Name:  $
#   $Author: shoops $
#   $Date: 2009/02/02 18:09:57 $
# End CVS Header

# Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc., EML Research, gGmbH, University of Heidelberg,
# and The University of Manchester.
# All rights reserved.

# Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc. and EML Research, gGmbH.
# All rights reserved.

######################################################################
# $Revision: 1.100 $ $Author: shoops $ $Date: 2009/02/02 18:09:57 $
######################################################################

# In the case the BUILD_OS is not specified we make a guess.
isEmpty(BUILD_OS) {
  win32 {
    BUILD_OS = WIN32

    MY_QT4DIR = $$system(echo %QT4DIR%)
    contains(MY_QT4DIR, %QT4DIR%) {
      MY_QTDIR = $$system(echo %QTDIR%)
      contains(MY_QTDIR, %QTDIR%) {
        QMAKE_QMAKE = qmake.exe
        !build_pass: message("Configuring for $${BUILD_OS} with QTDIR=???.")
      } else {
        QMAKE_QMAKE = $(QTDIR)\bin\qmake.exe
        !build_pass: message("Configuring for $${BUILD_OS} with QTDIR=$(QTDIR).")
      }
	} else {
      !build_pass: message("Configuring for $${BUILD_OS} with QTDIR=$(QT4DIR).")
	}

  } else {
    BUILD_OS = $$system(uname)
    message("Configuring for $${BUILD_OS} with QTDIR=$(QTDIR).")
  }
}
DEFINES += $$BUILD_OS

TARGETDEPS += Makefile

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

#ifdef COPASI_LICENSE_COM
# COPASI License to use
DEFINES -= COPASI_LICENSE_US
DEFINES -= COPASI_LICENSE_DE
DEFINES -= COPASI_LICENSE_COM
DEFINES += COPASI_LICENSE_$$USE_LICENSE
#endif // COPASI_LICENSE_COM

INCLUDEPATH += ../..
QMAKE_CFLAGS   += $$(CFLAGS)
QMAKE_CXXFLAGS += $$(CXXFLAGS)
QMAKE_LFLAGS  += $$(LDFLAGS)

DEFINES += COPASI_TSSA

debug {
  DEFINES += COPASI_DEBUG

  isEmpty(COPASI_SRC_PACKAGE) {
    # DEFINES += COPASI_TSS
    #  stoichiometric stability analysis:
    # DEFINES += COPASI_SSA
  }
}

isEmpty(COPASI_SRC_PACKAGE) {
  DEFINES += HAVE_MML
}

contains(STATIC_LINKAGE, yes) {
  DEFINES+=XML_STATIC
  DEFINES+=LIBSBML_STATIC
  DEFINES+=LIBLAX_STATIC
  DEFINES+=RAPTOR_STATIC
  DEFINES+=SBW_STATIC
}

!contains(BUILD_OS, WIN32) {
  #Release code optimization
  QMAKE_CFLAGS_RELEASE -= -O1
  QMAKE_CFLAGS_RELEASE -= -O2
  QMAKE_CFLAGS_RELEASE -= -O4
  QMAKE_CFLAGS_RELEASE += -O3

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE -= -O2
  QMAKE_CXXFLAGS_RELEASE -= -O4
  QMAKE_CXXFLAGS_RELEASE += -O3

  QMAKE_LEX = ../../admin/flex.sh
  QMAKE_YACC = ../../admin/yacc.sh

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

contains(BUILD_OS, Darwin) {
  release {
    contains(TEMPLATE, app) {
      QMAKE_POST_LINK = strip $(TARGET)
    }
  }

  INCLUDEPATH += /System/Library/Frameworks/Accelerate.framework/Headers
  INCLUDEPATH += /System/Library/Frameworks/Carbon.framework/Headers

  !isEmpty(SBML_PATH){
    LIBS +=  $${SBML_PATH}/lib/libsbml.a
    INCLUDEPATH += $${SBML_PATH}/include
  } else {
    LIBS += -lsbml
  }

  !isEmpty(EXPAT_PATH){
    LIBS+=  $${EXPAT_PATH}/lib/libexpat.a
    INCLUDEPATH += $${EXPAT_PATH}/include
  } else {
    LIBS += -lexpat
  }

  !isEmpty(RAPTOR_PATH){
    LIBS+=  $${RAPTOR_PATH}/lib/libraptor.a
    INCLUDEPATH += $${RAPTOR_PATH}/include
  } else {
    LIBS += -lraptor
  }

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      LIBS+=  $${SBW_PATH}/lib/libSBW.a
      INCLUDEPATH += $${SBW_PATH}/include
      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES += LINUX DARWIN
    }

    !isEmpty(QWT_PATH){
       LIBS+=  $${QWT_PATH}/lib/libqwt.a
       INCLUDEPATH += $${QWT_PATH}/include
    } else {
      LIBS += -lqwt
    }

    !isEmpty(QWT3D_PATH){
      LIBS +=  $${QWT3D_PATH}/lib/libqwtplot3d.a
      INCLUDEPATH += $${QWT3D_PATH}/include
    } else {
      LIBS += -lqwtplot3d
    }
  }

  LIBS += -framework Accelerate
  LIBS += -framework Carbon
  LIBS += -framework QuickTime
  LIBS += -lz
}

contains(BUILD_OS, WIN32) {
  QMAKE_LEX = C:\cygwin\bin\bash ../../admin/flex.sh
  QMAKE_YACC = C:\cygwin\bin\bash ../../admin/yacc.sh

  DEFINES -= UNICODE

  debug {
    QMAKE_LFLAGS += /NODEFAULTLIB:\"msvcrt.lib\"
  }

  QMAKE_LFLAGS += /NODEFAULTLIB:\"libcmt.lib\"

  #Release code optimization
  QMAKE_CFLAGS_RELEASE -= -O1
  QMAKE_CFLAGS_RELEASE += -O2

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE += -O2

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    QMAKE_CXXFLAGS += -I\"$${MKL_PATH}\include\"
    QMAKE_LFLAGS += /LIBPATH:\"$${MKL_PATH}\ia32\lib\"
    QMAKE_LFLAGS += /LIBPATH:\"$${MKL_PATH}\..\Compiler\C++\9.0\IA32\Lib\"
    LIBS += mkl_c.lib
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      QMAKE_CXXFLAGS   += -I\"$${CLAPACK_PATH}\include\"
      QMAKE_LFLAGS += /LIBPATH:\"$${CLAPACK_PATH}\lib\"
      LIBS += clapack.lib
    } else {
      error( "Either MKL_PATH or CLAPACK_PATH must be specified" )
    }
  }

  !isEmpty(EXPAT_PATH) {
    QMAKE_CXXFLAGS   += -I\"$${EXPAT_PATH}\Source\lib\"
    QMAKE_CXXFLAGS   += -I\"$${EXPAT_PATH}\include\"
    QMAKE_LFLAGS += /LIBPATH:\"$${EXPAT_PATH}\StaticLibs\"
    QMAKE_LFLAGS += /LIBPATH:\"$${EXPAT_PATH}\bin\"
    QMAKE_LFLAGS += /LIBPATH:\"$${EXPAT_PATH}\lib\"
    contains(STATIC_LINKAGE, yes) {
      LIBS += libexpatMT.lib
    } else {
      LIBS += libexpat.lib
    }
  } else {
    error( "EXPAT_PATH must be specified" )
  }

  # Add libsbml
  win32-msvc2005 {
    contains(STATIC_LINKAGE, yes) {
      release: LIBS += libsbmlStatic.lib
      debug:   LIBS += libsbmlStaticD.lib
    } else {
      release: LIBS += libsbml.lib
      debug:   LIBS += libsbmlD.lib
    }
  } else {
    LIBS += libsbml.lib
  }

  !isEmpty(SBML_PATH) {
    QMAKE_CXXFLAGS   += -I\"$${SBML_PATH}\include\"
    QMAKE_LFLAGS += /LIBPATH:\"$${SBML_PATH}\lib\"
    QMAKE_LFLAGS += /LIBPATH:\"$${SBML_PATH}\bin\"
  } else {
    error( "SBML_PATH must be specified" )
  }

# The raptor library
  contains(STATIC_LINKAGE, yes) {
    release: LIBS += raptorStatic.lib
    debug:   LIBS += raptorStaticD.lib
  } else {
    release: LIBS += raptor.lib
    debug:   LIBS += raptorD.lib
  }

  !isEmpty(RAPTOR_PATH) {
    QMAKE_CXXFLAGS   += -I\"$${RAPTOR_PATH}\include\"
    QMAKE_LFLAGS += /LIBPATH:\"$${RAPTOR_PATH}\lib\"
  } else {
    error( "RAPTOR_PATH must be specified" )
  }

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      contains(STATIC_LINKAGE, yes) {
        release: LIBS += SBWStatic.lib
        debug:   LIBS += SBWStaticD.lib

        LIBS += Ws2_32.lib
      } else {
        release: LIBS += SBW.lib
        debug:   LIBS += SBWD.lib
      }

      INCLUDEPATH += $${SBW_PATH}/include
      QMAKE_LFLAGS += /LIBPATH:\"$${SBW_PATH}\lib\"

      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES *= WIN32
    }

    LIBS += -lqwt

    release: LIBS += -lqwtplot3d
    debug: LIBS += -lqwtplot3dD
  }
}

contains(BUILD_OS, SunOS) {
contains(STATIC_LINKAGE, yes) {
# :TODO: This should be set through configure.
  LIBS += -L/export/home/shoops/copasi/gcc/lib
}

  release {
    contains(TEMPLATE, app) {
# Note: This must be the SunOS strip command.
      QMAKE_POST_LINK = /usr/ccs/bin/strip $(TARGET)
    }
  }

  !isEmpty(CLAPACK_PATH) {
    DEFINES += USE_CLAPACK
    INCLUDEPATH += $${CLAPACK_PATH}/include
#    LIBS += -llapack -lblas -lF77 -lfl
    LIBS += -llapack -lblas -lF77
    LIBS += -L$${CLAPACK_PATH}/lib
  } else {
    !isEmpty(LAPACK_PATH) {
      message("Using lapack.")
      DEFINES += USE_LAPACK
      INCLUDEPATH += $${LAPACK_PATH}/include
      LIBS += -llapack -lblas  -lg2c
      LIBS += -L$${LAPACK_PATH}/lib
    } else {
      message("Using sunperf.")
      DEFINES += USE_SUNPERF
      LIBS += -lsunperf
      QMAKE_CFLAGS   += -dalign
      QMAKE_CXXFLAGS   += -dalign
    }
  }
  !isEmpty(EXPAT_PATH){
      LIBS+=  -L$${EXPAT_PATH}/lib
      INCLUDEPATH += $${EXPAT_PATH}/include
  }
  !isEmpty(SBML_PATH){
      LIBS+=  -L$${SBML_PATH}/lib
      INCLUDEPATH += $${SBML_PATH}/include
  }

  LIBS += -lsbml -lexpat

# The raptor library
  LIBS += -lraptor
  !isEmpty(RAPTOR_PATH){
      LIBS+=  -L$${RAPTOR_PATH}/lib
      INCLUDEPATH += $${RAPTOR_PATH}/include
  }

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      LIBS+=  $${SBW_PATH}/lib/libSBW.a
      INCLUDEPATH += $${SBW_PATH}/include
      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES += LINUX SOLARIS
    }

    !isEmpty(QWT_PATH){
       LIBS+=  -L$${QWT_PATH}/lib
       INCLUDEPATH += $${QWT_PATH}/include
    }
    LIBS += -lqwt

    !isEmpty(QWT3D_PATH){
      LIBS += -L$${QWT3D_PATH}/lib/
      INCLUDEPATH += $${QWT3D_PATH}/include
    } else {
      LIBS += -lqwtplot3d
    }

    LIBS += -lSM
  } else {
    QMAKE_LIBS_THREAD -= -lpthread
    QMAKE_LIBS_THREAD -= -lrt
  }
}

contains(BUILD_OS, Linux) {
  release {
    contains(TEMPLATE, app) {
      QMAKE_POST_LINK = strip $(TARGET)
    }
  }

  contains(PACKAGE, yes) {
    QMAKE_LFLAGS -= -static
  }
  else {
    contains(STATIC_LINKAGE, yes) {
      QMAKE_LFLAGS += -static
    }
    else {
      QMAKE_LFLAGS -= -static
    }
  }

  !isEmpty(SBML_PATH){
    INCLUDEPATH += $${SBML_PATH}/include
    INCLUDEPATH += $${SBML_PATH}/include/sbml

    contains(PACKAGE, yes) {
      LIBS += $${SBML_PATH}/lib/libsbml.a
    }
    else {
      LIBS += -L$${SBML_PATH}/lib
      LIBS += -lsbml
    }
  }
  else {
    contains(PACKAGE, yes) {
      error("SBML_PATH must be given.")
    }
    else {
      LIBS += -lsbml
    }
  }

  !isEmpty(EXPAT_PATH){
    INCLUDEPATH += $${EXPAT_PATH}/include

    contains(PACKAGE, yes) {
      LIBS += $${EXPAT_PATH}/lib/libexpat.a
    }
    else {
      LIBS += -L$${EXPAT_PATH}/lib
      LIBS += -lexpat
    }
  }
  else {
    contains(PACKAGE, yes) {
      error("EXPAT_PATH must be given.")
    }
    else {
      LIBS += -lexpat
    }
  }

# The raptor library
  !isEmpty(RAPTOR_PATH){
      LIBS +=  -L$${RAPTOR_PATH}/lib
      INCLUDEPATH += $${RAPTOR_PATH}/include

    contains(PACKAGE, yes) {
      LIBS += $${RAPTOR_PATH}/lib/libraptor.a
    }
    else {
      LIBS += -L$${RAPTOR_PATH}/lib
      LIBS += -lraptor
    }
  }
  else {
    contains(PACKAGE, yes) {
      error("RAPTOR_PATH must be given.")
    }
    else {
      LIBS += -lraptor
    }
  }

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    INCLUDEPATH += $${MKL_PATH}/include
#    LIBS += -lmkl_lapack -lmkl_ia32 -lg2c -lpthread
    LIBS += -lmkl_lapack -lmkl_ia32 -lguide -lpthread
    LIBS  +=  -L$${MKL_PATH}/lib/32
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      INCLUDEPATH += $${CLAPACK_PATH}/include
#      LIBS += -llapack -lblas -lF77 -lfl
      LIBS += -llapack -lblas -lF77
      LIBS += -L$${CLAPACK_PATH}/lib
    } else {
      !isEmpty(LAPACK_PATH) {
        message("Using lapack.")
        DEFINES += USE_LAPACK
        INCLUDEPATH += $${LAPACK_PATH}/include

        contains(PACKAGE, yes) {
          LIBS += $${LAPACK_PATH}/lib/liblapack.a
          LIBS += $${LAPACK_PATH}/lib/libblas.a
          LIBS += $$system(locate libg2c.a)
        }
        else {
          LIBS += -L$${LAPACK_PATH}/lib
          LIBS += -llapack
          LIBS += -lblas
          HAVE_G2C = $$system(locate libg2c)
          !isEmpty(HAVE_G2C) LIBS += -lg2c
        }
      } else {
        error( "Either MKL_PATH, CLAPACK_PATH, or LAPACK_PATH must be specified" )
      }
    }
  }

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      LIBS+=  $${SBW_PATH}/lib/libSBW.a
      INCLUDEPATH += $${SBW_PATH}/include
      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES += LINUX
    }

    !isEmpty(QWT_PATH){
       LIBS +=  -L$${QWT_PATH}/lib
       INCLUDEPATH += $${QWT_PATH}/include
    }
    LIBS += -lqwt

    !isEmpty(QWT3D_PATH){
      LIBS += -L$${QWT3D_PATH}/lib/
      INCLUDEPATH += $${QWT3D_PATH}/include
    } else {
      LIBS += -lqwtplot3d
    }
  }
}

DEP1.target   = depend
DEP1.depends  = qmake

QMAKE_EXTRA_UNIX_TARGETS += DEP1

!equals(TEMPLATE, subdirs) {
  # Copy the sources for the tar ball
  src_distribution.depends = Makefile
  src_distribution.commands =   \
    $(CHK_DIR_EXISTS) ../../copasi_src || $(MKDIR) ../../copasi_src; \
    $(CHK_DIR_EXISTS) ../../copasi_src/copasi || \
      $(MKDIR) ../../copasi_src/copasi; \
    $(CHK_DIR_EXISTS) ../../copasi_src/copasi/$$SRC_TARGET || \
      $(MKDIR) ../../copasi_src/copasi/$$SRC_TARGET; \
    $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) \
      ../../copasi_src/copasi/$$SRC_TARGET/

  QMAKE_EXTRA_UNIX_TARGETS += src_distribution
}

# addSubdirs(subdirs,deps): Adds directories to the project that depend on
# other directories
defineTest(addSubdirs) {
    for(subdirs, 1) {
        entries = $$files($$subdirs)
        for(entry, entries) {
            name = $$replace(entry, [/\\\\], _)
            SUBDIRS += $$name
            eval ($${name}.subdir = $$entry)
            for(dep, 2):eval ($${name}.depends += $$replace(dep, [/\\\\], _))
            export ($${name}.subdir)
            export ($${name}.depends)
        }
    }
    export (SUBDIRS)
}


Fix xp artifacts

Fix xp artifacts

VERSION = $$cat(version.txt)

PRODUCT_VERSION = $$(PRODUCT_VERSION)
BUILD_NUMBER = $$(BUILD_NUMBER)

!isEmpty(PRODUCT_VERSION){
    !isEmpty(BUILD_NUMBER){
        VERSION = $${PRODUCT_VERSION}.$${BUILD_NUMBER}
	}
}

DEFINES += INTVER=$$VERSION

PUBLISHER_NAME = $$(PUBLISHER_NAME)
isEmpty(PUBLISHER_NAME){
    PUBLISHER_NAME = $$cat(copyright.txt)
}

win32 {
    CURRENT_YEAR = $$system("echo %Date:~6,4%")
}

!win32 {
    CURRENT_YEAR = $$system(date +%Y)
}

QMAKE_TARGET_COMPANY = $$PUBLISHER_NAME
QMAKE_TARGET_COPYRIGHT = Copyright (C) $${PUBLISHER_NAME} $${CURRENT_YEAR}. All rights reserved

# CONFIGURATION
CONFIG(debug, debug|release) {
    CONFIG += core_debug
} else {
    CONFIG += core_release
}

not_use_dynamic_libs {
shared {
    CONFIG -= shared
    CONFIG -= plugin
    CONFIG += staticlib
}
}

#PLATFORM
win32 {
    CONFIG += core_windows

    WINDOWS_VERSION_XP = $$(WINDOWS_VERSION_XP)
    !isEmpty(WINDOWS_VERSION_XP) {
        CONFIG += build_xp
        message(xp using)
    }
}

DST_ARCH=$$QMAKE_TARGET.arch
isEqual(QT_MAJOR_VERSION, 5) {
    DST_ARCH=$$QT_ARCH
    # QT_ARCH uses 'i386' instead of 'x86',
    # so map that value back to what we expect.
    equals(DST_ARCH, i386) {
        DST_ARCH=x86
    }
}

ios {
    CONFIG += core_ios
    DEFINES += _IOS IOS LINUX _LINUX MAC _MAC _XCODE
}
android {
    CONFIG += core_android
    DEFINES += __ANDROID__ LINUX _LINUX
}

win32:contains(QMAKE_TARGET.arch, x86_64): {
    CONFIG += core_win_64
}
win32:!contains(QMAKE_TARGET.arch, x86_64): {
    CONFIG += core_win_32
}

linux-g++ {
    CONFIG += core_linux
linux-g++:contains(QMAKE_HOST.arch, x86_64): {
    message("linux-64")
    CONFIG += core_linux_64
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64): {
    message("linux-32")
    CONFIG += core_linux_32
}
linux-g++:contains(DST_ARCH, arm): {
    message("arm")
    CONFIG += core_linux_arm
    DEFINES += LINUX_ARM
}
}

linux-g++-64 {
    message("linux-64")
    CONFIG += core_linux
    CONFIG += core_linux_64
}
linux-g++-32 {
    message("linux-32")
    CONFIG += core_linux
    CONFIG += core_linux_32
}

mac {
    !core_ios {
        CONFIG += core_mac
        CONFIG += core_mac_64
    }
}

# DEFINES
core_windows {
    DEFINES += WIN32 _WIN32
    DEFINES += NOMINMAX
}
core_win_64 {
    DEFINES += WIN64 _WIN64
}

core_linux {
    DEFINES += LINUX _LINUX
}

core_mac {
    DEFINES += LINUX _LINUX MAC _MAC
    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
}

# PREFIXES
core_windows {
    CONFIG -= debug_and_release debug_and_release_target
    QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
    QMAKE_CXXFLAGS -= -Zc:strictStrings
    QMAKE_CXXFLAGS += /MP

    equals(TEMPLATE, app) {
        console {
            core_win_64:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.02
            core_win_32:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.01
        } else {
            core_win_64:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWS,5.02
            core_win_32:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWS,5.01
        }
    }
}

core_linux {
    equals(TEMPLATE, app) {
        QMAKE_LFLAGS += -Wl,--rpath=./:./system
    }
}

core_win_32 {
    CORE_BUILDS_PLATFORM_PREFIX = win_32
}
core_win_64 {
    CORE_BUILDS_PLATFORM_PREFIX = win_64
}
core_linux_32 {
    CORE_BUILDS_PLATFORM_PREFIX = linux_32
}
core_linux_64 {
    CORE_BUILDS_PLATFORM_PREFIX = linux_64
}
core_mac_64 {
    CORE_BUILDS_PLATFORM_PREFIX = mac_64
}
core_linux_arm {
    CORE_BUILDS_PLATFORM_PREFIX = arm
}
core_ios {
    CORE_BUILDS_PLATFORM_PREFIX = ios

    CONFIG(iphonesimulator, iphoneos|iphonesimulator): {
        message("iphonesimulator")
        CORE_BUILDS_PLATFORM_PREFIX = ios_simulator
    } else {

        QMAKE_IOS_DEPLOYMENT_TARGET = 10.0
        CONFIG += core_ios_main_arch

        QMAKE_CFLAGS += -fembed-bitcode
        QMAKE_CXXFLAGS += -fembed-bitcode
        QMAKE_LFLAGS += -fembed-bitcode

        core_ios_main_arch {
            QMAKE_APPLE_DEVICE_ARCHS = arm64
            core_ios_no_simulator_arch : QMAKE_APPLE_SIMULATOR_ARCHS=

            !core_ios_no_32 {
                QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS armv7
            }
        } else {
            plugin : TARGET = $$join(TARGET, TARGET, "", "_addition")
            QMAKE_APPLE_DEVICE_ARCHS=
            QMAKE_APPLE_SIMULATOR_ARCHS=
        }

        core_ios_nomain_arch {
            QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS arm64e
            !core_ios_no_32 {
                QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS armv7s
            }
        }

        !no_verify_bitcode {
            # for application: (using xcodebuild)
            #Q_ENABLE_BITCODE.name = ENABLE_BITCODE
            #Q_ENABLE_BITCODE.value = NO
            #
            #Q_BITCODE_GENERATION_MODE.name = BITCODE_GENERATION_MODE
            #Q_BITCODE_GENERATION_MODE.value = marker
            #
            #QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
            #QMAKE_MAC_XCODE_SETTINGS += Q_BITCODE_GENERATION_MODE

            # for libraries
            !core_debug {
                QMAKE_LFLAGS += -Xlinker -bitcode_verify
                QMAKE_LFLAGS += -Xlinker -bitcode_hide_symbols
                #QMAKE_LFLAGS += -Xlinker -bitcode_symbol_map -Xlinker $$CORE_BUILDS_LIBRARIES_PATH
            }
        }
    }

    !core_ios_no_unistd {
        DEFINES += HAVE_UNISTD_H
    }
}
core_android {
    equals(QT_ARCH, arm): CORE_BUILDS_PLATFORM_PREFIX = android_arm
    equals(QT_ARCH, i386): CORE_BUILDS_PLATFORM_PREFIX = android_x86
}

core_debug {
    CORE_BUILDS_CONFIGURATION_PREFIX    = debug
}
core_release {
    CORE_BUILDS_CONFIGURATION_PREFIX    = release
}

# MESSAGE
message($$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX)

# COMPILER
CONFIG += c++11

core_linux {
core_static_link_libstd {
    QMAKE_LFLAGS += -static-libstdc++ -static-libgcc
    message(core_static_link_libstd)
}
plugin {
    QMAKE_CXXFLAGS += -fvisibility=hidden
    QMAKE_CFLAGS += -fvisibility=hidden

    TARGET_EXT = .so
}
}

core_mac {
plugin {
    QMAKE_CXXFLAGS += -fvisibility=hidden
    QMAKE_CFLAGS += -fvisibility=hidden
}
}

core_windows {
plugin {
    TARGET_EXT = .dll
}
}

# BUILD_PATHS
# MUST BE DEFINED CORE_ROOT_DIR
!core_no_dst {
DESTDIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX
OBJECTS_DIR = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/obj
MOC_DIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/moc
RCC_DIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/rcc
UI_DIR      = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/ui
build_xp {
    DESTDIR     = $DESTDIR/xp
    OBJECTS_DIR = $OBJECTS_DIR/xp
    MOC_DIR     = $MOC_DIR/xp
    RCC_DIR     = $RCC_DIR/xp
    UI_DIR      = $UI_DIR/xp
}
}

CORE_BUILDS_LIBRARIES_PATH = $$CORE_ROOT_DIR/build/lib/$$CORE_BUILDS_PLATFORM_PREFIX
CORE_BUILDS_BINARY_PATH = $$CORE_ROOT_DIR/build/bin/$$CORE_BUILDS_PLATFORM_PREFIX

OO_BUILD_BRANDING = $$(OO_BRANDING)
!isEmpty(OO_BUILD_BRANDING) {
    CORE_BUILDS_LIBRARIES_PATH = $$CORE_ROOT_DIR/build/$$OO_BUILD_BRANDING/lib/$$CORE_BUILDS_PLATFORM_PREFIX
    CORE_BUILDS_BINARY_PATH = $$CORE_ROOT_DIR/build/$$OO_BUILD_BRANDING/bin/$$CORE_BUILDS_PLATFORM_PREFIX
}

core_debug {
    CORE_BUILDS_LIBRARIES_PATH = $$CORE_BUILDS_LIBRARIES_PATH/debug
    CORE_BUILDS_BINARY_PATH = $$CORE_BUILDS_BINARY_PATH/debug
}

plugin {
    DESTDIR = $$CORE_BUILDS_LIBRARIES_PATH
}
staticlib {
    DESTDIR = $$CORE_BUILDS_LIBRARIES_PATH
}

core_x2t {
core_windows {
    QMAKE_CXXFLAGS += /bigobj
} else {
    QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
}

DEFINES += CRYPTOPP_DISABLE_ASM
}

core_ios {
    bundle_dylibs {
        plugin {
            CONFIG -= plugin
            CONFIG += lib_bundle

            QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
            #QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @executable_path/Frameworks
            #QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @loader_path/Frameworks

            # correct version to < 256
            VERSIONS = $$split(VERSION, ".")
            VERSION_1 = $$member(VERSIONS, 0)
            VERSION_2 = $$member(VERSIONS, 1)
            VERSION_3 = $$member(VERSIONS, 2)
            VERSION_4 = $$member(VERSIONS, 3)

            greaterThan(VERSION_1, 255): VERSION_1 = 255
            greaterThan(VERSION_2, 255): VERSION_2 = 255
            greaterThan(VERSION_3, 255): VERSION_3 = 255
            greaterThan(VERSION_4, 255): VERSION_4 = 255

            VERSION_CORRECT = $$VERSION_1
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_2)
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_3)
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_4)

            VERSION = $$VERSION_CORRECT
        }
    }
}

defineTest(ADD_DEPENDENCY) {
    libs = $$ARGS
    for(lib, libs) {
        CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH
        build_xp {
            isEqual(lib, doctrenderer):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, ascdocumentscore):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, videoplayer):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
        }
        !bundle_dylibs:LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH_DST -l$$lib
        bundle_dylibs:LIBS += -F$$CORE_BUILDS_LIBRARIES_PATH_DST -framework $$lib
    }
    export(LIBS)
}

VERSION = $$cat(version.txt)

PRODUCT_VERSION = $$(PRODUCT_VERSION)
BUILD_NUMBER = $$(BUILD_NUMBER)

!isEmpty(PRODUCT_VERSION){
    !isEmpty(BUILD_NUMBER){
        VERSION = $${PRODUCT_VERSION}.$${BUILD_NUMBER}
	}
}

DEFINES += INTVER=$$VERSION

PUBLISHER_NAME = $$(PUBLISHER_NAME)
isEmpty(PUBLISHER_NAME){
    PUBLISHER_NAME = $$cat(copyright.txt)
}

win32 {
    CURRENT_YEAR = $$system("echo %Date:~6,4%")
}

!win32 {
    CURRENT_YEAR = $$system(date +%Y)
}

QMAKE_TARGET_COMPANY = $$PUBLISHER_NAME
QMAKE_TARGET_COPYRIGHT = Copyright (C) $${PUBLISHER_NAME} $${CURRENT_YEAR}. All rights reserved

# CONFIGURATION
CONFIG(debug, debug|release) {
    CONFIG += core_debug
} else {
    CONFIG += core_release
}

not_use_dynamic_libs {
shared {
    CONFIG -= shared
    CONFIG -= plugin
    CONFIG += staticlib
}
}

#PLATFORM
win32 {
    CONFIG += core_windows

    WINDOWS_VERSION_XP = $$(WINDOWS_VERSION_XP)
    !isEmpty(WINDOWS_VERSION_XP) {
        CONFIG += build_xp
        message(xp using)
    }
}

DST_ARCH=$$QMAKE_TARGET.arch
isEqual(QT_MAJOR_VERSION, 5) {
    DST_ARCH=$$QT_ARCH
    # QT_ARCH uses 'i386' instead of 'x86',
    # so map that value back to what we expect.
    equals(DST_ARCH, i386) {
        DST_ARCH=x86
    }
}

ios {
    CONFIG += core_ios
    DEFINES += _IOS IOS LINUX _LINUX MAC _MAC _XCODE
}
android {
    CONFIG += core_android
    DEFINES += __ANDROID__ LINUX _LINUX
}

win32:contains(QMAKE_TARGET.arch, x86_64): {
    CONFIG += core_win_64
}
win32:!contains(QMAKE_TARGET.arch, x86_64): {
    CONFIG += core_win_32
}

linux-g++ {
    CONFIG += core_linux
linux-g++:contains(QMAKE_HOST.arch, x86_64): {
    message("linux-64")
    CONFIG += core_linux_64
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64): {
    message("linux-32")
    CONFIG += core_linux_32
}
linux-g++:contains(DST_ARCH, arm): {
    message("arm")
    CONFIG += core_linux_arm
    DEFINES += LINUX_ARM
}
}

linux-g++-64 {
    message("linux-64")
    CONFIG += core_linux
    CONFIG += core_linux_64
}
linux-g++-32 {
    message("linux-32")
    CONFIG += core_linux
    CONFIG += core_linux_32
}

mac {
    !core_ios {
        CONFIG += core_mac
        CONFIG += core_mac_64
    }
}

# DEFINES
core_windows {
    DEFINES += WIN32 _WIN32
    DEFINES += NOMINMAX
}
core_win_64 {
    DEFINES += WIN64 _WIN64
}

core_linux {
    DEFINES += LINUX _LINUX
}

core_mac {
    DEFINES += LINUX _LINUX MAC _MAC
    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
}

# PREFIXES
core_windows {
    CONFIG -= debug_and_release debug_and_release_target
    QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
    QMAKE_CXXFLAGS -= -Zc:strictStrings
    QMAKE_CXXFLAGS += /MP

    equals(TEMPLATE, app) {
        console {
            core_win_64:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.02
            core_win_32:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.01
        } else {
            core_win_64:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWS,5.02
            core_win_32:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWS,5.01
        }
    }
}

core_linux {
    equals(TEMPLATE, app) {
        QMAKE_LFLAGS += -Wl,--rpath=./:./system
    }
}

core_win_32 {
    CORE_BUILDS_PLATFORM_PREFIX = win_32
}
core_win_64 {
    CORE_BUILDS_PLATFORM_PREFIX = win_64
}
core_linux_32 {
    CORE_BUILDS_PLATFORM_PREFIX = linux_32
}
core_linux_64 {
    CORE_BUILDS_PLATFORM_PREFIX = linux_64
}
core_mac_64 {
    CORE_BUILDS_PLATFORM_PREFIX = mac_64
}
core_linux_arm {
    CORE_BUILDS_PLATFORM_PREFIX = arm
}
core_ios {
    CORE_BUILDS_PLATFORM_PREFIX = ios

    CONFIG(iphonesimulator, iphoneos|iphonesimulator): {
        message("iphonesimulator")
        CORE_BUILDS_PLATFORM_PREFIX = ios_simulator
    } else {

        QMAKE_IOS_DEPLOYMENT_TARGET = 10.0
        CONFIG += core_ios_main_arch

        QMAKE_CFLAGS += -fembed-bitcode
        QMAKE_CXXFLAGS += -fembed-bitcode
        QMAKE_LFLAGS += -fembed-bitcode

        core_ios_main_arch {
            QMAKE_APPLE_DEVICE_ARCHS = arm64
            core_ios_no_simulator_arch : QMAKE_APPLE_SIMULATOR_ARCHS=

            !core_ios_no_32 {
                QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS armv7
            }
        } else {
            plugin : TARGET = $$join(TARGET, TARGET, "", "_addition")
            QMAKE_APPLE_DEVICE_ARCHS=
            QMAKE_APPLE_SIMULATOR_ARCHS=
        }

        core_ios_nomain_arch {
            QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS arm64e
            !core_ios_no_32 {
                QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS armv7s
            }
        }

        !no_verify_bitcode {
            # for application: (using xcodebuild)
            #Q_ENABLE_BITCODE.name = ENABLE_BITCODE
            #Q_ENABLE_BITCODE.value = NO
            #
            #Q_BITCODE_GENERATION_MODE.name = BITCODE_GENERATION_MODE
            #Q_BITCODE_GENERATION_MODE.value = marker
            #
            #QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
            #QMAKE_MAC_XCODE_SETTINGS += Q_BITCODE_GENERATION_MODE

            # for libraries
            !core_debug {
                QMAKE_LFLAGS += -Xlinker -bitcode_verify
                QMAKE_LFLAGS += -Xlinker -bitcode_hide_symbols
                #QMAKE_LFLAGS += -Xlinker -bitcode_symbol_map -Xlinker $$CORE_BUILDS_LIBRARIES_PATH
            }
        }
    }

    !core_ios_no_unistd {
        DEFINES += HAVE_UNISTD_H
    }
}
core_android {
    equals(QT_ARCH, arm): CORE_BUILDS_PLATFORM_PREFIX = android_arm
    equals(QT_ARCH, i386): CORE_BUILDS_PLATFORM_PREFIX = android_x86
}

core_debug {
    CORE_BUILDS_CONFIGURATION_PREFIX    = debug
}
core_release {
    CORE_BUILDS_CONFIGURATION_PREFIX    = release
}

# MESSAGE
message($$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX)

# COMPILER
CONFIG += c++11

core_linux {
core_static_link_libstd {
    QMAKE_LFLAGS += -static-libstdc++ -static-libgcc
    message(core_static_link_libstd)
}
plugin {
    QMAKE_CXXFLAGS += -fvisibility=hidden
    QMAKE_CFLAGS += -fvisibility=hidden

    TARGET_EXT = .so
}
}

core_mac {
plugin {
    QMAKE_CXXFLAGS += -fvisibility=hidden
    QMAKE_CFLAGS += -fvisibility=hidden
}
}

core_windows {
plugin {
    TARGET_EXT = .dll
}
}

# BUILD_PATHS
# MUST BE DEFINED CORE_ROOT_DIR
!core_no_dst {
DESTDIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX
OBJECTS_DIR = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/obj
MOC_DIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/moc
RCC_DIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/rcc
UI_DIR      = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/ui
}

CORE_BUILDS_LIBRARIES_PATH = $$CORE_ROOT_DIR/build/lib/$$CORE_BUILDS_PLATFORM_PREFIX
CORE_BUILDS_BINARY_PATH = $$CORE_ROOT_DIR/build/bin/$$CORE_BUILDS_PLATFORM_PREFIX

OO_BUILD_BRANDING = $$(OO_BRANDING)
!isEmpty(OO_BUILD_BRANDING) {
    CORE_BUILDS_LIBRARIES_PATH = $$CORE_ROOT_DIR/build/$$OO_BUILD_BRANDING/lib/$$CORE_BUILDS_PLATFORM_PREFIX
    CORE_BUILDS_BINARY_PATH = $$CORE_ROOT_DIR/build/$$OO_BUILD_BRANDING/bin/$$CORE_BUILDS_PLATFORM_PREFIX
}

core_debug {
    CORE_BUILDS_LIBRARIES_PATH = $$CORE_BUILDS_LIBRARIES_PATH/debug
    CORE_BUILDS_BINARY_PATH = $$CORE_BUILDS_BINARY_PATH/debug
}

plugin {
    DESTDIR = $$CORE_BUILDS_LIBRARIES_PATH
}
staticlib {
    DESTDIR = $$CORE_BUILDS_LIBRARIES_PATH
}

core_x2t {
core_windows {
    QMAKE_CXXFLAGS += /bigobj
} else {
    QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
}

DEFINES += CRYPTOPP_DISABLE_ASM
}

core_ios {
    bundle_dylibs {
        plugin {
            CONFIG -= plugin
            CONFIG += lib_bundle

            QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
            #QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @executable_path/Frameworks
            #QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @loader_path/Frameworks

            # correct version to < 256
            VERSIONS = $$split(VERSION, ".")
            VERSION_1 = $$member(VERSIONS, 0)
            VERSION_2 = $$member(VERSIONS, 1)
            VERSION_3 = $$member(VERSIONS, 2)
            VERSION_4 = $$member(VERSIONS, 3)

            greaterThan(VERSION_1, 255): VERSION_1 = 255
            greaterThan(VERSION_2, 255): VERSION_2 = 255
            greaterThan(VERSION_3, 255): VERSION_3 = 255
            greaterThan(VERSION_4, 255): VERSION_4 = 255

            VERSION_CORRECT = $$VERSION_1
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_2)
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_3)
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_4)

            VERSION = $$VERSION_CORRECT
        }
    }
}

defineTest(ADD_DEPENDENCY) {
    libs = $$ARGS
    for(lib, libs) {
        CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH
        build_xp {
            isEqual(lib, doctrenderer):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, ascdocumentscore):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, videoplayer):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
        }
        !bundle_dylibs:LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH_DST -l$$lib
        bundle_dylibs:LIBS += -F$$CORE_BUILDS_LIBRARIES_PATH_DST -framework $$lib
    }
    export(LIBS)
}