Linux configuration enhancements.

Linux configuration enhancements.

# Begin CVS Header
#   $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/common.pri,v $
#   $Revision: 1.134 $
#   $Name:  $
# End CVS Header

# Copyright (C) 2012 - 2010 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc., University of Heidelberg, and The University
# of Manchester.
# All rights reserved.

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

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

######################################################################
# $Revision: 1.134 $ $Author: shoops $ $Date: 2012/03/09 04:21:14 $
######################################################################

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

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

  } else {
    BUILD_OS = $$system(uname)
    MY_QTDIR = $$system(echo _$QTDIR)
    contains(MY_QTDIR, _) {
      message("Configuring for $${BUILD_OS}.")
    } else {
      message("Configuring for $${BUILD_OS} with QTDIR=$(QTDIR).")
    }
  }
}
DEFINES += $$BUILD_OS

POST_TARGETDEPS += Makefile

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

contains(CONFIG, qt) {
    QT += webkit
}

INCLUDEPATH += $${BUILD_ROOT}
QMAKE_CFLAGS   += $$(CFLAGS)
QMAKE_CXXFLAGS += $$(CXXFLAGS)
QMAKE_LFLAGS  += $$(LDFLAGS)

DEFINES += WITH_CSPMETHOD

# the following flag enables Svens unit indentification code
# right now this still has some bugs and has to be disabled
# for releases
# DEFINES += USE_SBMLUNIT

# enable this to build support for the render extension
# DEFINES += USE_CRENDER_EXTENSION

# enable this to build with Svens layout generation code.
# This allows users to create new layouts for their models.
# This is not finished yet and should not be enabled per default
# DEFINES += COPASI_AUTOLAYOUT
#
# This enables the code for displaying elementary mode analysis results
# in the graph.
# This needs some more testing, but it should be quite stable.
# Since this depends heavily on the existence of layouts, I would only enable it
# once the autolayout has been finished.
#DEFINES += ELEMENTARY_MODE_DISPLAY

# This enables the code for the animation of flux data
# When this is enabled, the time course task will collect data
# on species concentrations or amounts as well as concentration
# or particle fluxes when a time course simulation is run.
# This data can be used by the layout windows to display animations
# of changing species concentrations and/or changing fluxes.
#DEFINES += FLUX_ANIMATION

# this flag enables new code to import layout information from
# CellDesigner annotations
# Right now this is pretty much limited to the bare layout stuff.
#DEFINES += CELLDESIGNER_IMPORT

# enable this to get screenshots from the OpenGL
# framebuffer. These should provide higher quality
# anitaliasing and they should work on more systems
#DEFINES += FRAMEBUFFER_SCREENSHOTS

# flag to use Svens SBML unit identification framework
#define USE_SBMLUNIT

debug {
  DEFINES += COPASI_DEBUG
  DEFINES += COPASI_EXTUNIT
  # DEFINES += WITH_MERGEMODEL
  DEFINES += COPASI_NONLIN_DYN
  }

win32: STATIC_LINKAGE = yes

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

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

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

  QMAKE_LEX = $${BUILD_ROOT}/admin/flex.sh
  QMAKE_YACC = $${BUILD_ROOT}/admin/yacc.sh

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

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

    MY_UNIVERSAL = $$system(echo $UNIVERSAL)
    contains(MY_UNIVERSAL, yes) {
       message("Creating universal 32 bit binaries.")
       CONFIG += x86 ppc
       QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk
    }
  }
  # on Mac OS X 10.6 x86 has to be added to config to make sure COPASI is build
  # as a 32 bit version, gcc on 10.6 builds 64 bit binaries by default
  #CONFIG += x86

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

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

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

  !isEmpty(RAPTOR_PATH){
    LIBS +=  $${RAPTOR_PATH}/lib/libraptor.a
    LIBS += -lcurl -liconv -lxml2 -lxslt -lssl -lz
    INCLUDEPATH += $${RAPTOR_PATH}/include
  } else {
    LIBS += -lraptor -lcurl -liconv -lxml2 -lxslt -lssl -lz
  }

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

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

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

    !isEmpty(QTMML_PATH) {
      contains(QTMML_PATH, yes) {
        release: LIBS += -lQtSolutions_MMLWidget-2.4
        debug:   LIBS += -lQtSolutions_MMLWidget-2.4_debug
      } else {
        release: LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4.a
        debug:   LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4_debug.a
        INCLUDEPATH += $${QTMML_PATH}/include
      }

      DEFINES += HAVE_MML
    }
  }

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

# only needed for the class CLSimpleImageTexturizer which is only
# needed if we want to create bitmaps from layouts in the backend
#  contains(DEFINES, USE_CRENDER_EXTENSION){
#    INCLUDEPATH += /opt/local/include
#    LIBS += -L/opt/local/lib -lpng
#    LIBS += -ljpeg
#  }
}

contains(BUILD_OS, WIN32) {
  CONFIG += debug_and_release

  win32-icc: {
    !build_pass: message("Using Intel Compiler.")
  }

  !contains(QMAKE_HOST.arch, x86_64) {
    !build_pass: message("x86 build")
    COPASI_ARCH = 32
    QMAKE_LFLAGS += /MACHINE:X86
  } else {
    !build_pass: message("x86_64 build")
    COPASI_ARCH = 64
    QMAKE_CFLAGS += /Wp64
    QMAKE_LFLAGS += /MACHINE:X64
  }

  !isEmpty(INTELRD_PATH) {
    QMAKE_LFLAGS   += /LIBPATH:\""$${INTELRD_PATH}"\"
  }

  QMAKE_LEX = C:/cygwin/bin/bash $${BUILD_ROOT}/admin/flex.sh
  QMAKE_YACC = C:/cygwin/bin/bash $${BUILD_ROOT}/admin/yacc.sh

  DEFINES -= UNICODE
  DEFINES += _CRT_SECURE_NO_WARNINGS

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

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE *= -O2

  contains(RUNTIME, MT) {
    release: RUNTIME = MT
    debug:   RUNTIME = MTd

    QMAKE_CFLAGS_RELEASE   -= -MD
    QMAKE_CFLAGS_RELEASE   *= -MT
    QMAKE_CFLAGS_DEBUG     -= -MDd
    QMAKE_CFLAGS_DEBUG     *= -MTd

    QMAKE_CXXFLAGS_RELEASE -= -MD
    QMAKE_CXXFLAGS_RELEASE *= -MT
    QMAKE_CXXFLAGS_DEBUG   -= -MDd
    QMAKE_CXXFLAGS_DEBUG   *= -MTd

    QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcrt.lib"
    QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcrtd.lib"
    QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcprt.lib"
    QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcprtd.lib"

    release: QMAKE_LFLAGS *= /NODEFAULTLIB:"libcmtd.lib"

    debug: QMAKE_LFLAGS *= /NODEFAULTLIB:"libcmt.lib"
  } else {
    release: RUNTIME = MD
    debug:   RUNTIME = MDd

    QMAKE_CFLAGS_RELEASE   -= -MT
    QMAKE_CFLAGS_RELEASE   *= -MD
    QMAKE_CFLAGS_DEBUG     -= -MTd
    QMAKE_CFLAGS_DEBUG     *= -MDd

    QMAKE_CXXFLAGS_RELEASE -= -MT
    QMAKE_CXXFLAGS_RELEASE *= -MD
    QMAKE_CXXFLAGS_DEBUG   -= -MTd
    QMAKE_CXXFLAGS_DEBUG   *= -MDd

    QMAKE_LFLAGS *= /NODEFAULTLIB:"libcmt.lib"
    QMAKE_LFLAGS *= /NODEFAULTLIB:"libcmtd.lib"

    release {
      QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcrtd.lib"
      QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcprtd.lib"
    }

    debug {
      QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcrt.lib"
      QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcprt.lib"
    }
  }

  LIBS += shell32.lib

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    QMAKE_CXXFLAGS += -I\""$${MKL_PATH}"/include\"

    contains(COPASI_ARCH, 32) {
      QMAKE_LFLAGS += /LIBPATH:\""$${MKL_PATH}"/ia32/lib\"
      QMAKE_LFLAGS += /LIBPATH:\""$${MKL_PATH}"/../lib/ia32\"
      LIBS += mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib -Qopenmp libguide.lib
    } else {
      QMAKE_LFLAGS += /LIBPATH:\""$${MKL_PATH}"/em64t/lib\"
      QMAKE_LFLAGS += /LIBPATH:\""$${MKL_PATH}"/../lib/intel64\"
      LIBS += mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib -Qopenmp libguide.lib
    }
  } else {
    !isEmpty(LAPACK_PATH) {
      DEFINES += USE_LAPACK
      QMAKE_CXXFLAGS   += -I\""$${LAPACK_PATH}"/include\"
      QMAKE_LFLAGS += /LIBPATH:\""$${LAPACK_PATH}/lib/$${COPASI_ARCH}"\"
      debug {
        LIBS += blasD.lib lapackD.lib
      }
      release {
        LIBS += blas.lib lapack.lib ifconsol.lib libifcoremt.lib libifport.lib libirc.lib libmmt.lib svml_dispmt.lib
      }
      LIBS += ifconsol.lib libifcoremt.lib libifport.lib libirc.lib libmmt.lib svml_dispmt.lib
    } else {
      !isEmpty(CLAPACK_PATH) {
        DEFINES += USE_CLAPACK
        QMAKE_CXXFLAGS   += -I\""$${CLAPACK_PATH}"/include\"
        QMAKE_LFLAGS += /LIBPATH:\""$${CLAPACK_PATH}"/lib\"
        QMAKE_LFLAGS += /LIBPATH:\""$${CLAPACK_PATH}/lib/$${COPASI_ARCH}"\"
        LIBS += clapack.lib
      } else {
        error( "Either MKL_PATH, LPACK_PATH, or CLAPACK_PATH must be specified" )
      }
    }
  }

