fix pro file

fix pro file

include($${PWD}/json.pri)
include($${PWD}/mylib/mylib.pri)

HEADERS +=$${PWD}/zstackprocessor.h \
   $${PWD}/zstack.hxx \
   $${PWD}/zlocalneuroseg.h \
   $${PWD}/zellipse.h \
   $${PWD}/zswctree.h \
   $${PWD}/zobject3d.h \
   $${PWD}/zcircle.h \
   $${PWD}/zpoint.h \
   $${PWD}/zdirectionaltemplate.h \
   $${PWD}/zlocalrect.h \
   $${PWD}/zsinglechannelstack.h \
   $${PWD}/zbenchtimer.h \
   $${PWD}/zspgrowparser.h \
   $${PWD}/zvoxel.h \
   $${PWD}/zvoxelarray.h \
   $${PWD}/zsuperpixelmap.h \
   $${PWD}/zsegmentmap.h \
   $${PWD}/zsuperpixelmaparray.h \
   $${PWD}/zsegmentmaparray.h \
   $${PWD}/zswcforest.h \
   $${PWD}/zqtheader.h \
   $${PWD}/zstackaccessor.h \
   $${PWD}/zswctreematcher.h \
   $${PWD}/zswcbranch.h \
   $${PWD}/zmatrix.h \
   $${PWD}/zinttree.h \
   $${PWD}/zstring.h \
   $${PWD}/zfilelist.h \
   $${PWD}/zrandomgenerator.h \
   $${PWD}/zfilelock.h \
   $${PWD}/zargumentprocessor.h \
   $${PWD}/flyem/zsynapseannotation.h \
   $${PWD}/flyem/zsynapseannotationarray.h \
   $${PWD}/flyem/zsynapseannotationmetadata.h \
   $${PWD}/flyem/zsynapseannotationanalyzer.h \
   $${PWD}/flyem/zfileparser.h \
   $${PWD}/flyem/zneuronnetwork.h \
   $${PWD}/zvaa3dmarker.h \
   $${PWD}/zvaa3dapo.h \
   $${PWD}/zswcnode.h \
   $${PWD}/zball.h \
   $${PWD}/ztreenode.h \
   $${PWD}/ztree.h \
   $${PWD}/zswctreenode.h \
   $${PWD}/zsquarematrix.h \
   $${PWD}/zsymmetricmatrix.h \
   $${PWD}/zsvggenerator.h \
   $${PWD}/zdendrogram.h \
   $${PWD}/zcuboid.h \
   $${PWD}/ztest.h \
   $${PWD}/zswcfeatureanalyzer.h \
   $${PWD}/zswcsizefeatureanalyzer.h \
   $${PWD}/zobject3darray.h \
   $${PWD}/zdoublevector.h \
   $${PWD}/zkmeansclustering.h \
   $${PWD}/zswcshollfeatureanalyzer.h \
   $${PWD}/zswcspatialfeatureanalyzer.h \
   $${PWD}/swctreenode.h \
   $${PWD}/zswcnetwork.h \
   $${PWD}/zcloudnetwork.h \
   $${PWD}/zweightedpoint.h \
   $${PWD}/zweightedpointarray.h \
   $${PWD}/zpointnetwork.h \
   $${PWD}/zswcpath.h \
   $${PWD}/zswctrunkanalyzer.h \
   $${PWD}/zswcdisttrunkanalyzer.h \
   $${PWD}/zswcbranchingtrunkanalyzer.h \
   $${PWD}/zswctrunksizefeatureanalyzer.h \
   $${PWD}/zpointarray.h \
   $${PWD}/flyem/zsynapselocationmatcher.h \
   $${PWD}/c_stack.h \
   $${PWD}/zfiletype.h \
   $${PWD}/flyem/zsynapselocationmetric.h \
   $${PWD}/zstackfile.h \
   $${PWD}/zxmldoc.h \
   $${PWD}/zintmap.h \
   $${PWD}/flyem/zsegmentationanalyzer.h \
   $${PWD}/flyem/zsegmentationbundle.h \
   $${PWD}/zstackblender.h \
   $${PWD}/zgraph.h \
   $${PWD}/zarray.h \
   $${PWD}/zintpairmap.h \
   $${PWD}/zswcsizetrunkanalyzer.h \
   $${PWD}/zswcweighttrunkanalyzer.h \
   $${PWD}/zdebug.h \
   $${PWD}/tubemodel.h \
   $${PWD}/zhdf5reader.h \
   $${PWD}/zhdf5_header.h \
   $${PWD}/zopencv_header.h \
   $${PWD}/neutubeconfig.h \
   $${PWD}/zhdf5writer.h \
   $${PWD}/flyem/zbcfset.h \
   $${PWD}/zstackskeletonizer.h \
   $${PWD}/zswclayerfeatureanalyzer.h \
   $${PWD}/flyem/zflyemneuron.h \
   $${PWD}/zswctypetrunkanalyzer.h \
   $${PWD}/zobject3dscan.h \
   $${PWD}/zswclayershollfeatureanalyzer.h \
   $${PWD}/zswclayertrunkanalyzer.h \
   $${PWD}/zlogmessagereporter.h \
   $${PWD}/zstackgraph.h\
   $${PWD}/zgraphcompressor.h \
   $${PWD}/zprogressreporter.h \
   $${PWD}/zstackdoccommand.h \
   $${PWD}/zcursorstore.h \
   $${PWD}/zmessagereporter.h \
   $${PWD}/zreportable.h \
   $${PWD}/zstackstatistics.h \
   $${PWD}/zswcconnector.h \
   $${PWD}/zprogressable.h \
   $${PWD}/zuncopyable.h \
   $${PWD}/biocytin/zstackprojector.h \
   $${PWD}/biocytin/swcprocessor.h \
   $${PWD}/zresolution.h \
   $${PWD}/zswcpositionadjuster.h \
   $${PWD}/zswcrangeanalyzer.h \
   $${PWD}/zellipsoid.h \
   $${PWD}/zswcnodeselector.h \
   $${PWD}/zswcnodezrangeselector.h \
   $${PWD}/zswcnodecompositeselector.h \
   $${PWD}/zswcnodeellipsoidrangeselector.h \
   $${PWD}/flyem/zstitchgrid.h \
   $${PWD}/flyem/zintcuboidarray.h \
   $${PWD}/flyem/zflyemqualityanalyzer.h \
   $${PWD}/flyem/zintcuboidcomposition.h \
   $${PWD}/zswcglobalfeatureanalyzer.h \
   $${PWD}/zswclocationanalyzer.h \
   $${PWD}/biocytin/zbiocytinfilenameparser.h \
   $${PWD}/zerror.h \
   $${PWD}/zhistogram.h \
   $${PWD}/misc/miscutility.h \
   $${PWD}/flyem/zflyemneuronrange.h \
   $${PWD}/flyem/zflyemneuronaxis.h \
   $${PWD}/zswcgenerator.h \
   $${PWD}/zpaintbundle.h \
   $${PWD}/zswcnodebufferfeatureanalyzer.h \
   $${PWD}/flyem/zflyemneuronrangecompare.h \
   $${PWD}/swc/zswcresampler.h \
   $${PWD}/swc/zswcmetric.h \
   $${PWD}/swc/zswcterminalsurfacemetric.h \
   $${PWD}/zapclustering.h \
   $${PWD}/swc/zswcterminalanglemetric.h \
   $${PWD}/swc/zswcdeepanglemetric.h \
   $${PWD}/zswcsubtreefeatureanalyzer.h \
   $${PWD}/swc/zswcsubtreeanalyzer.h \
   $${PWD}/zswctreenodearray.h \
   $${PWD}/flyem/zflyembodyanalyzer.h \
   $${PWD}/swc/zswcnodedistselector.h \
   $${PWD}/zstackbinarizer.h \
   $${PWD}/zvectorgenerator.h \
   $${PWD}/zstackfactory.h \
   $${PWD}/zeigensolver.h \
   $${PWD}/zmapgenerator.h \
   $${PWD}/flyem/zflyemneuronfeatureset.h \
   $${PWD}/flyem/zflyemneuronfilter.h \
   $${PWD}/flyem/zflyemneuronfilterfactory.h \
   $${PWD}/flyem/zflyemneuronfeature.h \
   $${PWD}/flyem/zflyemneuronfeaturefactory.h \
   $${PWD}/flyem/zflyemneuronarray.h \
   $${PWD}/swc/zswcpruner.h \
   $${PWD}/zneurontracer.h \
   $${PWD}/flyem/zflyemneuronlayermatcher.h \
   $${PWD}/zdynamicprogrammer.h \
   $${PWD}/flyem/zhotspot.h \
   $${PWD}/ztextlinearray.h \
   $${PWD}/flyem/zhotspotarray.h \
   $${PWD}/flyem/zhotspotfactory.h \
   $${PWD}/ztextlinecompositer.h \
   $${PWD}/zobject3dscanarray.h \
   $${PWD}/zstringarray.h \
   $${PWD}/flyem/zflyemcoordinateconverter.h \
   $${PWD}/flyem/zflyem.h \
   $${PWD}/flyem/zflyemdatainfo.h \
   $${PWD}/dvid/zdvidinfo.h \
   $${PWD}/zlinesegment.h \
   $${PWD}/zlinesegmentarray.h \
   $${PWD}/dvid/zdvidtarget.h \
   $${PWD}/dvid/zdvidfilter.h \
   $${PWD}/zintcuboidface.h \
   $${PWD}/zflyembodyannotation.h \
   $${PWD}/zintpoint.h \
   $${PWD}/zintpointarray.h \
   $${PWD}/zintarray.h \
   $${PWD}/zintset.h \
   $${PWD}/flyem/zflyemsubstackroi.h \
   $${PWD}/zstackwatershed.h \
   $${PWD}/zstackarray.h \
   $${PWD}/flyem/zflyemconfig.h \
   $${PWD}/tr1_header.h \
   $${PWD}/zsharedpointer.h \
   $${PWD}/geometry/zgeo3dtransform.h \
   $${PWD}/geometry/zgeometry.h \
   $${PWD}/geometry/zgeo3dscalarfield.h \
   $${PWD}/zvoxelgraphics.h \
   $${PWD}/zintcuboid.h \
   $${PWD}/bigdata/zdvidblockgrid.h \
   $${PWD}/bigdata/zstackblockgrid.h \
   $${PWD}/bigdata/zblockgrid.h \
   $${PWD}/bigdata/zblockgridfactory.h \
   $${PWD}/zsparsestack.h \
   $${PWD}/zstackobject.h \
   $${PWD}/zobject3dfactory.h \
   $${PWD}/zclosedcurve.h \
   $${PWD}/zflyemutilities.h \
   $${PWD}/dvid/zdvidurl.h \
   $${PWD}/zstackobjectsourcefactory.h \
   $${PWD}/dvid/zdviddata.h \
   $${PWD}/flyem/zflyemneuronbodyinfo.h \
   $${PWD}/zstackobjectsource.h \
   $${PWD}/zstackobjectrole.h \
   $${PWD}/zarrayfactory.h \
   $${PWD}/zstackobjectselector.h \
   $${PWD}/zinthistogram.h

SOURCES +=$${PWD}/zstackprocessor.cpp \
   $${PWD}/zstack.cxx \
   $${PWD}/zlocalneuroseg.cpp \
   $${PWD}/zellipse.cpp \
   $${PWD}/zswctree.cpp \
   $${PWD}/zobject3d.cpp \
   $${PWD}/zcircle.cpp \
   $${PWD}/zpoint.cpp \
   $${PWD}/zdirectionaltemplate.cpp \
   $${PWD}/zlocalrect.cpp \
   $${PWD}/zsinglechannelstack.cpp \
   $${PWD}/zspgrowparser.cpp \
   $${PWD}/zvoxel.cpp \
   $${PWD}/zvoxelarray.cpp \
   $${PWD}/zsuperpixelmap.cpp \
   $${PWD}/zsegmentmap.cpp \
   $${PWD}/zsuperpixelmaparray.cpp \
   $${PWD}/zsegmentmaparray.cpp \
   $${PWD}/zswcforest.cpp \
   $${PWD}/zstackaccessor.cpp \
   $${PWD}/zswctreematcher.cpp \
   $${PWD}/zswcbranch.cpp \
   $${PWD}/zmatrix.cpp \
   $${PWD}/zinttree.cpp \
   $${PWD}/zstring.cpp \
   $${PWD}/zfilelist.cpp \
   $${PWD}/zrandomgenerator.cpp \
   $${PWD}/zfilelock.cpp \
   $${PWD}/zargumentprocessor.cpp \
   $${PWD}/flyem/zsynapseannotation.cpp \
   $${PWD}/flyem/zsynapseannotationarray.cpp \
   $${PWD}/flyem/zsynapseannotationmetadata.cpp \
   $${PWD}/flyem/zsynapseannotationanalyzer.cpp \
   $${PWD}/flyem/zfileparser.cpp \
   $${PWD}/flyem/zneuronnetwork.cpp \
   $${PWD}/zvaa3dmarker.cpp \
   $${PWD}/zvaa3dapo.cpp \
   $${PWD}/zswcnode.cpp \
   $${PWD}/zlogmessagereporter.cpp \
   $${PWD}/zball.cpp \
   $${PWD}/zswctreenode.cpp \
   $${PWD}/zsquarematrix.cpp \
   $${PWD}/zsymmetricmatrix.cpp \
   $${PWD}/zsvggenerator.cpp \
   $${PWD}/zdendrogram.cpp \
   $${PWD}/zcuboid.cpp \
   $${PWD}/zswcfeatureanalyzer.cpp \
   $${PWD}/zswcsizefeatureanalyzer.cpp \
   $${PWD}/zobject3darray.cpp \
   $${PWD}/zdoublevector.cpp \
   $${PWD}/zneurontracer.cpp \
   $${PWD}/zkmeansclustering.cpp \
   $${PWD}/zswcshollfeatureanalyzer.cpp \
   $${PWD}/zswcspatialfeatureanalyzer.cpp \
   $${PWD}/swctreenode.cpp \
   $${PWD}/zswcnetwork.cpp \
   $${PWD}/zcloudnetwork.cpp \
   $${PWD}/zweightedpoint.cpp \
   $${PWD}/zweightedpointarray.cpp \
   $${PWD}/zpointnetwork.cpp \
   $${PWD}/zswcpath.cpp \
   $${PWD}/zswctrunkanalyzer.cpp \
   $${PWD}/zswcdisttrunkanalyzer.cpp \
   $${PWD}/zswcbranchingtrunkanalyzer.cpp \
   $${PWD}/zswctrunksizefeatureanalyzer.cpp \
   $${PWD}/zpointarray.cpp \
   $${PWD}/flyem/zsynapselocationmatcher.cpp \
   $${PWD}/c_stack.cpp \
   $${PWD}/zfiletype.cpp \
   $${PWD}/flyem/zsynapselocationmetric.cpp \
   $${PWD}/zstackfile.cpp \
   $${PWD}/zxmldoc.cpp \
   $${PWD}/zintmap.cpp \
   $${PWD}/flyem/zsegmentationanalyzer.cpp \
   $${PWD}/flyem/zsegmentationbundle.cpp \
   $${PWD}/zstackblender.cpp \
   $${PWD}/zgraph.cpp \
   $${PWD}/zarray.cpp \
   $${PWD}/zintpairmap.cpp \
   $${PWD}/zswcsizetrunkanalyzer.cpp \
   $${PWD}/zswcweighttrunkanalyzer.cpp \
   $${PWD}/zdebug.cpp \
   $${PWD}/tubemodel.cpp \
   $${PWD}/zhdf5reader.cpp \
   $${PWD}/neutubeconfig.cpp \
   $${PWD}/zhdf5writer.cpp \
   $${PWD}/flyem/zbcfset.cpp \
   $${PWD}/zstackskeletonizer.cpp \
   $${PWD}/zswclayerfeatureanalyzer.cpp \
   $${PWD}/flyem/zflyemneuron.cpp \
   $${PWD}/zswctypetrunkanalyzer.cpp \
   $${PWD}/zobject3dscan.cpp \
   $${PWD}/zswclayershollfeatureanalyzer.cpp \
   $${PWD}/zswclayertrunkanalyzer.cpp \
   $${PWD}/zstackgraph.cpp \
   $${PWD}/zgraphcompressor.cpp \
   $${PWD}/zprogressreporter.cpp \
   $${PWD}/zmessagereporter.cpp \
   $${PWD}/zreportable.cpp \
   $${PWD}/zstackstatistics.cpp \
   $${PWD}/zswcconnector.cpp \
   $${PWD}/zprogressable.cpp \
   $${PWD}/biocytin/zstackprojector.cpp \
   $${PWD}/biocytin/swcprocessor.cpp \
   $${PWD}/zresolution.cpp \
   $${PWD}/zswcpositionadjuster.cpp \
   $${PWD}/zswcrangeanalyzer.cpp \
   $${PWD}/zellipsoid.cpp \
   $${PWD}/zswcnodeselector.cpp \
   $${PWD}/zswcnodezrangeselector.cpp \
   $${PWD}/zswcnodecompositeselector.cpp \
   $${PWD}/zswcnodeellipsoidrangeselector.cpp \
   $${PWD}/flyem/zstitchgrid.cpp \
   $${PWD}/flyem/zintcuboidarray.cpp \
   $${PWD}/flyem/zflyemqualityanalyzer.cpp \
   $${PWD}/flyem/zintcuboidcomposition.cpp \
   $${PWD}/zswcglobalfeatureanalyzer.cpp \
   $${PWD}/zswclocationanalyzer.cpp \
   $${PWD}/biocytin/zbiocytinfilenameparser.cpp \
   $${PWD}/zhistogram.cpp \
   $${PWD}/misc/miscutility.cpp \
   $${PWD}/flyem/zflyemneuronrange.cpp \
   $${PWD}/flyem/zflyemneuronaxis.cpp \
   $${PWD}/zswcgenerator.cpp \
   $${PWD}/zswcnodebufferfeatureanalyzer.cpp \
   $${PWD}/flyem/zflyemneuronrangecompare.cpp \
   $${PWD}/swc/zswcresampler.cpp \
   $${PWD}/swc/zswcmetric.cpp \
   $${PWD}/swc/zswcterminalsurfacemetric.cpp \
   $${PWD}/zapclustering.cpp \
   $${PWD}/swc/zswcterminalanglemetric.cpp \
   $${PWD}/swc/zswcdeepanglemetric.cpp \
   $${PWD}/zswcsubtreefeatureanalyzer.cpp \
   $${PWD}/swc/zswcsubtreeanalyzer.cpp \
   $${PWD}/zswctreenodearray.cpp \
   $${PWD}/flyem/zflyembodyanalyzer.cpp \
   $${PWD}/swc/zswcnodedistselector.cpp \
   $${PWD}/zstackbinarizer.cpp \
   $${PWD}/zvectorgenerator.cpp \
   $${PWD}/zstackfactory.cpp \
   $${PWD}/zeigensolver.cpp \
   $${PWD}/zmapgenerator.cpp \
   $${PWD}/flyem/zflyemneuronfeatureset.cpp \
   $${PWD}/flyem/zflyemneuronfilter.cpp \
   $${PWD}/flyem/zflyemneuronfilterfactory.cpp \
   $${PWD}/flyem/zflyemneuronfeature.cpp \
   $${PWD}/flyem/zflyemneuronfeaturefactory.cpp \
   $${PWD}/flyem/zflyemneuronarray.cpp \
   $${PWD}/swc/zswcpruner.cpp \
   $${PWD}/flyem/zflyemneuronlayermatcher.cpp \
   $${PWD}/zdynamicprogrammer.cpp \
   $${PWD}/flyem/zhotspot.cpp \
   $${PWD}/ztextlinearray.cpp \
   $${PWD}/flyem/zhotspotarray.cpp \
   $${PWD}/flyem/zhotspotfactory.cpp \
   $${PWD}/ztextlinecompositer.cpp \
   $${PWD}/zobject3dscanarray.cpp \
   $${PWD}/zstringarray.cpp \
   $${PWD}/flyem/zflyemcoordinateconverter.cpp \
   $${PWD}/flyem/zflyemdatainfo.cpp \
   $${PWD}/dvid/zdvidinfo.cpp \
   $${PWD}/zlinesegment.cpp \
   $${PWD}/zlinesegmentarray.cpp \
   $${PWD}/dvid/zdvidtarget.cpp \
   $${PWD}/dvid/zdvidfilter.cpp \
   $${PWD}/zintcuboidface.cpp \
   $${PWD}/zflyembodyannotation.cpp \
   $${PWD}/zintpoint.cpp \
   $${PWD}/zintpointarray.cpp \
   $${PWD}/zintarray.cpp \
   $${PWD}/zintset.cpp \
   $${PWD}/flyem/zflyemsubstackroi.cpp \
   $${PWD}/zstackwatershed.cpp \
   $${PWD}/zstackarray.cpp \
   $${PWD}/flyem/zflyemconfig.cpp \
   $${PWD}/geometry/zgeo3dtransform.cpp \
   $${PWD}/geometry/zgeometry.cpp \
   $${PWD}/geometry/zgeo3dscalarfield.cpp \
   $${PWD}/zvoxelgraphics.cpp \
   $${PWD}/zintcuboid.cpp \
   $${PWD}/bigdata/zdvidblockgrid.cpp \
   $${PWD}/bigdata/zstackblockgrid.cpp \
   $${PWD}/bigdata/zblockgrid.cpp \
   $${PWD}/bigdata/zblockgridfactory.cpp \
   $${PWD}/zsparsestack.cpp \
   $${PWD}/zstackobject.cpp \
   $${PWD}/zobject3dfactory.cpp \
   $${PWD}/zclosedcurve.cpp \
   $${PWD}/zflyemutilities.cpp \
   $${PWD}/dvid/zdvidurl.cpp \
   $${PWD}/zstackobjectsourcefactory.cpp \
   $${PWD}/dvid/zdviddata.cpp \
   $${PWD}/flyem/zflyemneuronbodyinfo.cpp \
   $${PWD}/zstackobjectsource.cpp \
   $${PWD}/zstackobjectrole.cpp \
   $${PWD}/zarrayfactory.cpp \
   $${PWD}/zstackobjectselector.cpp \
   $${PWD}/zinthistogram.cpp

include($${PWD}/json.pri)
include($${PWD}/mylib/mylib.pri)