#expat library
  LIBS += libexpat$${RUNTIME}.lib

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

  LIBS += libsbml$${RUNTIME}.lib

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

# The raptor library
  LIBS += raptor$${RUNTIME}.lib

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

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      QMAKE_CXXFLAGS += -I\""$${SBW_PATH}"/include\"
      QMAKE_LFLAGS   += /LIBPATH:\""$${SBW_PATH}"/lib\"
      QMAKE_LFLAGS   += /LIBPATH:\""$${SBW_PATH}/lib/$${COPASI_ARCH}"\"

      LIBS    += SBW$${RUNTIME}.lib ws2_32.lib

      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES *= WIN32
    }

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

    release: LIBS += -lqwt
    debug: LIBS += -lqwtD

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

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

    !isEmpty(QTMML_PATH) {
      QMAKE_CXXFLAGS += -I\""$${QTMML_PATH}"/include\"
      QMAKE_LFLAGS   += /LIBPATH:\""$${QTMML_PATH}"/lib\"
      QMAKE_LFLAGS   += /LIBPATH:\""$${QTMML_PATH}/lib/$${COPASI_ARCH}"\"

      release: LIBS +=  -lQtSolutions_MMLWidget-2.4
      debug:   LIBS +=  -lQtSolutions_MMLWidget-2.4d

      DEFINES += HAVE_MML
    }

  }
}

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

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

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

  LIBS += -lsbml -lexpat

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

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

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

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

    !isEmpty(QTMML_PATH) {
      contains(QTMML_PATH, yes) {
        release: LIBS += -lQtSolutions_MMLWidget-2.4
        debug:   LIBS += -lQtSolutions_MMLWidget-2.4_debug
      } else {
        release: LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4.a
        debug:   LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4_debug.a
        INCLUDEPATH += $${QTMML_PATH}/include
      }

      DEFINES += HAVE_MML
    }

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

contains(BUILD_OS, Linux) {

  TARGET_64 = $$system($${QMAKE_CC} -dM -E - < /dev/null | grep -q __x86_64__ && echo true)

  contains(TARGET_64, true) {
    message("Creating 64 bit binaries.")
  }

  INTEL_COMPILER = $$system($${QMAKE_CC} -dM -E - < /dev/null | grep -q __INTEL_COMPILER && echo true)

  contains(INTEL_COMPILER, true) {
    message("Linking statically against Intel libraries.")
    QMAKE_LFLAGS *= -static-intel
  }

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

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

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

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

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

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

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

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

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    INCLUDEPATH *= $${MKL_PATH}/include

    contains(TARGET_64, true) {
      LIBS += -Wl,--start-group \
                $${MKL_PATH}/lib/em64t/libmkl_intel_lp64.a \
                $${MKL_PATH}/lib/em64t/libmkl_sequential.a \
                $${MKL_PATH}/lib/em64t/libmkl_core.a \
              -Wl,--end-group \
              -lpthread
    } else {
      LIBS += $${MKL_PATH}/lib/32/libmkl_solver.a \
              -Wl,--start-group \
                $${MKL_PATH}/lib/32/libmkl_intel.a \
                $${MKL_PATH}/lib/32/libmkl_sequential.a \
                $${MKL_PATH}/lib/32/libmkl_core.a \
              -Wl,--end-group \
              -lpthread
    }

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

        !contains(LAPACK_PATH, yes) {
          INCLUDEPATH *= $${LAPACK_PATH}/include

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

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

    !isEmpty(QWT_PATH):!contains(QWT_PATH, yes) {
      INCLUDEPATH *= $$system($${BUILD_ROOT}/admin/include.sh -i $${QWT_PATH}/include qwt-qt4 qwt)
      LIBS *= -L$${QWT_PATH}/lib
      LIBS += $$system($${BUILD_ROOT}/admin/libs.sh -l $${QWT_PATH}/lib qwt-qt4 qwt)
    } else {
      LIBS += $$system($${BUILD_ROOT}/admin/libs.sh qwt-qt4 qwt)
    }

    LIBS += -lqwt

    !isEmpty(QWT3D_PATH):!contains(QWT_PATH, yes) {
      INCLUDEPATH *= $$system($${BUILD_ROOT}/admin/include.sh -i $${QWT3D_PATH}/include qwtplot3d-qt4 qwtplt3d)
      LIBS *= -L$${QWT3D_PATH}/lib
      LIBS += $$system($${BUILD_ROOT}/admin/libs.sh -l $${QWT3D_PATH}/lib qwtplot3d-qt4 qwtplt3d)
    } else {
      LIBS += $$system($${BUILD_ROOT}/admin/libs.sh qwtplot3d-qt4 qwtplt3d)
    }

    !isEmpty(QTMML_PATH) {
      contains(QTMML_PATH, yes) {
        LIBS += -lQtSolutions_MMLWidget-2.4
      } else {
        LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4.a
        INCLUDEPATH *= $${QTMML_PATH}/include
      }

      DEFINES += HAVE_MML
    }

# only needed for the class CLSimpleImageTexturizer which is only
# needed if we want to create bitmaps from layouts in the backend
#contains(DEFINES,USE_CRENDER_EXTENSION) {
#	LIBS += -lpng
#       LIBS += -ljpeg
#}
  }
}

DEP1.target   = depend
DEP1.depends  = qmake

QMAKE_EXTRA_TARGETS += DEP1

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

# Begin CVS Header
#   $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/common.pri,v $
#   $Revision: 1.133 $
#   $Name:  $
# End CVS Header

# Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc., University of Heidelberg, and The University
# of Manchester.
# All rights reserved.

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

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

######################################################################
# $Revision: 1.133 $ $Author: shoops $ $Date: 2012/02/23 16:07:25 $
######################################################################

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

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

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

POST_TARGETDEPS += Makefile

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

contains(CONFIG, qt) {
    QT += webkit
}

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

DEFINES += WITH_CSPMETHOD

# the following flag enables Svens unit indentification code
# right now this still has some bugs and has to be disabled
# for releases
# DEFINES += USE_SBMLUNIT

# enable this to build support for the render extension
# DEFINES += USE_CRENDER_EXTENSION

# enable this to build with Svens layout generation code.
# This allows users to create new layouts for their models.
# This is not finished yet and should not be enabled per default
# DEFINES += COPASI_AUTOLAYOUT
#
# This enables the code for displaying elementary mode analysis results
# in the graph.
# This needs some more testing, but it should be quite stable.
# Since this depends heavily on the existence of layouts, I would only enable it
# once the autolayout has been finished.
#DEFINES += ELEMENTARY_MODE_DISPLAY

# This enables the code for the animation of flux data
# When this is enabled, the time course task will collect data
# on species concentrations or amounts as well as concentration
# or particle fluxes when a time course simulation is run.
# This data can be used by the layout windows to display animations
# of changing species concentrations and/or changing fluxes.
#DEFINES += FLUX_ANIMATION

# this flag enables new code to import layout information from
# CellDesigner annotations
# Right now this is pretty much limited to the bare layout stuff.
#DEFINES += CELLDESIGNER_IMPORT

# enable this to get screenshots from the OpenGL
# framebuffer. These should provide higher quality
# anitaliasing and they should work on more systems
#DEFINES += FRAMEBUFFER_SCREENSHOTS

# flag to use Svens SBML unit identification framework
#define USE_SBMLUNIT

debug {
  DEFINES += COPASI_DEBUG
  DEFINES += COPASI_EXTUNIT
  # DEFINES += WITH_MERGEMODEL
  DEFINES += COPASI_NONLIN_DYN
  }

win32: STATIC_LINKAGE = yes

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

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

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

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

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

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

    MY_UNIVERSAL = $$system(echo $UNIVERSAL)
    contains(MY_UNIVERSAL, yes) {
       message("Creating universal 32 bit binaries.")
       CONFIG += x86 ppc
       QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk
    }
  }
  # on Mac OS X 10.6 x86 has to be added to config to make sure COPASI is build
  # as a 32 bit version, gcc on 10.6 builds 64 bit binaries by default
  #CONFIG += x86

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

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

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

  !isEmpty(RAPTOR_PATH){
    LIBS +=  $${RAPTOR_PATH}/lib/libraptor.a
    LIBS += -lcurl -liconv -lxml2 -lxslt -lssl -lz
    INCLUDEPATH += $${RAPTOR_PATH}/include
  } else {
    LIBS += -lraptor -lcurl -liconv -lxml2 -lxslt -lssl -lz
  }

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

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

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

    !isEmpty(QTMML_PATH) {
      contains(QTMML_PATH, yes) {
        release: LIBS += -lQtSolutions_MMLWidget-2.4
        debug:   LIBS += -lQtSolutions_MMLWidget-2.4_debug
      } else {
        release: LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4.a
        debug:   LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4_debug.a
        INCLUDEPATH += $${QTMML_PATH}/include
      }

      DEFINES += HAVE_MML
    }
  }

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

# only needed for the class CLSimpleImageTexturizer which is only
# needed if we want to create bitmaps from layouts in the backend
#  contains(DEFINES, USE_CRENDER_EXTENSION){
#    INCLUDEPATH += /opt/local/include
#    LIBS += -L/opt/local/lib -lpng
#    LIBS += -ljpeg
#  }
}

contains(BUILD_OS, WIN32) {
  CONFIG += debug_and_release

  win32-icc: {
    !build_pass: message("Using Intel Compiler.")
  }

  !contains(QMAKE_HOST.arch, x86_64) {
    !build_pass: message("x86 build")
    COPASI_ARCH = 32
    QMAKE_LFLAGS += /MACHINE:X86
  } else {
    !build_pass: message("x86_64 build")
    COPASI_ARCH = 64
    QMAKE_CFLAGS += /Wp64
    QMAKE_LFLAGS += /MACHINE:X64
  }

  !isEmpty(INTELRD_PATH) {
    QMAKE_LFLAGS   += /LIBPATH:\""$${INTELRD_PATH}"\"
  }

  QMAKE_LEX = C:/cygwin/bin/bash ../../admin/flex.sh
  QMAKE_YACC = C:/cygwin/bin/bash ../../admin/yacc.sh

  DEFINES -= UNICODE
  DEFINES += _CRT_SECURE_NO_WARNINGS

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

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE *= -O2

  contains(RUNTIME, MT) {
    release: RUNTIME = MT
    debug:   RUNTIME = MTd

    QMAKE_CFLAGS_RELEASE   -= -MD
    QMAKE_CFLAGS_RELEASE   *= -MT
    QMAKE_CFLAGS_DEBUG     -= -MDd
    QMAKE_CFLAGS_DEBUG     *= -MTd

    QMAKE_CXXFLAGS_RELEASE -= -MD
    QMAKE_CXXFLAGS_RELEASE *= -MT
    QMAKE_CXXFLAGS_DEBUG   -= -MDd
    QMAKE_CXXFLAGS_DEBUG   *= -MTd

    QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcrt.lib"
    QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcrtd.lib"
    QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcprt.lib"
    QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcprtd.lib"

    release: QMAKE_LFLAGS *= /NODEFAULTLIB:"libcmtd.lib"

    debug: QMAKE_LFLAGS *= /NODEFAULTLIB:"libcmt.lib"
  } else {
    release: RUNTIME = MD
    debug:   RUNTIME = MDd

    QMAKE_CFLAGS_RELEASE   -= -MT
    QMAKE_CFLAGS_RELEASE   *= -MD
    QMAKE_CFLAGS_DEBUG     -= -MTd
    QMAKE_CFLAGS_DEBUG     *= -MDd

    QMAKE_CXXFLAGS_RELEASE -= -MT
    QMAKE_CXXFLAGS_RELEASE *= -MD
    QMAKE_CXXFLAGS_DEBUG   -= -MTd
    QMAKE_CXXFLAGS_DEBUG   *= -MDd

    QMAKE_LFLAGS *= /NODEFAULTLIB:"libcmt.lib"
    QMAKE_LFLAGS *= /NODEFAULTLIB:"libcmtd.lib"

    release {
      QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcrtd.lib"
      QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcprtd.lib"
    }

    debug {
      QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcrt.lib"
      QMAKE_LFLAGS *= /NODEFAULTLIB:"msvcprt.lib"
    }
  }

  LIBS += shell32.lib

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    QMAKE_CXXFLAGS += -I\""$${MKL_PATH}"/include\"

    contains(COPASI_ARCH, 32) {
      QMAKE_LFLAGS += /LIBPATH:\""$${MKL_PATH}"/ia32/lib\"
      QMAKE_LFLAGS += /LIBPATH:\""$${MKL_PATH}"/../lib/ia32\"
      LIBS += mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib -Qopenmp libguide.lib
    } else {
      QMAKE_LFLAGS += /LIBPATH:\""$${MKL_PATH}"/em64t/lib\"
      QMAKE_LFLAGS += /LIBPATH:\""$${MKL_PATH}"/../lib/intel64\"
      LIBS += mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib -Qopenmp libguide.lib
    }
  } else {
    !isEmpty(LAPACK_PATH) {
      DEFINES += USE_LAPACK
      QMAKE_CXXFLAGS   += -I\""$${LAPACK_PATH}"/include\"
      QMAKE_LFLAGS += /LIBPATH:\""$${LAPACK_PATH}/lib/$${COPASI_ARCH}"\"
      debug {
        LIBS += blasD.lib lapackD.lib
      }
      release {
        LIBS += blas.lib lapack.lib ifconsol.lib libifcoremt.lib libifport.lib libirc.lib libmmt.lib svml_dispmt.lib
      }
      LIBS += ifconsol.lib libifcoremt.lib libifport.lib libirc.lib libmmt.lib svml_dispmt.lib
    } else {
      !isEmpty(CLAPACK_PATH) {
        DEFINES += USE_CLAPACK
        QMAKE_CXXFLAGS   += -I\""$${CLAPACK_PATH}"/include\"
        QMAKE_LFLAGS += /LIBPATH:\""$${CLAPACK_PATH}"/lib\"
        QMAKE_LFLAGS += /LIBPATH:\""$${CLAPACK_PATH}/lib/$${COPASI_ARCH}"\"
        LIBS += clapack.lib
      } else {
        error( "Either MKL_PATH, LPACK_PATH, or CLAPACK_PATH must be specified" )
      }
    }
  }

#expat library
  LIBS += libexpat$${RUNTIME}.lib

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

  LIBS += libsbml$${RUNTIME}.lib

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

# The raptor library
  LIBS += raptor$${RUNTIME}.lib

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

  contains(CONFIG, qt) {
    !isEmpty(SBW_PATH){
      QMAKE_CXXFLAGS += -I\""$${SBW_PATH}"/include\"
      QMAKE_LFLAGS   += /LIBPATH:\""$${SBW_PATH}"/lib\"
      QMAKE_LFLAGS   += /LIBPATH:\""$${SBW_PATH}/lib/$${COPASI_ARCH}"\"

      LIBS    += SBW$${RUNTIME}.lib ws2_32.lib

      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES *= WIN32
    }

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

    release: LIBS += -lqwt
    debug: LIBS += -lqwtD

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

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

    !isEmpty(QTMML_PATH) {
      QMAKE_CXXFLAGS += -I\""$${QTMML_PATH}"/include\"
      QMAKE_LFLAGS   += /LIBPATH:\""$${QTMML_PATH}"/lib\"
      QMAKE_LFLAGS   += /LIBPATH:\""$${QTMML_PATH}/lib/$${COPASI_ARCH}"\"

      release: LIBS +=  -lQtSolutions_MMLWidget-2.4
      debug:   LIBS +=  -lQtSolutions_MMLWidget-2.4d

      DEFINES += HAVE_MML
    }

  }
}

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

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

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

  LIBS += -lsbml -lexpat

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

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

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

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

    !isEmpty(QTMML_PATH) {
      contains(QTMML_PATH, yes) {
        release: LIBS += -lQtSolutions_MMLWidget-2.4
        debug:   LIBS += -lQtSolutions_MMLWidget-2.4_debug
      } else {
        release: LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4.a
        debug:   LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4_debug.a
        INCLUDEPATH += $${QTMML_PATH}/include
      }

      DEFINES += HAVE_MML
    }

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