HEADERS +=$${PWD}/zstackprocessor.h \
   $${PWD}/zstack.hxx \
   $${PWD}/zlocalneuroseg.h \
   $${PWD}/zellipse.h \
   $${PWD}/zswctree.h \
   $${PWD}/zobject3d.h \
   $${PWD}/zcircle.h \
   $${PWD}/zpoint.h \
   $${PWD}/zdirectionaltemplate.h \
   $${PWD}/zlocalrect.h \
   $${PWD}/zsinglechannelstack.h \
   $${PWD}/zbenchtimer.h \
   $${PWD}/zspgrowparser.h \
   $${PWD}/zvoxel.h \
   $${PWD}/zvoxelarray.h \
   $${PWD}/zsuperpixelmap.h \
   $${PWD}/zsegmentmap.h \
   $${PWD}/zsuperpixelmaparray.h \
   $${PWD}/zsegmentmaparray.h \
   $${PWD}/zswcforest.h \
   $${PWD}/zqtheader.h \
   $${PWD}/zstackaccessor.h \
   $${PWD}/zswctreematcher.h \
   $${PWD}/zswcbranch.h \
   $${PWD}/zmatrix.h \
   $${PWD}/zinttree.h \
   $${PWD}/zstring.h \
   $${PWD}/zfilelist.h \
   $${PWD}/zrandomgenerator.h \
   $${PWD}/zfilelock.h \
   $${PWD}/zargumentprocessor.h \
   $${PWD}/flyem/zsynapseannotation.h \
   $${PWD}/flyem/zsynapseannotationarray.h \
   $${PWD}/flyem/zsynapseannotationmetadata.h \
   $${PWD}/flyem/zsynapseannotationanalyzer.h \
   $${PWD}/flyem/zfileparser.h \
   $${PWD}/flyem/zneuronnetwork.h \
   $${PWD}/zvaa3dmarker.h \
   $${PWD}/zvaa3dapo.h \
   $${PWD}/zswcnode.h \
   $${PWD}/zball.h \
   $${PWD}/ztreenode.h \
   $${PWD}/ztree.h \
   $${PWD}/zswctreenode.h \
   $${PWD}/zsquarematrix.h \
   $${PWD}/zsymmetricmatrix.h \
   $${PWD}/zsvggenerator.h \
   $${PWD}/zdendrogram.h \
   $${PWD}/zcuboid.h \
   $${PWD}/ztest.h \
   $${PWD}/zswcfeatureanalyzer.h \
   $${PWD}/zswcsizefeatureanalyzer.h \
   $${PWD}/zobject3darray.h \
   $${PWD}/zdoublevector.h \
   $${PWD}/zkmeansclustering.h \
   $${PWD}/zswcshollfeatureanalyzer.h \
   $${PWD}/zswcspatialfeatureanalyzer.h \
   $${PWD}/swctreenode.h \
   $${PWD}/zswcnetwork.h \
   $${PWD}/zcloudnetwork.h \
   $${PWD}/zweightedpoint.h \
   $${PWD}/zweightedpointarray.h \
   $${PWD}/zpointnetwork.h \
   $${PWD}/zswcpath.h \
   $${PWD}/zswctrunkanalyzer.h \
   $${PWD}/zswcdisttrunkanalyzer.h \
   $${PWD}/zswcbranchingtrunkanalyzer.h \
   $${PWD}/zswctrunksizefeatureanalyzer.h \
   $${PWD}/zpointarray.h \
   $${PWD}/flyem/zsynapselocationmatcher.h \
   $${PWD}/c_stack.h \
   $${PWD}/zfiletype.h \
   $${PWD}/flyem/zsynapselocationmetric.h \
   $${PWD}/zstackfile.h \
   $${PWD}/zxmldoc.h \
   $${PWD}/zintmap.h \
   $${PWD}/flyem/zsegmentationanalyzer.h \
   $${PWD}/flyem/zsegmentationbundle.h \
   $${PWD}/zstackblender.h \
   $${PWD}/zgraph.h \
   $${PWD}/zarray.h \
   $${PWD}/zintpairmap.h \
   $${PWD}/zswcsizetrunkanalyzer.h \
   $${PWD}/zswcweighttrunkanalyzer.h \
   $${PWD}/zdebug.h \
   $${PWD}/tubemodel.h \
   $${PWD}/zhdf5reader.h \
   $${PWD}/zhdf5_header.h \
   $${PWD}/zopencv_header.h \
   $${PWD}/neutubeconfig.h \
   $${PWD}/zhdf5writer.h \
   $${PWD}/flyem/zbcfset.h \
   $${PWD}/zstackskeletonizer.h \
   $${PWD}/zswclayerfeatureanalyzer.h \
   $${PWD}/flyem/zflyemneuron.h \
   $${PWD}/zswctypetrunkanalyzer.h \
   $${PWD}/zobject3dscan.h \
   $${PWD}/zswclayershollfeatureanalyzer.h \
   $${PWD}/zswclayertrunkanalyzer.h \
   $${PWD}/zlogmessagereporter.h \
   $${PWD}/zstackgraph.h\
   $${PWD}/zgraphcompressor.h \
   $${PWD}/zprogressreporter.h \
   $${PWD}/zstackdoccommand.h \
   $${PWD}/zcursorstore.h \
   $${PWD}/zmessagereporter.h \
   $${PWD}/zreportable.h \
   $${PWD}/zstackstatistics.h \
   $${PWD}/zswcconnector.h \
   $${PWD}/zprogressable.h \
   $${PWD}/zuncopyable.h \
   $${PWD}/biocytin/zstackprojector.h \
   $${PWD}/biocytin/swcprocessor.h \
   $${PWD}/zresolution.h \
   $${PWD}/zswcpositionadjuster.h \
   $${PWD}/zswcrangeanalyzer.h \
   $${PWD}/zellipsoid.h \
   $${PWD}/zswcnodeselector.h \
   $${PWD}/zswcnodezrangeselector.h \
   $${PWD}/zswcnodecompositeselector.h \
   $${PWD}/zswcnodeellipsoidrangeselector.h \
   $${PWD}/flyem/zstitchgrid.h \
   $${PWD}/flyem/zintcuboidarray.h \
   $${PWD}/flyem/zflyemqualityanalyzer.h \
   $${PWD}/flyem/zintcuboidcomposition.h \
   $${PWD}/zswcglobalfeatureanalyzer.h \
   $${PWD}/zswclocationanalyzer.h \
   $${PWD}/biocytin/zbiocytinfilenameparser.h \
   $${PWD}/zerror.h \
   $${PWD}/zhistogram.h \
   $${PWD}/misc/miscutility.h \
   $${PWD}/flyem/zflyemneuronrange.h \
   $${PWD}/flyem/zflyemneuronaxis.h \
   $${PWD}/zswcgenerator.h \
   $${PWD}/zpaintbundle.h \
   $${PWD}/zswcnodebufferfeatureanalyzer.h \
   $${PWD}/flyem/zflyemneuronrangecompare.h \
   $${PWD}/swc/zswcresampler.h \
   $${PWD}/swc/zswcmetric.h \
   $${PWD}/swc/zswcterminalsurfacemetric.h \
   $${PWD}/zapclustering.h \
   $${PWD}/swc/zswcterminalanglemetric.h \
   $${PWD}/swc/zswcdeepanglemetric.h \
   $${PWD}/zswcsubtreefeatureanalyzer.h \
   $${PWD}/swc/zswcsubtreeanalyzer.h \
   $${PWD}/zswctreenodearray.h \
   $${PWD}/flyem/zflyembodyanalyzer.h \
   $${PWD}/swc/zswcnodedistselector.h \
   $${PWD}/zstackbinarizer.h \
   $${PWD}/zvectorgenerator.h \
   $${PWD}/zstackfactory.h \
   $${PWD}/zeigensolver.h \
   $${PWD}/zmapgenerator.h \
   $${PWD}/flyem/zflyemneuronfeatureset.h \
   $${PWD}/flyem/zflyemneuronfilter.h \
   $${PWD}/flyem/zflyemneuronfilterfactory.h \
   $${PWD}/flyem/zflyemneuronfeature.h \
   $${PWD}/flyem/zflyemneuronfeaturefactory.h \
   $${PWD}/flyem/zflyemneuronarray.h \
   $${PWD}/swc/zswcpruner.h \
   $${PWD}/zneurontracer.h \
   $${PWD}/flyem/zflyemneuronlayermatcher.h \
   $${PWD}/zdynamicprogrammer.h \
   $${PWD}/flyem/zhotspot.h \
   $${PWD}/ztextlinearray.h \
   $${PWD}/flyem/zhotspotarray.h \
   $${PWD}/flyem/zhotspotfactory.h \
   $${PWD}/ztextlinecompositer.h \
   $${PWD}/zobject3dscanarray.h \
   $${PWD}/zstringarray.h \
   $${PWD}/flyem/zflyemcoordinateconverter.h \
   $${PWD}/flyem/zflyem.h \
   $${PWD}/flyem/zflyemdatainfo.h \
   $${PWD}/dvid/zdvidinfo.h \
   $${PWD}/zlinesegment.h \
   $${PWD}/zlinesegmentarray.h \
   $${PWD}/dvid/zdvidtarget.h \
   $${PWD}/dvid/zdvidfilter.h \
   $${PWD}/zintcuboidface.h \
   $${PWD}/zflyembodyannotation.h \
   $${PWD}/zintpoint.h \
   $${PWD}/zintpointarray.h \
   $${PWD}/zintarray.h \
   $${PWD}/zintset.h \
   $${PWD}/flyem/zflyemsubstackroi.h \
   $${PWD}/zstackwatershed.h \
   $${PWD}/zstackarray.h \
   $${PWD}/flyem/zflyemconfig.h \
   $${PWD}/tr1_header.h \
   $${PWD}/zsharedpointer.h \
   $${PWD}/geometry/zgeo3dtransform.h \
   $${PWD}/geometry/zgeometry.h \
   $${PWD}/geometry/zgeo3dscalarfield.h \
   $${PWD}/zvoxelgraphics.h \
   $${PWD}/zintcuboid.h \
   $${PWD}/bigdata/zdvidblockgrid.h \
   $${PWD}/bigdata/zstackblockgrid.h \
   $${PWD}/bigdata/zblockgrid.h \
   $${PWD}/bigdata/zblockgridfactory.h \
   $${PWD}/zsparsestack.h \
   $${PWD}/zstackobject.h \
   $${PWD}/zobject3dfactory.h \
   $${PWD}/zclosedcurve.h \
   $${PWD}/zflyemutilities.h \
   $${PWD}/dvid/zdvidurl.h \
   $${PWD}/zstackobjectsourcefactory.h \
   $${PWD}/dvid/zdviddata.h \
   $${PWD}/flyem/zflyemneuronbodyinfo.h \
   $${PWD}/zstackobjectsource.h \
   $${PWD}/zstackobjectrole.h \
   $${PWD}/zarrayfactory.h \
   $${PWD}/zstackobjectselector.h \
    zinthistogram.h

SOURCES +=$${PWD}/zstackprocessor.cpp \
   $${PWD}/zstack.cxx \
   $${PWD}/zlocalneuroseg.cpp \
   $${PWD}/zellipse.cpp \
   $${PWD}/zswctree.cpp \
   $${PWD}/zobject3d.cpp \
   $${PWD}/zcircle.cpp \
   $${PWD}/zpoint.cpp \
   $${PWD}/zdirectionaltemplate.cpp \
   $${PWD}/zlocalrect.cpp \
   $${PWD}/zsinglechannelstack.cpp \
   $${PWD}/zspgrowparser.cpp \
   $${PWD}/zvoxel.cpp \
   $${PWD}/zvoxelarray.cpp \
   $${PWD}/zsuperpixelmap.cpp \
   $${PWD}/zsegmentmap.cpp \
   $${PWD}/zsuperpixelmaparray.cpp \
   $${PWD}/zsegmentmaparray.cpp \
   $${PWD}/zswcforest.cpp \
   $${PWD}/zstackaccessor.cpp \
   $${PWD}/zswctreematcher.cpp \
   $${PWD}/zswcbranch.cpp \
   $${PWD}/zmatrix.cpp \
   $${PWD}/zinttree.cpp \
   $${PWD}/zstring.cpp \
   $${PWD}/zfilelist.cpp \
   $${PWD}/zrandomgenerator.cpp \
   $${PWD}/zfilelock.cpp \
   $${PWD}/zargumentprocessor.cpp \
   $${PWD}/flyem/zsynapseannotation.cpp \
   $${PWD}/flyem/zsynapseannotationarray.cpp \
   $${PWD}/flyem/zsynapseannotationmetadata.cpp \
   $${PWD}/flyem/zsynapseannotationanalyzer.cpp \
   $${PWD}/flyem/zfileparser.cpp \
   $${PWD}/flyem/zneuronnetwork.cpp \
   $${PWD}/zvaa3dmarker.cpp \
   $${PWD}/zvaa3dapo.cpp \
   $${PWD}/zswcnode.cpp \
   $${PWD}/zlogmessagereporter.cpp \
   $${PWD}/zball.cpp \
   $${PWD}/zswctreenode.cpp \
   $${PWD}/zsquarematrix.cpp \
   $${PWD}/zsymmetricmatrix.cpp \
   $${PWD}/zsvggenerator.cpp \
   $${PWD}/zdendrogram.cpp \
   $${PWD}/zcuboid.cpp \
   $${PWD}/zswcfeatureanalyzer.cpp \
   $${PWD}/zswcsizefeatureanalyzer.cpp \
   $${PWD}/zobject3darray.cpp \
   $${PWD}/zdoublevector.cpp \
   $${PWD}/zneurontracer.cpp \
   $${PWD}/zkmeansclustering.cpp \
   $${PWD}/zswcshollfeatureanalyzer.cpp \
   $${PWD}/zswcspatialfeatureanalyzer.cpp \
   $${PWD}/swctreenode.cpp \
   $${PWD}/zswcnetwork.cpp \
   $${PWD}/zcloudnetwork.cpp \
   $${PWD}/zweightedpoint.cpp \
   $${PWD}/zweightedpointarray.cpp \
   $${PWD}/zpointnetwork.cpp \
   $${PWD}/zswcpath.cpp \
   $${PWD}/zswctrunkanalyzer.cpp \
   $${PWD}/zswcdisttrunkanalyzer.cpp \
   $${PWD}/zswcbranchingtrunkanalyzer.cpp \
   $${PWD}/zswctrunksizefeatureanalyzer.cpp \
   $${PWD}/zpointarray.cpp \
   $${PWD}/flyem/zsynapselocationmatcher.cpp \
   $${PWD}/c_stack.cpp \
   $${PWD}/zfiletype.cpp \
   $${PWD}/flyem/zsynapselocationmetric.cpp \
   $${PWD}/zstackfile.cpp \
   $${PWD}/zxmldoc.cpp \
   $${PWD}/zintmap.cpp \
   $${PWD}/flyem/zsegmentationanalyzer.cpp \
   $${PWD}/flyem/zsegmentationbundle.cpp \
   $${PWD}/zstackblender.cpp \
   $${PWD}/zgraph.cpp \
   $${PWD}/zarray.cpp \
   $${PWD}/zintpairmap.cpp \
   $${PWD}/zswcsizetrunkanalyzer.cpp \
   $${PWD}/zswcweighttrunkanalyzer.cpp \
   $${PWD}/zdebug.cpp \
   $${PWD}/tubemodel.cpp \
   $${PWD}/zhdf5reader.cpp \
   $${PWD}/neutubeconfig.cpp \
   $${PWD}/zhdf5writer.cpp \
   $${PWD}/flyem/zbcfset.cpp \
   $${PWD}/zstackskeletonizer.cpp \
   $${PWD}/zswclayerfeatureanalyzer.cpp \
   $${PWD}/flyem/zflyemneuron.cpp \
   $${PWD}/zswctypetrunkanalyzer.cpp \
   $${PWD}/zobject3dscan.cpp \
   $${PWD}/zswclayershollfeatureanalyzer.cpp \
   $${PWD}/zswclayertrunkanalyzer.cpp \
   $${PWD}/zstackgraph.cpp \
   $${PWD}/zgraphcompressor.cpp \
   $${PWD}/zprogressreporter.cpp \
   $${PWD}/zmessagereporter.cpp \
   $${PWD}/zreportable.cpp \
   $${PWD}/zstackstatistics.cpp \
   $${PWD}/zswcconnector.cpp \
   $${PWD}/zprogressable.cpp \
   $${PWD}/biocytin/zstackprojector.cpp \
   $${PWD}/biocytin/swcprocessor.cpp \
   $${PWD}/zresolution.cpp \
   $${PWD}/zswcpositionadjuster.cpp \
   $${PWD}/zswcrangeanalyzer.cpp \
   $${PWD}/zellipsoid.cpp \
   $${PWD}/zswcnodeselector.cpp \
   $${PWD}/zswcnodezrangeselector.cpp \
   $${PWD}/zswcnodecompositeselector.cpp \
   $${PWD}/zswcnodeellipsoidrangeselector.cpp \
   $${PWD}/flyem/zstitchgrid.cpp \
   $${PWD}/flyem/zintcuboidarray.cpp \
   $${PWD}/flyem/zflyemqualityanalyzer.cpp \
   $${PWD}/flyem/zintcuboidcomposition.cpp \
   $${PWD}/zswcglobalfeatureanalyzer.cpp \
   $${PWD}/zswclocationanalyzer.cpp \
   $${PWD}/biocytin/zbiocytinfilenameparser.cpp \
   $${PWD}/zhistogram.cpp \
   $${PWD}/misc/miscutility.cpp \
   $${PWD}/flyem/zflyemneuronrange.cpp \
   $${PWD}/flyem/zflyemneuronaxis.cpp \
   $${PWD}/zswcgenerator.cpp \
   $${PWD}/zswcnodebufferfeatureanalyzer.cpp \
   $${PWD}/flyem/zflyemneuronrangecompare.cpp \
   $${PWD}/swc/zswcresampler.cpp \
   $${PWD}/swc/zswcmetric.cpp \
   $${PWD}/swc/zswcterminalsurfacemetric.cpp \
   $${PWD}/zapclustering.cpp \
   $${PWD}/swc/zswcterminalanglemetric.cpp \
   $${PWD}/swc/zswcdeepanglemetric.cpp \
   $${PWD}/zswcsubtreefeatureanalyzer.cpp \
   $${PWD}/swc/zswcsubtreeanalyzer.cpp \
   $${PWD}/zswctreenodearray.cpp \
   $${PWD}/flyem/zflyembodyanalyzer.cpp \
   $${PWD}/swc/zswcnodedistselector.cpp \
   $${PWD}/zstackbinarizer.cpp \
   $${PWD}/zvectorgenerator.cpp \
   $${PWD}/zstackfactory.cpp \
   $${PWD}/zeigensolver.cpp \
   $${PWD}/zmapgenerator.cpp \
   $${PWD}/flyem/zflyemneuronfeatureset.cpp \
   $${PWD}/flyem/zflyemneuronfilter.cpp \
   $${PWD}/flyem/zflyemneuronfilterfactory.cpp \
   $${PWD}/flyem/zflyemneuronfeature.cpp \
   $${PWD}/flyem/zflyemneuronfeaturefactory.cpp \
   $${PWD}/flyem/zflyemneuronarray.cpp \
   $${PWD}/swc/zswcpruner.cpp \
   $${PWD}/flyem/zflyemneuronlayermatcher.cpp \
   $${PWD}/zdynamicprogrammer.cpp \
   $${PWD}/flyem/zhotspot.cpp \
   $${PWD}/ztextlinearray.cpp \
   $${PWD}/flyem/zhotspotarray.cpp \
   $${PWD}/flyem/zhotspotfactory.cpp \
   $${PWD}/ztextlinecompositer.cpp \
   $${PWD}/zobject3dscanarray.cpp \
   $${PWD}/zstringarray.cpp \
   $${PWD}/flyem/zflyemcoordinateconverter.cpp \
   $${PWD}/flyem/zflyemdatainfo.cpp \
   $${PWD}/dvid/zdvidinfo.cpp \
   $${PWD}/zlinesegment.cpp \
   $${PWD}/zlinesegmentarray.cpp \
   $${PWD}/dvid/zdvidtarget.cpp \
   $${PWD}/dvid/zdvidfilter.cpp \
   $${PWD}/zintcuboidface.cpp \
   $${PWD}/zflyembodyannotation.cpp \
   $${PWD}/zintpoint.cpp \
   $${PWD}/zintpointarray.cpp \
   $${PWD}/zintarray.cpp \
   $${PWD}/zintset.cpp \
   $${PWD}/flyem/zflyemsubstackroi.cpp \
   $${PWD}/zstackwatershed.cpp \
   $${PWD}/zstackarray.cpp \
   $${PWD}/flyem/zflyemconfig.cpp \
   $${PWD}/geometry/zgeo3dtransform.cpp \
   $${PWD}/geometry/zgeometry.cpp \
   $${PWD}/geometry/zgeo3dscalarfield.cpp \
   $${PWD}/zvoxelgraphics.cpp \
   $${PWD}/zintcuboid.cpp \
   $${PWD}/bigdata/zdvidblockgrid.cpp \
   $${PWD}/bigdata/zstackblockgrid.cpp \
   $${PWD}/bigdata/zblockgrid.cpp \
   $${PWD}/bigdata/zblockgridfactory.cpp \
   $${PWD}/zsparsestack.cpp \
   $${PWD}/zstackobject.cpp \
   $${PWD}/zobject3dfactory.cpp \
   $${PWD}/zclosedcurve.cpp \
   $${PWD}/zflyemutilities.cpp \
   $${PWD}/dvid/zdvidurl.cpp \
   $${PWD}/zstackobjectsourcefactory.cpp \
   $${PWD}/dvid/zdviddata.cpp \
   $${PWD}/flyem/zflyemneuronbodyinfo.cpp \
   $${PWD}/zstackobjectsource.cpp \
   $${PWD}/zstackobjectrole.cpp \
   $${PWD}/zarrayfactory.cpp \
   $${PWD}/zstackobjectselector.cpp \
   $${PWD}/zinthistogram.cpp


Version 0.80

Version 0.80


fix for msvc2013 64bit with patch4

fix for msvc2013 64bit with patch4

INCLUDEPATH += $$PWD/Include

HEADERS += $$PWD/Include/PVRTArray.h \
    $$PWD/Include/PVRTDecompress.h \
    $$PWD/Include/PVRTError.h \
    $$PWD/Include/PVRTexture.h \
    $$PWD/Include/PVRTextureDefines.h \
    $$PWD/Include/PVRTextureFormat.h \
    $$PWD/Include/PVRTextureHeader.h \
    $$PWD/Include/PVRTextureUtilities.h \
    $$PWD/Include/PVRTextureVersion.h \
    $$PWD/Include/PVRTGlobal.h \
    $$PWD/Include/PVRTMap.h \
    $$PWD/Include/PVRTString.h \
    $$PWD/Include/PVRTTexture.h

macx {
    LIBS += $$PWD/OSX_x86/libPVRTexLib.dylib

    export_dylib.files = $$PWD/OSX_x86/libPVRTexLib.dylib
    export_dylib.path = Contents/lib
    QMAKE_BUNDLE_DATA += export_dylib
}

#win32 {
    DEFINES += _WINDLL_IMPORT
    LIBS += $$PWD/Windows_x86_64/PVRTexLib.lib
#}
#TODO: test on windows platform
#win32:contains(QMAKE_HOST.arch, x86_64) {
#    LIBS += $$PWD/Windows_x86_64/PVRTexLib.lib
#    export_dll.files = $$PWD/Windows_x86_64/PVRTexLib.dll
#    export_dll.path = ./
#    DEPLOYMENT += export_dll
#}
#win32:contains(QMAKE_HOST.arch, x86_32) {
#    LIBS += $$PWD/Windows_x86_32/PVRTexLib.lib
#    export_dll.files = $$PWD/Windows_x86_32/PVRTexLib.dll
#    export_dll.path = ./
#    DEPLOYMENT += export_dll
#}

INCLUDEPATH += $$PWD/Include

HEADERS += $$PWD/Include/PVRTArray.h \
    $$PWD/Include/PVRTDecompress.h \
    $$PWD/Include/PVRTError.h \
    $$PWD/Include/PVRTexture.h \
    $$PWD/Include/PVRTextureDefines.h \
    $$PWD/Include/PVRTextureFormat.h \
    $$PWD/Include/PVRTextureHeader.h \
    $$PWD/Include/PVRTextureUtilities.h \
    $$PWD/Include/PVRTextureVersion.h \
    $$PWD/Include/PVRTGlobal.h \
    $$PWD/Include/PVRTMap.h \
    $$PWD/Include/PVRTString.h \
    $$PWD/Include/PVRTTexture.h

macx {
    LIBS += $$PWD/OSX_x86/libPVRTexLib.dylib

    export_dylib.files = $$PWD/OSX_x86/libPVRTexLib.dylib
    export_dylib.path = Contents/lib
    QMAKE_BUNDLE_DATA += export_dylib
}

DEFINES += _WINDLL_IMPORT

#TODO: test on windows platform
win32:contains(QMAKE_HOST.arch, x86_64) {
    LIBS += $$PWD/Windows_x86_64/PVRTexLib.lib
    export_dll.files = $$PWD/Windows_x86_64/PVRTexLib.dll
    export_dll.path = ./
    DEPLOYMENT += export_dll
}
win32:contains(QMAKE_HOST.arch, x86_32) {
    LIBS += $$PWD/Windows_x86_32/PVRTexLib.lib
    export_dll.files = $$PWD/Windows_x86_32/PVRTexLib.dll
    export_dll.path = ./
    DEPLOYMENT += export_dll
}


add QDJANGO_PROFILE to config options

add QDJANGO_PROFILE to config options

TEMPLATE = lib
CONFIG += $$QDJANGO_LIBRARY_TYPE
DEFINES += QDJANGO_BUILD
VERSION = $$QDJANGO_VERSION

# Installation
headers.files = $$HEADERS
target.path = $$PREFIX/$$LIBDIR
INSTALLS += headers target

# pkg-config support
CONFIG += create_pc create_prl no_install_prl
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
QMAKE_PKGCONFIG_LIBDIR = $$target.path
equals(QDJANGO_LIBRARY_TYPE,staticlib) {
    QMAKE_PKGCONFIG_CFLAGS = -DQDJANGO_STATIC
} else {
    QMAKE_PKGCONFIG_CFLAGS = -DQDJANGO_SHARED
}
equals(QDJANGO_PROFILE,true) {
    QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
    QMAKE_LIBS += -lgcov
}
unix:QMAKE_CLEAN += -r pkgconfig lib$${TARGET}.prl

TEMPLATE = lib
CONFIG += $$QDJANGO_LIBRARY_TYPE
DEFINES += QDJANGO_BUILD
VERSION = $$QDJANGO_VERSION

# Installation
headers.files = $$HEADERS
target.path = $$PREFIX/$$LIBDIR
INSTALLS += headers target