contains(BUILD_OS, Linux) {

  TARGET_64 = $$system($CC -dM -E - < /dev/null | grep -q __x86_64__ && echo true)

  contains(TARGET_64, true) {
    message("Creating 64 bit binaries.")
  }

  INTEL_COMPILER = $$system($CC -dM -E - < /dev/null | grep -q __INTEL_COMPILER && echo true)

  contains(INTEL_COMPILER, true) {
    message("Linking statically against Intel libraries.")
    QMAKE_LFLAGS *= -static-intel
  }

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

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

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

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

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

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

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

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

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    INCLUDEPATH += $${MKL_PATH}/include

    contains(TARGET_64, true) {
      LIBS += -Wl,--start-group \
                $${MKL_PATH}/lib/em64t/libmkl_intel_lp64.a \
                $${MKL_PATH}/lib/em64t/libmkl_sequential.a \
                $${MKL_PATH}/lib/em64t/libmkl_core.a \
              -Wl,--end-group \
              -lpthread
    } else {
      LIBS += $${MKL_PATH}/lib/32/libmkl_solver.a \
              -Wl,--start-group \
                $${MKL_PATH}/lib/32/libmkl_intel.a \
                $${MKL_PATH}/lib/32/libmkl_sequential.a \
                $${MKL_PATH}/lib/32/libmkl_core.a \
              -Wl,--end-group \
              -lpthread
    }

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

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

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

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

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

    !isEmpty(QTMML_PATH) {
      contains(QTMML_PATH, yes) {
        release: LIBS += -lQtSolutions_MMLWidget-2.4
        debug:   LIBS += -lQtSolutions_MMLWidget-2.4_debug
      } else {
        release: LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4.a
        debug:   LIBS +=  $${QTMML_PATH}/lib/libQtSolutions_MMLWidget-2.4_debug.a
        INCLUDEPATH += $${QTMML_PATH}/include
      }

      DEFINES += HAVE_MML
    }

# only needed for the class CLSimpleImageTexturizer which is only
# needed if we want to create bitmaps from layouts in the backend
#contains(DEFINES,USE_CRENDER_EXTENSION) {
#	LIBS += -lpng
#       LIBS += -ljpeg
#}
  }
}

DEP1.target   = depend
DEP1.depends  = qmake

QMAKE_EXTRA_TARGETS += DEP1

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


removed tcp server

removed tcp server

INCLUDEPATH += ../tcpserver/

LIBS += -L../build -ltcpserver


Let's release 4.10.5b

Let's release 4.10.5b

#############################################################################
# Application name & version
#############################################################################

APPNAME    = Q Light Controller Plus
FXEDNAME   = Fixture Definition Editor
APPVERSION = 4.10.5b

# Disable these if you don't want to see GIT short hash in the About Box
#unix:REVISION = $$system(git log --pretty=format:'%h' -n 1)
#unix:APPVERSION = $$APPVERSION-r$$REVISION

#############################################################################
# Compiler & linker configuration
#############################################################################

# Treat all compiler warnings as errors
QMAKE_CXXFLAGS += -Werror

CONFIG         += warn_on

# Mobile platforms are QML only
android|ios: CONFIG += qmlui

# Build everything in the order specified in .pro files
CONFIG         += ordered

contains(FORCECONFIG, release) {
  message("Forcing a release build")
  CONFIG += release
  CONFIG -= debug
  #DEFINES += QT_NO_DEBUG_OUTPUT
} else {
  # Enable the following 2 lines when making a release
  CONFIG         += release
  DEFINES        += QT_NO_DEBUG_OUTPUT

  # Disable this when making a release
  CONFIG         -= debug
}

!macx:!ios: {
 system( g++ --version | grep -e "4.6.[0-9]" ) {
   #message("g++ version 4.6 found")
   QMAKE_CXXFLAGS += -Wno-error=strict-overflow
 }
 else {
   QMAKE_CXXFLAGS += -Wno-unused-local-typedefs # Fix to build with GCC 4.8
 }
}

unix:OLA_GIT    = /usr/src/ola    # OLA directories

#macx:CONFIG   += x86 ppc  # Build universal binaries (Leopard only)
macx:CONFIG    -= app_bundle # Let QLC+ construct the .app bundle
macx:QMAKE_STRIP = strip -x
# Qt 5.5 and above
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4) {
  macx:QMAKE_LFLAGS += -Wl,-rpath,@executable_path/../Frameworks
}

# Produce build targets to the source directory
win32:DESTDIR  = ./

# Don't whine about some imports
win32:QMAKE_LFLAGS += -Wl,--enable-auto-import

# Enable unit test coverage measurement ('qmake CONFIG+=coverage' works, too)
#CONFIG        += coverage

#############################################################################
# Installation paths
#############################################################################

# Install root
win32:INSTALLROOT       = $$(SystemDrive)/qlcplus
macx:INSTALLROOT        = ~/QLC+.app/Contents
unix:!macx:INSTALLROOT += /usr
android:INSTALLROOT     = /
ios:INSTALLROOT         = /

# Binaries
win32:BINDIR      =
unix:!macx:BINDIR = bin
macx:BINDIR       = MacOS
android:BINDIR    = bin
ios:BINDIR        =

# Libraries
win32:LIBSDIR      =
unix:!macx:LIBSDIR = lib
macx:LIBSDIR       = Frameworks
android:LIBSDIR    = /libs/armeabi-v7a
ios:LIBSDIR        = lib

# Data
win32:DATADIR      =
unix:!macx:DATADIR = share/qlcplus
macx:DATADIR       = Resources
android:DATADIR    = /assets
ios:DATADIR        =

# User Data
win32:USERDATADIR      = QLC+
unix:!macx:USERDATADIR = .qlcplus
macx:USERDATADIR       = "Library/Application Support/QLC+"
android:USERDATADIR    = .qlcplus
ios:USERDATADIR        = .qlcplus

# Documentation
win32:DOCSDIR      = Documents
unix:!macx:DOCSDIR = $$DATADIR/documents
macx:DOCSDIR       = $$DATADIR/Documents
android:DOCSDIR    = $$DATADIR/documents
ios:DOCSDIR        = Documents

# Input profiles
win32:INPUTPROFILEDIR      = InputProfiles
unix:!macx:INPUTPROFILEDIR = $$DATADIR/inputprofiles
macx:INPUTPROFILEDIR       = $$DATADIR/InputProfiles
android:INPUTPROFILEDIR    = $$DATADIR/inputprofiles
ios:INPUTPROFILEDIR        = InputProfiles

# User input profiles
win32:USERINPUTPROFILEDIR      = $$USERDATADIR/InputProfiles
unix:!macx:USERINPUTPROFILEDIR = $$USERDATADIR/inputprofiles
macx:USERINPUTPROFILEDIR       = $$USERDATADIR/InputProfiles
android:USERINPUTPROFILEDIR    = $$USERDATADIR/inputprofiles
ios:USERINPUTPROFILEDIR        = $$USERDATADIR/InputProfiles

# Midi templates
win32:MIDITEMPLATEDIR      = MidiTemplates
unix:!macx:MIDITEMPLATEDIR = $$DATADIR/miditemplates
macx:MIDITEMPLATEDIR       = $$DATADIR/MidiTemplates
android:MIDITEMPLATEDIR    = $$DATADIR/miditemplates
ios:MIDITEMPLATEDIR        = MidiTemplates

# User midi templates
win32:USERMIDITEMPLATEDIR      = $$USERDATADIR/MidiTemplates
unix:!macx:USERMIDITEMPLATEDIR = $$USERDATADIR/miditemplates
macx:USERMIDITEMPLATEDIR       = $$USERDATADIR/MidiTemplates
android:USERMIDITEMPLATEDIR    = $$USERDATADIR/miditemplates
ios:USERMIDITEMPLATEDIR        = $$USERDATADIR/MidiTemplates

# Channel modifiers templates
win32:MODIFIERSTEMPLATEDIR      = ModifiersTemplates
unix:!macx:MODIFIERSTEMPLATEDIR = $$DATADIR/modifierstemplates
macx:MODIFIERSTEMPLATEDIR       = $$DATADIR/ModifiersTemplates
android:MODIFIERSTEMPLATEDIR    = $$DATADIR/modifierstemplates
ios:MODIFIERSTEMPLATEDIR        = ModifiersTemplates

# User midi templates
win32:USERMODIFIERSTEMPLATEDIR      = $$USERDATADIR/ModifiersTemplates
unix:!macx:USERMODIFIERSTEMPLATEDIR = $$USERDATADIR/modifierstemplates
macx:USERMODIFIERSTEMPLATEDIR       = $$USERDATADIR/ModifiersTemplates
android:USERMODIFIERSTEMPLATEDIR    = $$USERDATADIR/modifierstemplates
ios:USERMODIFIERSTEMPLATEDIR        = $$USERDATADIR/ModifiersTemplates

# Fixtures
win32:FIXTUREDIR      = Fixtures
unix:!macx:FIXTUREDIR = $$DATADIR/fixtures
macx:FIXTUREDIR       = $$DATADIR/Fixtures
android:FIXTUREDIR    = $$DATADIR/fixtures
ios:FIXTUREDIR        = Fixtures

# Gobos
win32:GOBODIR      = Gobos
unix:!macx:GOBODIR = $$DATADIR/gobos
macx:GOBODIR       = $$DATADIR/Gobos
android:GOBODIR    = $$DATADIR/gobos
ios:GOBODIR        = Gobos