# pkg-config support
CONFIG += create_pc create_prl no_install_prl
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
QMAKE_PKGCONFIG_LIBDIR = $$target.path
equals(QDJANGO_LIBRARY_TYPE,staticlib) {
    QMAKE_PKGCONFIG_CFLAGS = -DQDJANGO_STATIC
} else {
    QMAKE_PKGCONFIG_CFLAGS = -DQDJANGO_SHARED
}
unix:QMAKE_CLEAN += -r pkgconfig lib$${TARGET}.prl


Another compiling fix for quazip on win32

INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD
INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
win32-x-g++|win64-x-g++|win32 {
    DEFINES +=QUAZIP_STATIC
}
HEADERS += $$PWD/crypt.h \
           $$PWD/ioapi.h \
           $$PWD/JlCompress.h \
           $$PWD/quaadler32.h \
           $$PWD/quachecksum32.h \
           $$PWD/quacrc32.h \
           $$PWD/quazip.h \
           $$PWD/quazipfile.h \
           $$PWD/quazipfileinfo.h \
           $$PWD/quazipnewinfo.h \
           $$PWD/unzip.h \
           $$PWD/zip.h
SOURCES += $$PWD/qioapi.cpp \
           $$PWD/JlCompress.cpp \
           $$PWD/quaadler32.cpp \
           $$PWD/quacrc32.cpp \
           $$PWD/quazip.cpp \
           $$PWD/quazipfile.cpp \
           $$PWD/quazipnewinfo.cpp \
           $$PWD/quazipfileinfo.cpp \
           $$PWD/unzip.c \
           $$PWD/zip.c

INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD
INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
HEADERS += $$PWD/crypt.h \
           $$PWD/ioapi.h \
           $$PWD/JlCompress.h \
           $$PWD/quaadler32.h \
           $$PWD/quachecksum32.h \
           $$PWD/quacrc32.h \
           $$PWD/quazip.h \
           $$PWD/quazipfile.h \
           $$PWD/quazipfileinfo.h \
           $$PWD/quazipnewinfo.h \
           $$PWD/unzip.h \
           $$PWD/zip.h
SOURCES += $$PWD/qioapi.cpp \
           $$PWD/JlCompress.cpp \
           $$PWD/quaadler32.cpp \
           $$PWD/quacrc32.cpp \
           $$PWD/quazip.cpp \
           $$PWD/quazipfile.cpp \
           $$PWD/quazipnewinfo.cpp \
           $$PWD/quazipfileinfo.cpp \
           $$PWD/unzip.c \
           $$PWD/zip.c


default prefix is /usr now

default prefix is /usr now

QJSONRPC_VERSION = 1.0.0

isEmpty(QJSONRPC_LIBRARY_TYPE) {
    QJSONRPC_LIBRARY_TYPE = shared
}

QT += network
QJSONRPC_INCLUDEPATH = $${PWD}/src
QJSONRPC_LIBS = -lqjsonrpc
contains(QJSONRPC_LIBRARY_TYPE, staticlib) {
    DEFINES += QJSONRPC_STATIC
} else {
    DEFINES += QJSONRPC_SHARED
    win32:QJSONRPC_LIBS = -lqjsonrpc1
}

isEmpty(PREFIX) {
    unix {
        PREFIX = /usr
    } else {
        PREFIX = $$[QT_INSTALL_PREFIX]
    }
}
isEmpty(LIBDIR) {
    LIBDIR = lib
}

QJSONRPC_VERSION = 1.0.0

isEmpty(QJSONRPC_LIBRARY_TYPE) {
    QJSONRPC_LIBRARY_TYPE = shared
}

QT += network
QJSONRPC_INCLUDEPATH = $${PWD}/src
QJSONRPC_LIBS = -lqjsonrpc
contains(QJSONRPC_LIBRARY_TYPE, staticlib) {
    DEFINES += QJSONRPC_STATIC
} else {
    DEFINES += QJSONRPC_SHARED
    win32:QJSONRPC_LIBS = -lqjsonrpc1
}

isEmpty(PREFIX) {
    unix {
        PREFIX = /usr/local
    } else {
        PREFIX = $$[QT_INSTALL_PREFIX]
    }
}
isEmpty(LIBDIR) {
    LIBDIR = lib
}


Adding missing DLL to the Windows copy phase. Also removed a redundant DLL (OpenGL was being copied twice).

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

QMAKE_POST_LINK += echo "Copying files"

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

LinuxBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
}

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

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

#
# Perform platform specific setup
#

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

	# Fix library paths inside executable

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

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

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

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

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

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

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

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

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

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

}

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

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

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

    # Copy Qml libraries
    Q_DIR = $$[QT_INSTALL_QML]
    QML_DIR_WIN = $$replace(Q_DIR, "/", "\\")
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtGraphicalEffects\" \"$$DESTDIR_WIN\\QtGraphicalEffects\"
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtQuick\" \"$$DESTDIR_WIN\\QtQuick\"
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtQuick.2\" \"$$DESTDIR_WIN\\QtQuick.2\"

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

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

QMAKE_POST_LINK += echo "Copying files"

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

LinuxBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
}

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

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

#
# Perform platform specific setup
#

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

	# Fix library paths inside executable

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

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

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

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

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

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

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

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

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

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

}

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

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

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

    # Copy Qml libraries
    Q_DIR = $$[QT_INSTALL_QML]
    QML_DIR_WIN = $$replace(Q_DIR, "/", "\\")
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtGraphicalEffects\" \"$$DESTDIR_WIN\\QtGraphicalEffects\"
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtQuick\" \"$$DESTDIR_WIN\\QtQuick\"
    QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtQuick.2\" \"$$DESTDIR_WIN\\QtQuick.2\"

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


qt-not-qml needs its own OsDependant class

TARGET=qgvdial

# Add files and directories to ship with the application
# by adapting the examples below.
# file1.source = myfile
# dir1.source = mydir
DEPLOYMENTFOLDERS = # file1 dir1

INCLUDEPATH += $$PWD

SOURCES  += $$PWD/MainWindow.cpp \
            $$PWD/MainWindow_p.cpp \
            $$PWD/OsDependant.cpp \
            $$PWD/ContactDialog.cpp \
            $$PWD/InboxEntryDialog.cpp \
            $$PWD/CINumberDialog.cpp \
            $$PWD/CiListView.cpp \
            $$PWD/GvNumComboBox.cpp \
            $$PWD/DblClickLabel.cpp \
            $$PWD/DummySystemTray.cpp
HEADERS  += $$PWD/MainWindow.h \
            $$PWD/MainWindow_p.h \
            $$PWD/OsDependant.h \
            $$PWD/ContactDialog.h \
            $$PWD/InboxEntryDialog.h \
            $$PWD/CINumberDialog.h \
            $$PWD/CiListView.h \
            $$PWD/GvNumComboBox.h \
            $$PWD/DblClickLabel.h \
            $$PWD/DummySystemTray.h

FORMS    += $$PWD/mainwindow.ui \
            $$PWD/ContactDialog.ui \
            $$PWD/InboxEntryDialog.ui \
            $$PWD/CINumberDialog.ui

RESOURCES += $$PWD/qtnotqml.qrc

include($$PWD/../common/common.pri)
include($$PWD/../../api/api.pri)
include($$PWD/../features/openssl/openssl.pri)

!blackberry {
    include($$PWD/../features/qtsingleapplication/qtsingleapplication.pri)
}

TARGET=qgvdial

# Add files and directories to ship with the application
# by adapting the examples below.
# file1.source = myfile
# dir1.source = mydir
DEPLOYMENTFOLDERS = # file1 dir1

INCLUDEPATH += $$PWD

SOURCES  += $$PWD/MainWindow.cpp \
            $$PWD/MainWindow_p.cpp \
            $$PWD/ContactDialog.cpp \
            $$PWD/InboxEntryDialog.cpp \
            $$PWD/CINumberDialog.cpp \
            $$PWD/CiListView.cpp \
            $$PWD/GvNumComboBox.cpp \
            $$PWD/DblClickLabel.cpp \
            $$PWD/DummySystemTray.cpp
HEADERS  += $$PWD/MainWindow.h \
            $$PWD/MainWindow_p.h \
            $$PWD/ContactDialog.h \
            $$PWD/InboxEntryDialog.h \
            $$PWD/CINumberDialog.h \
            $$PWD/CiListView.h \
            $$PWD/GvNumComboBox.h \
            $$PWD/DblClickLabel.h \
            $$PWD/DummySystemTray.h

FORMS    += $$PWD/mainwindow.ui \
            $$PWD/ContactDialog.ui \
            $$PWD/InboxEntryDialog.ui \
            $$PWD/CINumberDialog.ui

RESOURCES += $$PWD/qtnotqml.qrc

include($$PWD/../common/common.pri)
include($$PWD/../../api/api.pri)
include($$PWD/../features/openssl/openssl.pri)
include($$PWD/../features/cookie-cutter/osdependent/cc-osdependent.pri)

!blackberry {
    include($$PWD/../features/qtsingleapplication/qtsingleapplication.pri)
}


Add 32 bit support

Add 32 bit support

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

#
# This file contains configuration settings which are common to both the QGC Application and
# the Location Plugin. It should mainly contains intial CONFIG tag setup and compiler settings.
#

# Setup our supported build types. We do this once here and then use the defined config scopes
# to allow us to easily modify suported build types in one place instead of duplicated throughout
# the project file.

linux {
    linux-g++ | linux-g++-64 | linux-g++-32 {
        message("Linux build")
        CONFIG += LinuxBuild
        DEFINES += __STDC_LIMIT_MACROS
    } else : android-g++ {
        message("Android build")
        CONFIG += AndroidBuild MobileBuild
        DEFINES += __android__
        DEFINES += __STDC_LIMIT_MACROS
        DEFINES += QGC_ENABLE_BLUETOOTH
        target.path = $$DESTDIR
    } else {
        error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported")
    }
} else : win32 {
    win32-msvc2010 | win32-msvc2012 | win32-msvc2013 {
        message("Windows build")
        CONFIG += WindowsBuild
        DEFINES += __STDC_LIMIT_MACROS
    } else {
        error("Unsupported Windows toolchain, only Visual Studio 2010, 2012, and 2013 are supported")
    }
} else : macx {
    macx-clang | macx-llvm {
        message("Mac build")
        CONFIG += MacBuild
        DEFINES += __macos__
        CONFIG += x86_64
        CONFIG -= x86
        QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
        QMAKE_MAC_SDK = macosx10.11
        QMAKE_CXXFLAGS += -fvisibility=hidden
    } else {
        error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported")
    }
} else : ios {
    !equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 4) {
        error("Unsupported Qt version, 5.5.x or greater is required for iOS")
    }
    message("iOS build")
    CONFIG += iOSBuild MobileBuild app_bundle
    DEFINES += __ios__
    QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
    QMAKE_IOS_TARGETED_DEVICE_FAMILY = 2 #- iPad only for now
    QMAKE_LFLAGS += -Wl,-no_pie
    warning("iOS build is experimental and not yet fully functional")
} else {
    error("Unsupported build platform, only Linux, Windows, Android and Mac (Mac OS and iOS) are supported")
}

MobileBuild {
    DEFINES += __mobile__
}

# set the QGC version from git

exists ($$PWD/.git) {
  GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
  message(QGroundControl version $${GIT_DESCRIBE})
} else {
  GIT_DESCRIBE = None
}

DEFINES += GIT_VERSION=\"\\\"$$GIT_DESCRIBE\\\"\"

# Installer configuration

installer {
    CONFIG -= debug
    CONFIG -= debug_and_release
    CONFIG += release
    message(Build Installer)
}

# Setup our supported build flavors

CONFIG(debug, debug|release) {
    message(Debug flavor)
    CONFIG += DebugBuild
} else:CONFIG(release, debug|release) {
    message(Release flavor)
    CONFIG += ReleaseBuild
} else {
    error(Unsupported build flavor)
}

# Need to special case Windows debug_and_release since VS Project creation in this case does strange things [QTBUG-40351]
win32:debug_and_release {
    CONFIG += WindowsDebugAndRelease
}

# Setup our build directories

BASEDIR      = $$IN_PWD

!iOSBuild {
    OBJECTS_DIR  = $${OUT_PWD}/obj
    MOC_DIR      = $${OUT_PWD}/moc
    UI_DIR       = $${OUT_PWD}/ui
    RCC_DIR      = $${OUT_PWD}/rcc
}

LANGUAGE = C++

LOCATION_PLUGIN_DESTDIR = $${OUT_PWD}/src/QtLocationPlugin
LOCATION_PLUGIN_NAME    = QGeoServiceProviderFactoryQGC

# Turn off serial port warnings
DEFINES += _TTY_NOWARN_

#
# By default warnings as errors are turned off. Even so, in order for a pull request
# to be accepted you must compile cleanly with warnings as errors turned on the default
# set of OS builds. See http://www.qgroundcontrol.org/dev/contribute for more details.
# You can use the WarningsAsErrorsOn CONFIG switch to turn warnings as errors on for your
# own builds.
#

MacBuild | LinuxBuild {
    QMAKE_CXXFLAGS_WARN_ON += -Wall
    WarningsAsErrorsOn {
        QMAKE_CXXFLAGS_WARN_ON += -Werror
    }
}

WindowsBuild {
    QMAKE_CXXFLAGS_WARN_ON += /W3 \
        /wd4996 \   # silence warnings about deprecated strcpy and whatnot
        /wd4005 \   # silence warnings about macro redefinition
        /wd4290 \   # ignore exception specifications
        /Zc:strictStrings-  # work around win 8.1 sdk sapi.h problem
    WarningsAsErrorsOn {
        QMAKE_CXXFLAGS_WARN_ON += /WX
    }
}

#
# Build-specific settings
#

ReleaseBuild {
    DEFINES += QT_NO_DEBUG
    WindowsBuild {
        # Use link time code generation for better optimization (I believe this is supported in MSVC Express, but not 100% sure)
        QMAKE_LFLAGS_LTCG = /LTCG
        QMAKE_CFLAGS_LTCG = -GL

        # Turn on debugging information so we can collect good crash dumps from release builds
        QMAKE_CXXFLAGS_RELEASE += /Zi
        QMAKE_LFLAGS_RELEASE += /DEBUG
    }
}

#
# Unit Test specific configuration goes here
#
# We have to special case Windows debug_and_release builds because you can't have files
# which are only in the debug variant [QTBUG-40351]. So in this case we include unit tests
# even in the release variant. If you want a Windows release build with no unit tests run
# qmake with CONFIG-=debug_and_release CONFIG+=release.
#

DebugBuild|WindowsDebugAndRelease {
    DEFINES += UNITTEST_BUILD
}

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

#
# This file contains configuration settings which are common to both the QGC Application and
# the Location Plugin. It should mainly contains intial CONFIG tag setup and compiler settings.
#

# Setup our supported build types. We do this once here and then use the defined config scopes
# to allow us to easily modify suported build types in one place instead of duplicated throughout
# the project file.

linux {
    linux-g++ | linux-g++-64 {
        message("Linux build")
        CONFIG += LinuxBuild
        DEFINES += __STDC_LIMIT_MACROS
    } else : android-g++ {
        message("Android build")
        CONFIG += AndroidBuild MobileBuild
        DEFINES += __android__
        DEFINES += __STDC_LIMIT_MACROS
        DEFINES += QGC_ENABLE_BLUETOOTH
        target.path = $$DESTDIR
    } else {
        error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported")
    }
} else : win32 {
    win32-msvc2010 | win32-msvc2012 | win32-msvc2013 {
        message("Windows build")
        CONFIG += WindowsBuild
        DEFINES += __STDC_LIMIT_MACROS
    } else {
        error("Unsupported Windows toolchain, only Visual Studio 2010, 2012, and 2013 are supported")
    }
} else : macx {
    macx-clang | macx-llvm {
        message("Mac build")
        CONFIG += MacBuild
        DEFINES += __macos__
        CONFIG += x86_64
        CONFIG -= x86
        QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
        QMAKE_MAC_SDK = macosx10.11
        QMAKE_CXXFLAGS += -fvisibility=hidden
    } else {
        error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported")
    }
} else : ios {
    !equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 4) {
        error("Unsupported Qt version, 5.5.x or greater is required for iOS")
    }
    message("iOS build")
    CONFIG += iOSBuild MobileBuild app_bundle
    DEFINES += __ios__
    QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
    QMAKE_IOS_TARGETED_DEVICE_FAMILY = 2 #- iPad only for now
    QMAKE_LFLAGS += -Wl,-no_pie
    warning("iOS build is experimental and not yet fully functional")
} else {
    error("Unsupported build platform, only Linux, Windows, Android and Mac (Mac OS and iOS) are supported")
}

MobileBuild {
    DEFINES += __mobile__
}

# set the QGC version from git

exists ($$PWD/.git) {
  GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
  message(QGroundControl version $${GIT_DESCRIBE})
} else {
  GIT_DESCRIBE = None
}

DEFINES += GIT_VERSION=\"\\\"$$GIT_DESCRIBE\\\"\"

# Installer configuration

installer {
    CONFIG -= debug
    CONFIG -= debug_and_release
    CONFIG += release
    message(Build Installer)
}

# Setup our supported build flavors

CONFIG(debug, debug|release) {
    message(Debug flavor)
    CONFIG += DebugBuild
} else:CONFIG(release, debug|release) {
    message(Release flavor)
    CONFIG += ReleaseBuild
} else {
    error(Unsupported build flavor)
}

# Need to special case Windows debug_and_release since VS Project creation in this case does strange things [QTBUG-40351]
win32:debug_and_release {
    CONFIG += WindowsDebugAndRelease
}

# Setup our build directories

BASEDIR      = $$IN_PWD

!iOSBuild {
    OBJECTS_DIR  = $${OUT_PWD}/obj
    MOC_DIR      = $${OUT_PWD}/moc
    UI_DIR       = $${OUT_PWD}/ui
    RCC_DIR      = $${OUT_PWD}/rcc
}

LANGUAGE = C++

LOCATION_PLUGIN_DESTDIR = $${OUT_PWD}/src/QtLocationPlugin
LOCATION_PLUGIN_NAME    = QGeoServiceProviderFactoryQGC

# Turn off serial port warnings
DEFINES += _TTY_NOWARN_

#
# By default warnings as errors are turned off. Even so, in order for a pull request
# to be accepted you must compile cleanly with warnings as errors turned on the default
# set of OS builds. See http://www.qgroundcontrol.org/dev/contribute for more details.
# You can use the WarningsAsErrorsOn CONFIG switch to turn warnings as errors on for your
# own builds.
#

MacBuild | LinuxBuild {
    QMAKE_CXXFLAGS_WARN_ON += -Wall
    WarningsAsErrorsOn {
        QMAKE_CXXFLAGS_WARN_ON += -Werror
    }
}

WindowsBuild {
    QMAKE_CXXFLAGS_WARN_ON += /W3 \
        /wd4996 \   # silence warnings about deprecated strcpy and whatnot
        /wd4005 \   # silence warnings about macro redefinition
        /wd4290 \   # ignore exception specifications
        /Zc:strictStrings-  # work around win 8.1 sdk sapi.h problem
    WarningsAsErrorsOn {
        QMAKE_CXXFLAGS_WARN_ON += /WX
    }
}

#
# Build-specific settings
#

ReleaseBuild {
    DEFINES += QT_NO_DEBUG
    WindowsBuild {
        # Use link time code generation for better optimization (I believe this is supported in MSVC Express, but not 100% sure)
        QMAKE_LFLAGS_LTCG = /LTCG
        QMAKE_CFLAGS_LTCG = -GL

        # Turn on debugging information so we can collect good crash dumps from release builds
        QMAKE_CXXFLAGS_RELEASE += /Zi
        QMAKE_LFLAGS_RELEASE += /DEBUG
    }
}

#
# Unit Test specific configuration goes here
#
# We have to special case Windows debug_and_release builds because you can't have files
# which are only in the debug variant [QTBUG-40351]. So in this case we include unit tests
# even in the release variant. If you want a Windows release build with no unit tests run
# qmake with CONFIG-=debug_and_release CONFIG+=release.
#

DebugBuild|WindowsDebugAndRelease {
    DEFINES += UNITTEST_BUILD
}


Turn Eigen into a MPLv2 dependency (#3368)

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

#
# This file contains configuration settings which are common to both the QGC Application and
# the Location Plugin. It should mainly contains initial CONFIG tag setup and compiler settings.
#

# Setup our supported build types. We do this once here and then use the defined config scopes
# to allow us to easily modify suported build types in one place instead of duplicated throughout
# the project file.

linux {
    linux-g++ | linux-g++-64 | linux-g++-32 | linux-clang {
        message("Linux build")
        CONFIG += LinuxBuild
        DEFINES += __STDC_LIMIT_MACROS
		linux-clang {
			message("Linux clang")
			QMAKE_CXXFLAGS += -Qunused-arguments -fcolor-diagnostics
		}
    } else : linux-rasp-pi2-g++ {
        message("Linux R-Pi2 build")
        CONFIG += LinuxBuild
        DEFINES += __STDC_LIMIT_MACROS __rasp_pi2__
    } else : android-g++ {
        message("Android build")
        CONFIG += AndroidBuild MobileBuild
        DEFINES += __android__
        DEFINES += __STDC_LIMIT_MACROS
        DEFINES += QGC_ENABLE_BLUETOOTH
        target.path = $$DESTDIR
    } else {
        error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported")
    }
} else : win32 {
    win32-msvc2010 | win32-msvc2012 | win32-msvc2013 {
        message("Windows build")
        CONFIG += WindowsBuild
        DEFINES += __STDC_LIMIT_MACROS
    } else {
        error("Unsupported Windows toolchain, only Visual Studio 2010, 2012, and 2013 are supported")
    }
} else : macx {
    macx-clang | macx-llvm {
        message("Mac build")
        CONFIG += MacBuild
        DEFINES += __macos__
        CONFIG += x86_64
        CONFIG -= x86
equals(QT_MAJOR_VERSION, 5) | greaterThan(QT_MINOR_VERSION, 5) {
        QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
} else {
        QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
}
        QMAKE_MAC_SDK = macosx10.11
        QMAKE_CXXFLAGS += -fvisibility=hidden
    } else {
        error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported")
    }
} else : ios {
    !equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 4) {
        error("Unsupported Qt version, 5.5.x or greater is required for iOS")
    }
    message("iOS build")
    CONFIG += iOSBuild MobileBuild app_bundle
    DEFINES += __ios__
    QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
    QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2 # Universal
    QMAKE_LFLAGS += -Wl,-no_pie
} else {
    error("Unsupported build platform, only Linux, Windows, Android and Mac (Mac OS and iOS) are supported")
}

MobileBuild {
    DEFINES += __mobile__
}

# set the QGC version from git

exists ($$PWD/.git) {
    GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
    GIT_HASH     = $$system(git rev-parse HEAD)
    VERSION      = $$replace(GIT_DESCRIBE, "v", "")
    VERSION      = $$replace(VERSION, "-", ".")
    VERSION      = $$section(VERSION, ".", 0, 3)
    MacBuild {
        MAC_VERSION  = $$section(VERSION, ".", 0, 2)
        MAC_BUILD    = $$section(VERSION, ".", 3, 3)
        message(QGroundControl version $${MAC_VERSION} build $${MAC_BUILD} describe $${GIT_DESCRIBE} hash $${GIT_HASH})
    } else {
        message(QGroundControl version $${VERSION} describe $${GIT_DESCRIBE} hash $${GIT_HASH})
    }
} else {
    GIT_DESCRIBE    = None
    GIT_HASH        = None
    VERSION         = 0.0.0   # Marker to indicate out-of-tree build
    MAC_VERSION     = 0.0.0
    MAC_BUILD       = 0
}

DEFINES += GIT_TAG=\"\\\"$$GIT_DESCRIBE\\\"\"
DEFINES += GIT_HASH=\"\\\"$$GIT_HASH\\\"\"
DEFINES += EIGEN_MPL2_ONLY

# Installer configuration

installer {
    CONFIG -= debug
    CONFIG -= debug_and_release
    CONFIG += release
    message(Build Installer)
}

# Setup our supported build flavors

CONFIG(debug, debug|release) {
    message(Debug flavor)
    CONFIG += DebugBuild
} else:CONFIG(release, debug|release) {
    message(Release flavor)
    CONFIG += ReleaseBuild
} else {
    error(Unsupported build flavor)
}

# Setup our build directories

BASEDIR      = $$IN_PWD

!iOSBuild {
    OBJECTS_DIR  = $${OUT_PWD}/obj
    MOC_DIR      = $${OUT_PWD}/moc
    UI_DIR       = $${OUT_PWD}/ui
    RCC_DIR      = $${OUT_PWD}/rcc
}

LANGUAGE = C++