# User fixtures
win32:USERFIXTUREDIR      = $$USERDATADIR/Fixtures
unix:!macx:USERFIXTUREDIR = $$USERDATADIR/fixtures
macx:USERFIXTUREDIR       = $$USERDATADIR/Fixtures
android:USERFIXTUREDIR    = $$USERDATADIR/fixtures
ios:USERFIXTUREDIR        = $$USERDATADIR/Fixtures

# Plugins
win32:PLUGINDIR      = Plugins
unix:!macx:PLUGINDIR = $$LIBSDIR/qt4/plugins/qlcplus
macx:PLUGINDIR       = PlugIns
android:PLUGINDIR    = Plugins
ios:PLUGINDIR        = Plugins

# Audio Plugins
win32:AUDIOPLUGINDIR      = $$PLUGINDIR/Audio
unix:!macx:AUDIOPLUGINDIR = $$PLUGINDIR/audio
macx:AUDIOPLUGINDIR       = $$PLUGINDIR/Audio
android:AUDIOPLUGINDIR    = $$PLUGINDIR/Audio
ios:AUDIOPLUGINDIR        = $$PLUGINDIR/Audio

# Translations
win32:TRANSLATIONDIR      =
unix:!macx:TRANSLATIONDIR = $$DATADIR/translations
macx:TRANSLATIONDIR       = $$DATADIR/Translations
android:TRANSLATIONDIR    = $$DATADIR/translations
ios:TRANSLATIONDIR        =

# RGB Scripts
win32:RGBSCRIPTDIR      = RGBScripts
unix:!macx:RGBSCRIPTDIR = $$DATADIR/rgbscripts
macx:RGBSCRIPTDIR       = $$DATADIR/RGBScripts
android:RGBSCRIPTDIR    = $$DATADIR/rgbscripts
ios:RGBSCRIPTDIR        = RGBScripts

# User RGB Scripts
win32:USERRGBSCRIPTDIR      = $$USERDATADIR/RGBScripts
unix:!macx:USERRGBSCRIPTDIR = $$USERDATADIR/rgbscripts
macx:USERRGBSCRIPTDIR       = $$USERDATADIR/RGBScripts
android:USERRGBSCRIPTDIR    = $$USERDATADIR/rgbscripts
ios:USERRGBSCRIPTDIR        = $$USERDATADIR/RGBScripts

# RGB Scripts
win32:WEBFILESDIR      = Web
unix:!macx:WEBFILESDIR = $$DATADIR/web
macx:WEBFILESDIR       = $$DATADIR/Web
android:WEBFILESDIR    = $$DATADIR/web
ios:WEBFILESDIR        = Web

# Samples
win32:SAMPLESDIR       = $$INSTALLROOT
unix:!macx:SAMPLESDIR  = $$INSTALLROOT/$$DATADIR
macx:SAMPLESDIR        = $$INSTALLROOT/$$DATADIR
android:SAMPLESDIR     = $$INSTALLROOT/$$DATADIR
ios:SAMPLESDIR         = $$INSTALLROOT/$$DATADIR

# udev rules
unix:!macx:UDEVRULESDIR = /etc/udev/rules.d

# man
unix:!macx:MANDIR = share/man/man1/

unix:!macx: {
  QTPREFIX = $$[QT_INSTALL_PREFIX]
  IN_USR = $$find(QTPREFIX, "/usr")
  count(IN_USR, 1) {
    QTLIBSDIR = $$[QT_INSTALL_LIBS]
    QTPLUGINSDIR = $$[QT_INSTALL_PLUGINS]
    LIBSDIR = $$replace(QTLIBSDIR, "/usr/", "")
    PLUGINDIR = $$replace(QTPLUGINSDIR, "/usr/", "")/qlcplus
    AUDIOPLUGINDIR = $$PLUGINDIR/audio
  }
  #message("Qt install prefix: "$$[QT_INSTALL_PREFIX])
  #message("Qt install libs: "$$[QT_INSTALL_LIBS])
  #message("Linux libs dir: " $$INSTALLROOT/$$LIBSDIR)
  #message("Linux plugins dir: " $$INSTALLROOT/$$PLUGINDIR)
}

#############################################################################
# Application name & version
#############################################################################

APPNAME    = Q Light Controller Plus
FXEDNAME   = Fixture Definition Editor
APPVERSION = 4.10.6 GIT

# Disable these if you don't want to see GIT short hash in the About Box
#unix:REVISION = $$system(git log --pretty=format:'%h' -n 1)
#unix:APPVERSION = $$APPVERSION-r$$REVISION

#############################################################################
# Compiler & linker configuration
#############################################################################

# Treat all compiler warnings as errors
QMAKE_CXXFLAGS += -Werror

CONFIG         += warn_on

# Mobile platforms are QML only
android|ios: CONFIG += qmlui

# Build everything in the order specified in .pro files
CONFIG         += ordered

contains(FORCECONFIG, release) {
  message("Forcing a release build")
  CONFIG += release
  CONFIG -= debug
  #DEFINES += QT_NO_DEBUG_OUTPUT
} else {
  # Enable the following 2 lines when making a release
  CONFIG         -= release
  #DEFINES        += QT_NO_DEBUG_OUTPUT

  # Disable this when making a release
  CONFIG         += debug
}

!macx:!ios: {
 system( g++ --version | grep -e "4.6.[0-9]" ) {
   #message("g++ version 4.6 found")
   QMAKE_CXXFLAGS += -Wno-error=strict-overflow
 }
 else {
   QMAKE_CXXFLAGS += -Wno-unused-local-typedefs # Fix to build with GCC 4.8
 }
}

unix:OLA_GIT    = /usr/src/ola    # OLA directories

#macx:CONFIG   += x86 ppc  # Build universal binaries (Leopard only)
macx:CONFIG    -= app_bundle # Let QLC+ construct the .app bundle
macx:QMAKE_STRIP = strip -x
# Qt 5.5 and above
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4) {
  macx:QMAKE_LFLAGS += -Wl,-rpath,@executable_path/../Frameworks
}

# Produce build targets to the source directory
win32:DESTDIR  = ./

# Don't whine about some imports
win32:QMAKE_LFLAGS += -Wl,--enable-auto-import

# Enable unit test coverage measurement ('qmake CONFIG+=coverage' works, too)
#CONFIG        += coverage

#############################################################################
# Installation paths
#############################################################################

# Install root
win32:INSTALLROOT       = $$(SystemDrive)/qlcplus
macx:INSTALLROOT        = ~/QLC+.app/Contents
unix:!macx:INSTALLROOT += /usr
android:INSTALLROOT     = /
ios:INSTALLROOT         = /

# Binaries
win32:BINDIR      =
unix:!macx:BINDIR = bin
macx:BINDIR       = MacOS
android:BINDIR    = bin
ios:BINDIR        =

# Libraries
win32:LIBSDIR      =
unix:!macx:LIBSDIR = lib
macx:LIBSDIR       = Frameworks
android:LIBSDIR    = /libs/armeabi-v7a
ios:LIBSDIR        = lib

# Data
win32:DATADIR      =
unix:!macx:DATADIR = share/qlcplus
macx:DATADIR       = Resources
android:DATADIR    = /assets
ios:DATADIR        =

# User Data
win32:USERDATADIR      = QLC+
unix:!macx:USERDATADIR = .qlcplus
macx:USERDATADIR       = "Library/Application Support/QLC+"
android:USERDATADIR    = .qlcplus
ios:USERDATADIR        = .qlcplus

# Documentation
win32:DOCSDIR      = Documents
unix:!macx:DOCSDIR = $$DATADIR/documents
macx:DOCSDIR       = $$DATADIR/Documents
android:DOCSDIR    = $$DATADIR/documents
ios:DOCSDIR        = Documents

# Input profiles
win32:INPUTPROFILEDIR      = InputProfiles
unix:!macx:INPUTPROFILEDIR = $$DATADIR/inputprofiles
macx:INPUTPROFILEDIR       = $$DATADIR/InputProfiles
android:INPUTPROFILEDIR    = $$DATADIR/inputprofiles
ios:INPUTPROFILEDIR        = InputProfiles

# User input profiles
win32:USERINPUTPROFILEDIR      = $$USERDATADIR/InputProfiles
unix:!macx:USERINPUTPROFILEDIR = $$USERDATADIR/inputprofiles
macx:USERINPUTPROFILEDIR       = $$USERDATADIR/InputProfiles
android:USERINPUTPROFILEDIR    = $$USERDATADIR/inputprofiles
ios:USERINPUTPROFILEDIR        = $$USERDATADIR/InputProfiles

# Midi templates
win32:MIDITEMPLATEDIR      = MidiTemplates
unix:!macx:MIDITEMPLATEDIR = $$DATADIR/miditemplates
macx:MIDITEMPLATEDIR       = $$DATADIR/MidiTemplates
android:MIDITEMPLATEDIR    = $$DATADIR/miditemplates
ios:MIDITEMPLATEDIR        = MidiTemplates