LOCATION_PLUGIN_DESTDIR = $${OUT_PWD}/src/QtLocationPlugin
LOCATION_PLUGIN_NAME    = QGeoServiceProviderFactoryQGC

# Turn off serial port warnings
DEFINES += _TTY_NOWARN_

#
# By default warnings as errors are turned off. Even so, in order for a pull request
# to be accepted you must compile cleanly with warnings as errors turned on the default
# set of OS builds. See http://www.qgroundcontrol.org/dev/contribute for more details.
# You can use the WarningsAsErrorsOn CONFIG switch to turn warnings as errors on for your
# own builds.
#

MacBuild | LinuxBuild {
    QMAKE_CXXFLAGS_WARN_ON += -Wall
    WarningsAsErrorsOn {
        QMAKE_CXXFLAGS_WARN_ON += -Werror
    }
    MacBuild {
        # Latest clang version has a buggy check for this which cause Qt headers to throw warnings on qmap.h
        QMAKE_CXXFLAGS_WARN_ON += -Wno-return-stack-address
    }
}

WindowsBuild {
    QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings
    QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
    QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
    QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
    QMAKE_CXXFLAGS_WARN_ON += /W3 \
        /wd4996 \   # silence warnings about deprecated strcpy and whatnot
        /wd4005 \   # silence warnings about macro redefinition
        /wd4290     # ignore exception specifications

    WarningsAsErrorsOn {
        QMAKE_CXXFLAGS_WARN_ON += /WX
    }
}

#
# Build-specific settings
#

ReleaseBuild {
    DEFINES += QT_NO_DEBUG
    CONFIG += force_debug_info  # Enable debugging symbols on release builds
    !iOSBuild {
        CONFIG += ltcg              # Turn on link time code generation
    }

    WindowsBuild {
        # Enable function level linking and enhanced optimized debugging
        QMAKE_CFLAGS_RELEASE   += /Gy /Zo
        QMAKE_CXXFLAGS_RELEASE += /Gy /Zo
        QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO   += /Gy /Zo
        QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += /Gy /Zo

        # Eliminate duplicate COMDATs
        QMAKE_LFLAGS_RELEASE += /OPT:ICF
        QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += /OPT:ICF
    }
}

#
# Unit Test specific configuration goes here
#

DebugBuild {
    DEFINES += UNITTEST_BUILD
}

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

#
# This file contains configuration settings which are common to both the QGC Application and
# the Location Plugin. It should mainly contains initial CONFIG tag setup and compiler settings.
#

# Setup our supported build types. We do this once here and then use the defined config scopes
# to allow us to easily modify suported build types in one place instead of duplicated throughout
# the project file.

linux {
    linux-g++ | linux-g++-64 | linux-g++-32 | linux-clang {
        message("Linux build")
        CONFIG += LinuxBuild
        DEFINES += __STDC_LIMIT_MACROS
		linux-clang {
			message("Linux clang")
			QMAKE_CXXFLAGS += -Qunused-arguments -fcolor-diagnostics
		}
    } else : linux-rasp-pi2-g++ {
        message("Linux R-Pi2 build")
        CONFIG += LinuxBuild
        DEFINES += __STDC_LIMIT_MACROS __rasp_pi2__
    } else : android-g++ {
        message("Android build")
        CONFIG += AndroidBuild MobileBuild
        DEFINES += __android__
        DEFINES += __STDC_LIMIT_MACROS
        DEFINES += QGC_ENABLE_BLUETOOTH
        target.path = $$DESTDIR
    } else {
        error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported")
    }
} else : win32 {
    win32-msvc2010 | win32-msvc2012 | win32-msvc2013 {
        message("Windows build")
        CONFIG += WindowsBuild
        DEFINES += __STDC_LIMIT_MACROS
    } else {
        error("Unsupported Windows toolchain, only Visual Studio 2010, 2012, and 2013 are supported")
    }
} else : macx {
    macx-clang | macx-llvm {
        message("Mac build")
        CONFIG += MacBuild
        DEFINES += __macos__
        CONFIG += x86_64
        CONFIG -= x86
equals(QT_MAJOR_VERSION, 5) | greaterThan(QT_MINOR_VERSION, 5) {
        QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
} else {
        QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
}
        QMAKE_MAC_SDK = macosx10.11
        QMAKE_CXXFLAGS += -fvisibility=hidden
    } else {
        error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported")
    }
} else : ios {
    !equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 4) {
        error("Unsupported Qt version, 5.5.x or greater is required for iOS")
    }
    message("iOS build")
    CONFIG += iOSBuild MobileBuild app_bundle
    DEFINES += __ios__
    QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
    QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2 # Universal
    QMAKE_LFLAGS += -Wl,-no_pie
} else {
    error("Unsupported build platform, only Linux, Windows, Android and Mac (Mac OS and iOS) are supported")
}

MobileBuild {
    DEFINES += __mobile__
}

# set the QGC version from git

exists ($$PWD/.git) {
    GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
    GIT_HASH     = $$system(git rev-parse HEAD)
    VERSION      = $$replace(GIT_DESCRIBE, "v", "")
    VERSION      = $$replace(VERSION, "-", ".")
    VERSION      = $$section(VERSION, ".", 0, 3)
    MacBuild {
        MAC_VERSION  = $$section(VERSION, ".", 0, 2)
        MAC_BUILD    = $$section(VERSION, ".", 3, 3)
        message(QGroundControl version $${MAC_VERSION} build $${MAC_BUILD} describe $${GIT_DESCRIBE} hash $${GIT_HASH})
    } else {
        message(QGroundControl version $${VERSION} describe $${GIT_DESCRIBE} hash $${GIT_HASH})
    }
} else {
    GIT_DESCRIBE    = None
    GIT_HASH        = None
    VERSION         = 0.0.0   # Marker to indicate out-of-tree build
    MAC_VERSION     = 0.0.0
    MAC_BUILD       = 0
}

DEFINES += GIT_TAG=\"\\\"$$GIT_DESCRIBE\\\"\"
DEFINES += GIT_HASH=\"\\\"$$GIT_HASH\\\"\"

# Installer configuration

installer {
    CONFIG -= debug
    CONFIG -= debug_and_release
    CONFIG += release
    message(Build Installer)
}

# Setup our supported build flavors

CONFIG(debug, debug|release) {
    message(Debug flavor)
    CONFIG += DebugBuild
} else:CONFIG(release, debug|release) {
    message(Release flavor)
    CONFIG += ReleaseBuild
} else {
    error(Unsupported build flavor)
}

# Setup our build directories

BASEDIR      = $$IN_PWD

!iOSBuild {
    OBJECTS_DIR  = $${OUT_PWD}/obj
    MOC_DIR      = $${OUT_PWD}/moc
    UI_DIR       = $${OUT_PWD}/ui
    RCC_DIR      = $${OUT_PWD}/rcc
}

LANGUAGE = C++

LOCATION_PLUGIN_DESTDIR = $${OUT_PWD}/src/QtLocationPlugin
LOCATION_PLUGIN_NAME    = QGeoServiceProviderFactoryQGC

# Turn off serial port warnings
DEFINES += _TTY_NOWARN_

#
# By default warnings as errors are turned off. Even so, in order for a pull request
# to be accepted you must compile cleanly with warnings as errors turned on the default
# set of OS builds. See http://www.qgroundcontrol.org/dev/contribute for more details.
# You can use the WarningsAsErrorsOn CONFIG switch to turn warnings as errors on for your
# own builds.
#

MacBuild | LinuxBuild {
    QMAKE_CXXFLAGS_WARN_ON += -Wall
    WarningsAsErrorsOn {
        QMAKE_CXXFLAGS_WARN_ON += -Werror
    }
    MacBuild {
        # Latest clang version has a buggy check for this which cause Qt headers to throw warnings on qmap.h
        QMAKE_CXXFLAGS_WARN_ON += -Wno-return-stack-address
    }
}

WindowsBuild {
    QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings
    QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
    QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
    QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
    QMAKE_CXXFLAGS_WARN_ON += /W3 \
        /wd4996 \   # silence warnings about deprecated strcpy and whatnot
        /wd4005 \   # silence warnings about macro redefinition
        /wd4290     # ignore exception specifications

    WarningsAsErrorsOn {
        QMAKE_CXXFLAGS_WARN_ON += /WX
    }
}

#
# Build-specific settings
#

ReleaseBuild {
    DEFINES += QT_NO_DEBUG
    CONFIG += force_debug_info  # Enable debugging symbols on release builds
    !iOSBuild {
        CONFIG += ltcg              # Turn on link time code generation
    }

    WindowsBuild {
        # Enable function level linking and enhanced optimized debugging
        QMAKE_CFLAGS_RELEASE   += /Gy /Zo
        QMAKE_CXXFLAGS_RELEASE += /Gy /Zo
        QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO   += /Gy /Zo
        QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += /Gy /Zo

        # Eliminate duplicate COMDATs
        QMAKE_LFLAGS_RELEASE += /OPT:ICF
        QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += /OPT:ICF
    }
}

#
# Unit Test specific configuration goes here
#

DebugBuild {
    DEFINES += UNITTEST_BUILD
}


ddwarf: remove spare exclude-path values

pvs_studio.target = pvs
pvs_studio.output = true
pvs_studio.cxxflags = -std=c++11
pvs_studio.sources = $${SOURCES}

SUPPRESS_WARNINGS=V122
QT_INCLUDE=$$absolute_path($$dirname(QMAKE_QMAKE)/../include)

PVS_CONFIG="\
exclude-path = /usr/include/\n\
exclude-path = /usr/lib64/\n\
exclude-path = /usr/lib/gcc/x86_64-linux-gnu/5/include/\n\
exclude-path = $$QT_INCLUDE/../mkspecs/linux-g++\n\
exclude-path = $$QT_INCLUDE\n\
"

defineReplace(pvs_studio_filter_sources) {
    variable = $$1
    in = $$eval($$variable)
    out =
    for(source, in) {
        contains(source, "^.+\\.(cpp|cpp|cc|cx|cxx|cp|c\\+\\+)$") {
            out += "$${source}"
        }
        contains(source, "^.+\\.c$") {
            out += "$${source}"
        }
    }
    return($${out})
}

isEmpty(pvs_studio.target) {
    pvs_studio.target = pvs_studio
}
isEmpty(pvs_studio.log) {
    contains(pvs_studio.format, "^tasklist$") {
        pvs_studio.log = "$$pvs_studio.target".tasks
    } else {
        pvs_studio.log = "$$pvs_studio.target".log
    }
}
isEmpty(pvs_studio.cfg) {
    pvs_studio.cfg = "pvs-studio.cfg"
}

pvs_sources = $$pvs_studio.sources
pvs_sources = $$pvs_studio_filter_sources(pvs_sources)
pvs_plogs =
pvs_targets =
for(source, pvs_sources) {
    contains(source, "^/.*$") {
        relpath = $$relative_path("$$source", "$$_PRO_FILE_PWD_")
        !contains(relpath, "^../") {
            source = "$$relpath"
        }
    }
    dir = $$dirname(source)
    isEmpty(dir) {
        dir = "."
    }
    args = $$pvs_studio.args
    dir = $$clean_path("$$OUT_PWD/PVS-Studio/$${dir}")
    log = $$clean_path("$${dir}/$${source}.plog")
    dir = $$dirname(log)
    !contains(source, "^/.*$") {
        source = "$$_PRO_FILE_PWD_/$${source}"
    }
    source = $$clean_path("$$source")
    contains(source, "^.+\\.(cpp|cpp|cc|cx|cxx|cp|c\\+\\+)$") {
        lang_flags=$$pvs_studio.cxxflags $(CXXFLAGS) $(DEFINES) -DPVS_STUDIO
    }
    contains(source, "^.+\\.c$") {
        lang_flags=$$pvs_studio.cflags $(CFLAGS) $(DEFINES) -DPVS_STUDIO
    }
    !isEmpty(pvs_studio.license) {
        args += --lic-file \'$$pvs_studio.license\'
    }
    args += --cfg \'$$pvs_studio.cfg\'
    args += --output-file \'$${log}\'
    args += --source-file \'$${source}\'
    args += --platform linux64
    args += --preprocessor gcc
    args += --cl-params $${lang_flags} $(INCPATH)
    target = $${source}_pvs
    $${target}.target = "$$log"
    $${target}.commands = echo \"$$PVS_CONFIG\" > \'$$pvs_studio.cfg\' && \
                          mkdir -p \'$${dir}\' && \
                          rm -f \'$${log}\' && \
                          pvs-studio $${args} \'$${source}\'
    $${target}.depends = "$${source}"
    pvs_plogs += "$${log}"
    pvs_targets += $${target}
    QMAKE_CLEAN += "$${log}"
    QMAKE_EXTRA_TARGETS += "$${target}"
}

pvs_target = $$pvs_studio.target
$${pvs_target}.depends = $${pvs_targets}
isEmpty(pvs_plogs) {
    $${pvs_target}.commands = echo \"\" > "$$pvs_studio.log"
} else {
    commands = cat $${pvs_plogs} > "$$pvs_studio.log"
    !isEmpty(pvs_studio.output) {
        isEmpty(pvs_studio.format) {
            pvs_studio.format = errorfile
        }
    }
    !isEmpty(pvs_studio.format) {
        commands += && mv \'$$pvs_studio.log\' \'$$pvs_studio.log\'.pvs.raw \
                    && plog-converter -t $$pvs_studio.format -d \'$$SUPPRESS_WARNINGS\' -o \'$$pvs_studio.log\' \'$$pvs_studio.log\'.pvs.raw
    }
    !isEmpty(pvs_studio.output) {
        commands += && cat \'$$pvs_studio.log\' 1>&2
    }
    $${pvs_target}.commands = $${commands}
}

QMAKE_CLEAN += "$$pvs_studio.log"
QMAKE_EXTRA_TARGETS += "$${pvs_target}"

pvs_studio.target = pvs
pvs_studio.output = true
pvs_studio.cxxflags = -std=c++11
pvs_studio.sources = $${SOURCES}

SUPPRESS_WARNINGS=V122
QT_INCLUDE=$$absolute_path($$dirname(QMAKE_QMAKE)/../include)

PVS_CONFIG="\
exclude-path = /usr/include/\n\
exclude-path = /usr/lib64/\n\
exclude-path = /usr/lib/gcc/x86_64-linux-gnu/5/include/\n\
\n\
exclude-path = $$QT_INCLUDE/../mkspecs/linux-g++\n\
exclude-path = $$QT_INCLUDE/Qt3DCore\n\
exclude-path = $$QT_INCLUDE/Qt3DExtras\n\
exclude-path = $$QT_INCLUDE/Qt3DInput\n\
exclude-path = $$QT_INCLUDE/Qt3DLogic\n\
exclude-path = $$QT_INCLUDE/Qt3DQuick\n\
exclude-path = $$QT_INCLUDE/Qt3DQuickExtras\n\
exclude-path = $$QT_INCLUDE/Qt3DQuickInput\n\
exclude-path = $$QT_INCLUDE/Qt3DQuickRender\n\
exclude-path = $$QT_INCLUDE/Qt3DRender\n\
exclude-path = $$QT_INCLUDE/QtBluetooth\n\
exclude-path = $$QT_INCLUDE/QtCharts\n\
exclude-path = $$QT_INCLUDE/QtCLucene\n\
exclude-path = $$QT_INCLUDE/QtConcurrent\n\
exclude-path = $$QT_INCLUDE/QtCore\n\
exclude-path = $$QT_INCLUDE/QtDataVisualization\n\
exclude-path = $$QT_INCLUDE/QtDBus\n\
exclude-path = $$QT_INCLUDE/QtDesigner\n\
exclude-path = $$QT_INCLUDE/QtDesignerComponents\n\
exclude-path = $$QT_INCLUDE/QtGamepad\n\
exclude-path = $$QT_INCLUDE/QtGui\n\
exclude-path = $$QT_INCLUDE/QtHelp\n\
exclude-path = $$QT_INCLUDE/QtLocation\n\
exclude-path = $$QT_INCLUDE/QtMultimedia\n\
exclude-path = $$QT_INCLUDE/QtMultimediaQuick_p\n\
exclude-path = $$QT_INCLUDE/QtMultimediaWidgets\n\
exclude-path = $$QT_INCLUDE/QtNetwork\n\
exclude-path = $$QT_INCLUDE/QtNfc\n\
exclude-path = $$QT_INCLUDE/QtOpenGL\n\
exclude-path = $$QT_INCLUDE/QtOpenGLExtensions\n\
exclude-path = $$QT_INCLUDE/QtPacketProtocol\n\
exclude-path = $$QT_INCLUDE/QtPlatformHeaders\n\
exclude-path = $$QT_INCLUDE/QtPlatformSupport\n\
exclude-path = $$QT_INCLUDE/QtPositioning\n\
exclude-path = $$QT_INCLUDE/QtPrintSupport\n\
exclude-path = $$QT_INCLUDE/QtPurchasing\n\
exclude-path = $$QT_INCLUDE/QtQml\n\
exclude-path = $$QT_INCLUDE/QtQmlDebug\n\
exclude-path = $$QT_INCLUDE/QtQmlDevTools\n\
exclude-path = $$QT_INCLUDE/QtQuick\n\
exclude-path = $$QT_INCLUDE/QtQuickControls2\n\
exclude-path = $$QT_INCLUDE/QtQuickParticles\n\
exclude-path = $$QT_INCLUDE/QtQuickTemplates2\n\
exclude-path = $$QT_INCLUDE/QtQuickTest\n\
exclude-path = $$QT_INCLUDE/QtQuickWidgets\n\
exclude-path = $$QT_INCLUDE/QtScxml\n\
exclude-path = $$QT_INCLUDE/QtSensors\n\
exclude-path = $$QT_INCLUDE/QtSerialBus\n\
exclude-path = $$QT_INCLUDE/QtSerialPort\n\
exclude-path = $$QT_INCLUDE/QtSql\n\
exclude-path = $$QT_INCLUDE/QtSvg\n\
exclude-path = $$QT_INCLUDE/QtTest\n\
exclude-path = $$QT_INCLUDE/QtUiPlugin\n\
exclude-path = $$QT_INCLUDE/QtUiTools\n\
exclude-path = $$QT_INCLUDE/QtWebChannel\n\
exclude-path = $$QT_INCLUDE/QtWebEngine\n\
exclude-path = $$QT_INCLUDE/QtWebEngineCore\n\
exclude-path = $$QT_INCLUDE/QtWebEngineWidgets\n\
exclude-path = $$QT_INCLUDE/QtWebSockets\n\
exclude-path = $$QT_INCLUDE/QtWebView\n\
exclude-path = $$QT_INCLUDE/QtWidgets\n\
exclude-path = $$QT_INCLUDE/QtX11Extras\n\
exclude-path = $$QT_INCLUDE/QtXml\n\
exclude-path = $$QT_INCLUDE/QtXmlPatterns\n\
"

defineReplace(pvs_studio_filter_sources) {
    variable = $$1
    in = $$eval($$variable)
    out =
    for(source, in) {
        contains(source, "^.+\\.(cpp|cpp|cc|cx|cxx|cp|c\\+\\+)$") {
            out += "$${source}"
        }
        contains(source, "^.+\\.c$") {
            out += "$${source}"
        }
    }
    return($${out})
}

isEmpty(pvs_studio.target) {
    pvs_studio.target = pvs_studio
}
isEmpty(pvs_studio.log) {
    contains(pvs_studio.format, "^tasklist$") {
        pvs_studio.log = "$$pvs_studio.target".tasks
    } else {
        pvs_studio.log = "$$pvs_studio.target".log
    }
}
isEmpty(pvs_studio.cfg) {
    pvs_studio.cfg = "pvs-studio.cfg"
}

pvs_sources = $$pvs_studio.sources
pvs_sources = $$pvs_studio_filter_sources(pvs_sources)
pvs_plogs =
pvs_targets =
for(source, pvs_sources) {
    contains(source, "^/.*$") {
        relpath = $$relative_path("$$source", "$$_PRO_FILE_PWD_")
        !contains(relpath, "^../") {
            source = "$$relpath"
        }
    }
    dir = $$dirname(source)
    isEmpty(dir) {
        dir = "."
    }
    args = $$pvs_studio.args
    dir = $$clean_path("$$OUT_PWD/PVS-Studio/$${dir}")
    log = $$clean_path("$${dir}/$${source}.plog")
    dir = $$dirname(log)
    !contains(source, "^/.*$") {
        source = "$$_PRO_FILE_PWD_/$${source}"
    }
    source = $$clean_path("$$source")
    contains(source, "^.+\\.(cpp|cpp|cc|cx|cxx|cp|c\\+\\+)$") {
        lang_flags=$$pvs_studio.cxxflags $(CXXFLAGS) $(DEFINES) -DPVS_STUDIO
    }
    contains(source, "^.+\\.c$") {
        lang_flags=$$pvs_studio.cflags $(CFLAGS) $(DEFINES) -DPVS_STUDIO
    }
    !isEmpty(pvs_studio.license) {
        args += --lic-file \'$$pvs_studio.license\'
    }
    args += --cfg \'$$pvs_studio.cfg\'
    args += --output-file \'$${log}\'
    args += --source-file \'$${source}\'
    args += --platform linux64
    args += --preprocessor gcc
    args += --cl-params $${lang_flags} $(INCPATH)
    target = $${source}_pvs
    $${target}.target = "$$log"
    $${target}.commands = echo \"$$PVS_CONFIG\" > \'$$pvs_studio.cfg\' && \
                          mkdir -p \'$${dir}\' && \
                          rm -f \'$${log}\' && \
                          pvs-studio $${args} \'$${source}\'
    $${target}.depends = "$${source}"
    pvs_plogs += "$${log}"
    pvs_targets += $${target}
    QMAKE_CLEAN += "$${log}"
    QMAKE_EXTRA_TARGETS += "$${target}"
}

pvs_target = $$pvs_studio.target
$${pvs_target}.depends = $${pvs_targets}
isEmpty(pvs_plogs) {
    $${pvs_target}.commands = echo \"\" > "$$pvs_studio.log"
} else {
    commands = cat $${pvs_plogs} > "$$pvs_studio.log"
    !isEmpty(pvs_studio.output) {
        isEmpty(pvs_studio.format) {
            pvs_studio.format = errorfile
        }
    }
    !isEmpty(pvs_studio.format) {
        commands += && mv \'$$pvs_studio.log\' \'$$pvs_studio.log\'.pvs.raw \
                    && plog-converter -t $$pvs_studio.format -d \'$$SUPPRESS_WARNINGS\' -o \'$$pvs_studio.log\' \'$$pvs_studio.log\'.pvs.raw
    }
    !isEmpty(pvs_studio.output) {
        commands += && cat \'$$pvs_studio.log\' 1>&2
    }
    $${pvs_target}.commands = $${commands}
}

QMAKE_CLEAN += "$$pvs_studio.log"
QMAKE_EXTRA_TARGETS += "$${pvs_target}"


Fix effects.pri.

Fix effects.pri.

Reviewed-by: Dmytro Poplavskiy

unix:!mac {
   contains(QT_CONFIG, pulseaudio) {
        DEFINES += QT_MULTIMEDIA_PULSEAUDIO
        HEADERS += $$PWD/qsoundeffect_pulse_p.h
        SOURCES += $$PWD/qsoundeffect_pulse_p.cpp
        LIBS += -lpulse
    } else {
        DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
        HEADERS += $$PWD/qsoundeffect_qmedia_p.h
        SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp
    }
} else {
    HEADERS += $$PWD/qsoundeffect_qsound_p.h
    SOURCES += $$PWD/qsoundeffect_qsound_p.cpp
}

HEADERS += \
    $$PWD/qsoundeffect_p.h \
    $$PWD/wavedecoder_p.h

SOURCES += \
    $$PWD/qsoundeffect.cpp \
    $$PWD/wavedecoder_p.cpp

unix {
    unix:contains(QT_CONFIG, pulseaudio) {
        DEFINES += QT_MULTIMEDIA_PULSEAUDIO
        HEADERS += $$PWD/qsoundeffect_pulse_p.h
        SOURCES += $$PWD/qsoundeffect_pulse_p.cpp
        LIBS += -lpulse
    } else {
        DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
        HEADERS += $$PWD/qsoundeffect_qmedia_p.h
        SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp
    }
} else {
    HEADERS += $$PWD/qsoundeffect_qsound_p.h
    SOURCES += $$PWD/qsoundeffect_qsound_p.cpp
}

HEADERS += \
    $$PWD/qsoundeffect_p.h \
    $$PWD/wavedecoder_p.h

SOURCES += \
    $$PWD/qsoundeffect.cpp \
    $$PWD/wavedecoder_p.cpp