# User midi templates
win32:USERMIDITEMPLATEDIR      = $$USERDATADIR/MidiTemplates
unix:!macx:USERMIDITEMPLATEDIR = $$USERDATADIR/miditemplates
macx:USERMIDITEMPLATEDIR       = $$USERDATADIR/MidiTemplates
android:USERMIDITEMPLATEDIR    = $$USERDATADIR/miditemplates
ios:USERMIDITEMPLATEDIR        = $$USERDATADIR/MidiTemplates

# Channel modifiers templates
win32:MODIFIERSTEMPLATEDIR      = ModifiersTemplates
unix:!macx:MODIFIERSTEMPLATEDIR = $$DATADIR/modifierstemplates
macx:MODIFIERSTEMPLATEDIR       = $$DATADIR/ModifiersTemplates
android:MODIFIERSTEMPLATEDIR    = $$DATADIR/modifierstemplates
ios:MODIFIERSTEMPLATEDIR        = ModifiersTemplates

# User midi templates
win32:USERMODIFIERSTEMPLATEDIR      = $$USERDATADIR/ModifiersTemplates
unix:!macx:USERMODIFIERSTEMPLATEDIR = $$USERDATADIR/modifierstemplates
macx:USERMODIFIERSTEMPLATEDIR       = $$USERDATADIR/ModifiersTemplates
android:USERMODIFIERSTEMPLATEDIR    = $$USERDATADIR/modifierstemplates
ios:USERMODIFIERSTEMPLATEDIR        = $$USERDATADIR/ModifiersTemplates

# Fixtures
win32:FIXTUREDIR      = Fixtures
unix:!macx:FIXTUREDIR = $$DATADIR/fixtures
macx:FIXTUREDIR       = $$DATADIR/Fixtures
android:FIXTUREDIR    = $$DATADIR/fixtures
ios:FIXTUREDIR        = Fixtures

# Gobos
win32:GOBODIR      = Gobos
unix:!macx:GOBODIR = $$DATADIR/gobos
macx:GOBODIR       = $$DATADIR/Gobos
android:GOBODIR    = $$DATADIR/gobos
ios:GOBODIR        = Gobos

# User fixtures
win32:USERFIXTUREDIR      = $$USERDATADIR/Fixtures
unix:!macx:USERFIXTUREDIR = $$USERDATADIR/fixtures
macx:USERFIXTUREDIR       = $$USERDATADIR/Fixtures
android:USERFIXTUREDIR    = $$USERDATADIR/fixtures
ios:USERFIXTUREDIR        = $$USERDATADIR/Fixtures

# Plugins
win32:PLUGINDIR      = Plugins
unix:!macx:PLUGINDIR = $$LIBSDIR/qt4/plugins/qlcplus
macx:PLUGINDIR       = PlugIns
android:PLUGINDIR    = Plugins
ios:PLUGINDIR        = Plugins

# Audio Plugins
win32:AUDIOPLUGINDIR      = $$PLUGINDIR/Audio
unix:!macx:AUDIOPLUGINDIR = $$PLUGINDIR/audio
macx:AUDIOPLUGINDIR       = $$PLUGINDIR/Audio
android:AUDIOPLUGINDIR    = $$PLUGINDIR/Audio
ios:AUDIOPLUGINDIR        = $$PLUGINDIR/Audio

# Translations
win32:TRANSLATIONDIR      =
unix:!macx:TRANSLATIONDIR = $$DATADIR/translations
macx:TRANSLATIONDIR       = $$DATADIR/Translations
android:TRANSLATIONDIR    = $$DATADIR/translations
ios:TRANSLATIONDIR        =

# RGB Scripts
win32:RGBSCRIPTDIR      = RGBScripts
unix:!macx:RGBSCRIPTDIR = $$DATADIR/rgbscripts
macx:RGBSCRIPTDIR       = $$DATADIR/RGBScripts
android:RGBSCRIPTDIR    = $$DATADIR/rgbscripts
ios:RGBSCRIPTDIR        = RGBScripts

# User RGB Scripts
win32:USERRGBSCRIPTDIR      = $$USERDATADIR/RGBScripts
unix:!macx:USERRGBSCRIPTDIR = $$USERDATADIR/rgbscripts
macx:USERRGBSCRIPTDIR       = $$USERDATADIR/RGBScripts
android:USERRGBSCRIPTDIR    = $$USERDATADIR/rgbscripts
ios:USERRGBSCRIPTDIR        = $$USERDATADIR/RGBScripts

# RGB Scripts
win32:WEBFILESDIR      = Web
unix:!macx:WEBFILESDIR = $$DATADIR/web
macx:WEBFILESDIR       = $$DATADIR/Web
android:WEBFILESDIR    = $$DATADIR/web
ios:WEBFILESDIR        = Web

# Samples
win32:SAMPLESDIR       = $$INSTALLROOT
unix:!macx:SAMPLESDIR  = $$INSTALLROOT/$$DATADIR
macx:SAMPLESDIR        = $$INSTALLROOT/$$DATADIR
android:SAMPLESDIR     = $$INSTALLROOT/$$DATADIR
ios:SAMPLESDIR         = $$INSTALLROOT/$$DATADIR

# udev rules
unix:!macx:UDEVRULESDIR = /etc/udev/rules.d

# man
unix:!macx:MANDIR = share/man/man1/

unix:!macx: {
  QTPREFIX = $$[QT_INSTALL_PREFIX]
  IN_USR = $$find(QTPREFIX, "/usr")
  count(IN_USR, 1) {
    QTLIBSDIR = $$[QT_INSTALL_LIBS]
    QTPLUGINSDIR = $$[QT_INSTALL_PLUGINS]
    LIBSDIR = $$replace(QTLIBSDIR, "/usr/", "")
    PLUGINDIR = $$replace(QTPLUGINSDIR, "/usr/", "")/qlcplus
    AUDIOPLUGINDIR = $$PLUGINDIR/audio
  }
  #message("Qt install prefix: "$$[QT_INSTALL_PREFIX])
  #message("Qt install libs: "$$[QT_INSTALL_LIBS])
  #message("Linux libs dir: " $$INSTALLROOT/$$LIBSDIR)
  #message("Linux plugins dir: " $$INSTALLROOT/$$PLUGINDIR)
}


Fix compilation with Qt 5 / nmake / shadow builds

qmake/qt4 included the source directory automatically for most plugins,
which got dropped in qt 5 (change 0f548b1744e2). Make sure it's
included again ...

Change-Id: Ief06cf9b3c7afd8432df7511df5f917023d477ef
Reviewed-by: Oswald Buddenhagen <6a8868beda3e139b5ac22b2534a23d3e6ba81819@nokia.com>
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@nokia.com>
Reviewed-by: Friedemann Kleint <1b9f2592239daaec4856ccc1cfb4d2d55b35fb71@nokia.com>

include(../qtcreator.pri)

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

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

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

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

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

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

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

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

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

# put .pro file directory in INCLUDEPATH
CONFIG += include_source_dir

contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols

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

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

TARGET = $$qtLibraryName($$TARGET)

include(../qtcreator.pri)

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

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

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

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

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

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

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

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

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

contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols

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

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

TARGET = $$qtLibraryName($$TARGET)


adjust to new requirement of .private_includes needing to be complete

Change-Id: Iac28a3e2a49fc710e27e401344e899c2ffbefe31
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@nokia.com>

QT.activeqt.VERSION = 5.0.0
QT.activeqt.MAJOR_VERSION = 5
QT.activeqt.MINOR_VERSION = 0
QT.activeqt.PATCH_VERSION = 0

QT.activeqt.name = ActiveQt
QT.activeqt.bins = $$QT_MODULE_BIN_BASE
QT.activeqt.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/ActiveQt
QT.activeqt.private_includes = $$QT_MODULE_INCLUDE_BASE/ActiveQt/$$QT.activeqt.VERSION $$QT_MODULE_INCLUDE_BASE/ActiveQt/$$QT.activeqt.VERSION/ActiveQt
QT.activeqt.sources = $$QT_MODULE_BASE/src/activeqt
QT.activeqt.libs = $$QT_MODULE_LIB_BASE
QT.activeqt.plugins = $$QT_MODULE_PLUGIN_BASE
QT.activeqt.imports = $$QT_MODULE_IMPORT_BASE
QT.activeqt.depends = gui
QT.activeqt.DEFINES = QT_ACTIVEQT_LIB

QT_CONFIG += activeqt

QT.activeqt.VERSION = 5.0.0
QT.activeqt.MAJOR_VERSION = 5
QT.activeqt.MINOR_VERSION = 0
QT.activeqt.PATCH_VERSION = 0

QT.activeqt.name = ActiveQt
QT.activeqt.bins = $$QT_MODULE_BIN_BASE
QT.activeqt.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/ActiveQt
QT.activeqt.private_includes = $$QT_MODULE_INCLUDE_BASE/ActiveQt/$$QT.activeqt.VERSION
QT.activeqt.sources = $$QT_MODULE_BASE/src/activeqt
QT.activeqt.libs = $$QT_MODULE_LIB_BASE
QT.activeqt.plugins = $$QT_MODULE_PLUGIN_BASE
QT.activeqt.imports = $$QT_MODULE_IMPORT_BASE
QT.activeqt.depends = gui
QT.activeqt.DEFINES = QT_ACTIVEQT_LIB

QT_CONFIG += activeqt


declare Qt dependencies in qxmpp.pri, to make it easier to use QXmpp

# Common definitions

QT += network xml
QXMPP_INCLUDE_DIR = $$PWD/src
QXMPP_LIBRARY_DIR = $$PWD/lib

CONFIG(debug, debug|release) {
    QXMPP_LIBRARY_NAME = qxmpp_d
} else {
    QXMPP_LIBRARY_NAME = qxmpp
}

# Libraries used internal by QXmpp
symbian {
    QXMPP_INTERNAL_LIBS = -lesock
} else:unix {
    QXMPP_INTERNAL_LIBS = -lresolv
} else:win32 {
    QXMPP_INTERNAL_LIBS = -ldnsapi
}

# Libraries for apps which use QXmpp
symbian {
    # Symbian needs a .lib extension to recognise the library as static
    QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}.lib
} else {
    QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}
}

# FIXME: we should be able to use the link_prl option to automatically pull
# in the extra libraries which the qxmpp library needs, but this does not
# seem to work on win32, so we specify the dependencies here:
QXMPP_LIBS += $$QXMPP_INTERNAL_LIBS

# Path of the QXmpp library file, for expressing dependency.
symbian {
} else:unix {
    QXMPP_LIBRARY_FILE = $${QXMPP_LIBRARY_DIR}/lib$${QXMPP_LIBRARY_NAME}.a
}

# Common definitions

QXMPP_INCLUDE_DIR = $$PWD/src
QXMPP_LIBRARY_DIR = $$PWD/lib

CONFIG(debug, debug|release) {
    QXMPP_LIBRARY_NAME = qxmpp_d
} else {
    QXMPP_LIBRARY_NAME = qxmpp
}

# Libraries used internal by QXmpp
symbian {
    QXMPP_INTERNAL_LIBS = -lesock
} else:unix {
    QXMPP_INTERNAL_LIBS = -lresolv
} else:win32 {
    QXMPP_INTERNAL_LIBS = -ldnsapi
}

# Libraries for apps which use QXmpp
symbian {
    # Symbian needs a .lib extension to recognise the library as static
    QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}.lib
} else {
    QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}
}

# FIXME: we should be able to use the link_prl option to automatically pull
# in the extra libraries which the qxmpp library needs, but this does not
# seem to work on win32, so we specify the dependencies here:
QXMPP_LIBS += $$QXMPP_INTERNAL_LIBS

# Path of the QXmpp library file, for expressing dependency.
symbian {
} else:unix {
    QXMPP_LIBRARY_FILE = $${QXMPP_LIBRARY_DIR}/lib$${QXMPP_LIBRARY_NAME}.a
}


Added QMAKE_LFLAGS to win32 gcc compilation

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

include($$PWD/win32.pri)

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

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

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

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

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

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

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

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

include($$PWD/win32.pri)

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

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

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

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

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

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

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


Build file updates

Build file updates

RAINTK_BUILD_INFO_CONFIG = Unknown
RAINTK_BUILD_INFO_PLATFORM = Unknown
RAINTK_BUILD_INFO_SPEC = $$[QMAKE_XSPEC]
RAINTK_BUILD_INFO_ARCH = $${QT_ARCH}

CONFIG(debug,debug|release) {
    RAINTK_BUILD_INFO_CONFIG = Debug
    DEFINES += RAINTK_BUILD_DEBUG
}

CONFIG(release,debug|release) {
    RAINTK_BUILD_INFO_CONFIG = Release
}

android {
    RAINTK_BUILD_INFO_PLATFORM = Android
}
linux {
    !android {
        RAINTK_BUILD_INFO_PLATFORM = Linux
    }
}
macx {
    RAINTK_BUILD_INFO_PLATFORM = OSX
}
ios {
    RAINTK_BUILD_INFO_PLATFORM = iOS
}
win32 {
    RAINTK_BUILD_INFO_PLATFORM = Windows
}

message("raintk: Build Info: $${RAINTK_BUILD_INFO_PLATFORM}, $${RAINTK_BUILD_INFO_SPEC}, $${RAINTK_BUILD_INFO_ARCH}, $${RAINTK_BUILD_INFO_CONFIG}")

linux_x11 {
    DEFINES += RAINTK_ENV_LINUX_X11
}
android {
    DEFINES += RAINTK_ENV_ANDROID
}

INCLUDEPATH += $${PATH_RAINTK}

# thirdparty
INCLUDEPATH += $${PATH_RAINTK}/raintk/thirdparty

# clipper
HEADERS += \
    $${PATH_RAINTK}/raintk/thirdparty/clipper/clipper.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/thirdparty/clipper/clipper.cpp

# shaders
HEADERS += \
    $${PATH_RAINTK}/raintk/shaders/*.hpp

# core
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkConfig.hpp \
    $${PATH_RAINTK}/raintk/RainTkGlobal.hpp \
    $${PATH_RAINTK}/raintk/RainTkUnits.hpp \
    $${PATH_RAINTK}/raintk/RainTkLog.hpp \
    $${PATH_RAINTK}/raintk/RainTkProperty.hpp \
    $${PATH_RAINTK}/raintk/RainTkSceneKey.hpp \
    $${PATH_RAINTK}/raintk/RainTkComponents.hpp \
    $${PATH_RAINTK}/raintk/RainTkDrawKey.hpp \
    $${PATH_RAINTK}/raintk/RainTkAnimation.hpp \
    $${PATH_RAINTK}/raintk/RainTkTween.hpp \
    $${PATH_RAINTK}/raintk/RainTkPropertyAnimation.hpp \
    $${PATH_RAINTK}/raintk/RainTkMainDrawStage.hpp \
    $${PATH_RAINTK}/raintk/RainTkInputListener.hpp \
    $${PATH_RAINTK}/raintk/RainTkInputSystem.hpp \
    $${PATH_RAINTK}/raintk/RainTkAnimationSystem.hpp \
    $${PATH_RAINTK}/raintk/RainTkTransformSystem.hpp \
    $${PATH_RAINTK}/raintk/RainTkDrawSystem.hpp \
    $${PATH_RAINTK}/raintk/RainTkScene.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkUnits.cpp \
    $${PATH_RAINTK}/raintk/RainTkComponents.cpp \
    $${PATH_RAINTK}/raintk/RainTkDrawKey.cpp \
    $${PATH_RAINTK}/raintk/RainTkAnimation.cpp \
    $${PATH_RAINTK}/raintk/RainTkTween.cpp \
    $${PATH_RAINTK}/raintk/RainTkLog.cpp \
    $${PATH_RAINTK}/raintk/RainTkMainDrawStage.cpp \
    $${PATH_RAINTK}/raintk/RainTkInputListener.cpp \
    $${PATH_RAINTK}/raintk/RainTkInputSystem.cpp \
    $${PATH_RAINTK}/raintk/RainTkAnimationSystem.cpp \
    $${PATH_RAINTK}/raintk/RainTkTransformSystem.cpp \
    $${PATH_RAINTK}/raintk/RainTkDrawSystem.cpp \
    $${PATH_RAINTK}/raintk/RainTkScene.cpp

# models
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkListModel.hpp \
    $${PATH_RAINTK}/raintk/RainTkListModelSTLVector.hpp \
    $${PATH_RAINTK}/raintk/RainTkListDelegate.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkListModel.cpp

# helpers
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkAlignment.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkAlignment.cpp

# widget
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkWidget.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkWidget.cpp

# widgets (basic)
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkDrawableWidget.hpp \
    $${PATH_RAINTK}/raintk/RainTkRectangle.hpp \
    $${PATH_RAINTK}/raintk/RainTkImage.hpp \
    $${PATH_RAINTK}/raintk/RainTkText.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkDrawableWidget.cpp \
    $${PATH_RAINTK}/raintk/RainTkRectangle.cpp \
    $${PATH_RAINTK}/raintk/RainTkImage.cpp \
    $${PATH_RAINTK}/raintk/RainTkText.cpp

# widgets (inputs)
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkInputArea.hpp \
    $${PATH_RAINTK}/raintk/RainTkSinglePointArea.hpp \
    $${PATH_RAINTK}/raintk/RainTkScrollArea.hpp \
    $${PATH_RAINTK}/raintk/RainTkScrollBar.hpp
#    $${PATH_RAINTK}/raintk/RainTkMouseArea.hpp \

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkInputArea.cpp \
    $${PATH_RAINTK}/raintk/RainTkSinglePointArea.cpp \
    $${PATH_RAINTK}/raintk/RainTkScrollArea.cpp
#    $${PATH_RAINTK}/raintk/RainTkMouseArea.cpp \

# widgets (layout)
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkColumn.hpp \
    $${PATH_RAINTK}/raintk/RainTkRow.hpp \
    $${PATH_RAINTK}/raintk/RainTkGrid.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkColumn.cpp \
    $${PATH_RAINTK}/raintk/RainTkRow.cpp \
    $${PATH_RAINTK}/raintk/RainTkGrid.cpp

# test
DEFINES += RAINTK_DEBUG_TEST_DRAW_SYSTEM

# test resources
SOURCES += \
    $${PATH_RAINTK}/raintk/test/RainTkTestFontResource.cpp \
    $${PATH_RAINTK}/raintk/test/RainTkTestImageResources.cpp

# individual tests
HEADERS += \
    $${PATH_RAINTK}/raintk/test/RainTkTestContext.hpp

SOURCES += \
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawSystemOpaqueSingle.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawSystemOpaqueMultiple.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawSystemClipping.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawSystemTransparency.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawableIds.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestBoundingBoxes.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestTransforms.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestRectangle.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestAnimation.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestClipping.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestClippingPolys.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestImage.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestRow.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestGrid.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestInputCanceling.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestSinglePointArea.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestMouseArea.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestScrollArea.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestScrollAreaInputPassThrough.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestScrollAreaInputPassThrough2.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestText.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestPropertiesAndUpdateOrder.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestUpdateHierarchy.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestAlignment.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestListView.cpp

RAINTK_BUILD_INFO_CONFIG = Unknown
RAINTK_BUILD_INFO_PLATFORM = Unknown
RAINTK_BUILD_INFO_SPEC = $$[QMAKE_XSPEC]
RAINTK_BUILD_INFO_ARCH = $${QT_ARCH}

CONFIG(debug,debug|release) {
    RAINTK_BUILD_INFO_CONFIG = Debug
    DEFINES += RAINTK_BUILD_DEBUG
}

CONFIG(release,debug|release) {
    RAINTK_BUILD_INFO_CONFIG = Release
}

android {
    RAINTK_BUILD_INFO_PLATFORM = Android
}
linux {
    !android {
        RAINTK_BUILD_INFO_PLATFORM = Linux
    }
}
macx {
    RAINTK_BUILD_INFO_PLATFORM = OSX
}
ios {
    RAINTK_BUILD_INFO_PLATFORM = iOS
}
win32 {
    RAINTK_BUILD_INFO_PLATFORM = Windows
}

message("raintk: Build Info: $${RAINTK_BUILD_INFO_PLATFORM}, $${RAINTK_BUILD_INFO_SPEC}, $${RAINTK_BUILD_INFO_ARCH}, $${RAINTK_BUILD_INFO_CONFIG}")

linux_x11 {
    DEFINES += RAINTK_ENV_LINUX_X11
}
android {
    DEFINES += RAINTK_ENV_ANDROID
}

INCLUDEPATH += $${PATH_RAINTK}

# thirdparty
INCLUDEPATH += $${PATH_RAINTK}/raintk/thirdparty

# clipper
HEADERS += \
    $${PATH_RAINTK}/raintk/thirdparty/clipper/clipper.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/thirdparty/clipper/clipper.cpp

# shaders
HEADERS += \
    $${PATH_RAINTK}/raintk/shaders/*.hpp

# core
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkConfig.hpp \
    $${PATH_RAINTK}/raintk/RainTkGlobal.hpp \
    $${PATH_RAINTK}/raintk/RainTkUnits.hpp \
    $${PATH_RAINTK}/raintk/RainTkLog.hpp \
    $${PATH_RAINTK}/raintk/RainTkProperty.hpp \
    $${PATH_RAINTK}/raintk/RainTkSceneKey.hpp \
    $${PATH_RAINTK}/raintk/RainTkComponents.hpp \
    $${PATH_RAINTK}/raintk/RainTkDrawKey.hpp \
    $${PATH_RAINTK}/raintk/RainTkAnimation.hpp \
    $${PATH_RAINTK}/raintk/RainTkTween.hpp \
    $${PATH_RAINTK}/raintk/RainTkPropertyAnimation.hpp \
    $${PATH_RAINTK}/raintk/RainTkMainDrawStage.hpp \
    $${PATH_RAINTK}/raintk/RainTkInputSystem.hpp \
    $${PATH_RAINTK}/raintk/RainTkAnimationSystem.hpp \
    $${PATH_RAINTK}/raintk/RainTkTransformSystem.hpp \
    $${PATH_RAINTK}/raintk/RainTkDrawSystem.hpp \
    $${PATH_RAINTK}/raintk/RainTkScene.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkUnits.cpp \
    $${PATH_RAINTK}/raintk/RainTkComponents.cpp \
    $${PATH_RAINTK}/raintk/RainTkDrawKey.cpp \
    $${PATH_RAINTK}/raintk/RainTkAnimation.cpp \
    $${PATH_RAINTK}/raintk/RainTkTween.cpp \
    $${PATH_RAINTK}/raintk/RainTkLog.cpp \
    $${PATH_RAINTK}/raintk/RainTkMainDrawStage.cpp \
    $${PATH_RAINTK}/raintk/RainTkInputSystem.cpp \
    $${PATH_RAINTK}/raintk/RainTkAnimationSystem.cpp \
    $${PATH_RAINTK}/raintk/RainTkTransformSystem.cpp \
    $${PATH_RAINTK}/raintk/RainTkDrawSystem.cpp \
    $${PATH_RAINTK}/raintk/RainTkScene.cpp

# models
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkListModel.hpp \
    $${PATH_RAINTK}/raintk/RainTkListModelSTLVector.hpp \
    $${PATH_RAINTK}/raintk/RainTkListDelegate.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkListModel.cpp

# widgets (basic)
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkWidget.hpp \
    $${PATH_RAINTK}/raintk/RainTkDrawableWidget.hpp \
    $${PATH_RAINTK}/raintk/RainTkRectangle.hpp \
    $${PATH_RAINTK}/raintk/RainTkImage.hpp \
    $${PATH_RAINTK}/raintk/RainTkText.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkWidget.cpp \
    $${PATH_RAINTK}/raintk/RainTkDrawableWidget.cpp \
    $${PATH_RAINTK}/raintk/RainTkRectangle.cpp \
    $${PATH_RAINTK}/raintk/RainTkImage.cpp \
    $${PATH_RAINTK}/raintk/RainTkText.cpp

# widgets (inputs)
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkInputArea.hpp \
    $${PATH_RAINTK}/raintk/RainTkMouseArea.hpp \
    $${PATH_RAINTK}/raintk/RainTkSinglePointArea.hpp \
    $${PATH_RAINTK}/raintk/RainTkScrollArea.hpp \
    $${PATH_RAINTK}/raintk/RainTkScrollBar.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkInputArea.cpp \
    $${PATH_RAINTK}/raintk/RainTkMouseArea.cpp \
    $${PATH_RAINTK}/raintk/RainTkSinglePointArea.cpp \
    $${PATH_RAINTK}/raintk/RainTkScrollArea.cpp \
    $${PATH_RAINTK}/raintk/RainTkScrollBar.cpp

# widgets (layout)
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkColumn.hpp \
    $${PATH_RAINTK}/raintk/RainTkRow.hpp \
    $${PATH_RAINTK}/raintk/RainTkGrid.hpp

SOURCES += \
    $${PATH_RAINTK}/raintk/RainTkColumn.cpp \
    $${PATH_RAINTK}/raintk/RainTkRow.cpp \
    $${PATH_RAINTK}/raintk/RainTkGrid.cpp

# widgets (view)
HEADERS += \
    $${PATH_RAINTK}/raintk/RainTkFixedListView.hpp

# test
DEFINES += RAINTK_DEBUG_TEST_DRAW_SYSTEM

# test resources
SOURCES += \
    $${PATH_RAINTK}/raintk/test/RainTkTestFontResource.cpp \
    $${PATH_RAINTK}/raintk/test/RainTkTestImageResources.cpp

# individual tests
HEADERS += \
    $${PATH_RAINTK}/raintk/test/RainTkTestContext.hpp

SOURCES += \
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawSystemOpaqueSingle.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawSystemOpaqueMultiple.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawSystemClipping.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawSystemTransparency.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestDrawableIds.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestBoundingBoxes.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestTransforms.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestRectangle.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestAnimation.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestClipping.cpp
    $${PATH_RAINTK}/raintk/test/RainTkTestClippingPolys.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestImage.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestRow.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestGrid.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestInputCanceling.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestSinglePointArea.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestMouseArea.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestScrollArea.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestScrollAreaInputPassThrough.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestScrollAreaInputPassThrough2.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestText.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestPropertiesAndUpdateOrder.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestUpdateHierarchy.cpp
#    $${PATH_RAINTK}/raintk/test/RainTkTestListView.cpp