Fix: right usage for appver

Fix: right usage for appver

#appver, win/lin version system
APP_FULL_VERSION_TAG=NA
APP_SHORT_VERSION_TAG=NA
unix {
  exists( /usr/bin/appver ) {
    #APP_BUILD_DATE=$$system(/usr/bin/appver | grep APP_BUILD_DATE | awk -F= '{print $2}')
    #APP_FULL_VERSION_TAG=$$system(/usr/bin/appver | grep APP_FULL_VERSION_TAG | awk -F= '{print $2}')
    #APP_SHORT_VERSION_TAG=$$system(/usr/bin/appver | grep APP_SHORT_VERSION_TAG | awk -F= '{print $2}')
    system(/usr/bin/appver > ./appver.pri)
    include(./appver.pri)
  } else {
    APP_BUILD_DATE=$$system(date +'\"%Y%m%d_%H%M\"')
    APP_FULL_VERSION_TAG=$$system(git describe --tags  --dirty=* 2> /dev/null)
    APP_SHORT_VERSION_TAG=$$system(git describe --tags --abbrev=0 2> /dev/null)
  }
}
win32 {
  APP_BUILD_DATE=$$system(echo \"%date:~9,4%%date:~6,2%%date:~3,2%_%time:~0,2%%time:~3,2%\")
  exists("C:\\progs\\Git\\bin\\sh.exe") {
      APP_FULL_VERSION_TAG=$$system("C:\\progs\\Git\\bin\\sh.exe" -c \"/bin/git describe --tags  --dirty=* 2> /dev/null  \")
      APP_SHORT_VERSION_TAG=$$system("C:\\progs\\Git\\bin\\sh.exe" -c \"/bin/git describe --tags --abbrev=0 2> /dev/null  \")
   }
}
message("APP_BUILD_DATE = " $$APP_BUILD_DATE)
DEFINES += APP_DATE=\\\"$$APP_BUILD_DATE\\\"
message("APP_FULL_VERSION_TAG = " $$APP_FULL_VERSION_TAG)
DEFINES += APP_FULL_VERSION_TAG=\\\"$$APP_FULL_VERSION_TAG\\\"
DEFINES += APP_SHORT_VERSION_TAG=\\\"$$APP_SHORT_VERSION_TAG\\\"
message("APP_SHORT_VERSION_TAG = " $$APP_SHORT_VERSION_TAG)

#QT info
message("QT_VERSION = " $${QT_VERSION})
DEFINES += QMAKE_QMAKE=\\\"$${QMAKE_QMAKE}\\\"
message("QMAKE_QMAKE = " $${QMAKE_QMAKE})
DEFINES += QMAKE_QT_DLL=\\\"$${QMAKE_QT_DLL}\\\"
message("QMAKE_QT_DLL = " $${QMAKE_QT_DLL})

DEFINES += APPLICATION_NAME=\\\"${QMAKE_TARGET}\\\"

QT          = core gui xml

# All generated files goes to the same directory
win32:INSTALL_ROOT= /progs/semaphored

#appver, win/lin version system
APP_VERSION_FULL=NA
APP_VERSION_SHORT=NA
unix {
  exists( /usr/bin/appver ) {
    . /usr/bin/appver
  } else {
    APP_DATE_SYS=$$system(date +'\"%Y%m%d_%H%M\"')
    APP_VERSION_FULL=$$system(git describe --tags  --dirty=* 2> /dev/null)
    APP_VERSION_SHORT=$$system(git describe --tags --abbrev=0 2> /dev/null)
  }
}
win32 {
  APP_DATE_SYS=$$system(echo \"%date:~9,4%%date:~6,2%%date:~3,2%_%time:~0,2%%time:~3,2%\")
  exists("C:\\progs\\Git\\bin\\sh.exe") {
      APP_VERSION_FULL=$$system("C:\\progs\\Git\\bin\\sh.exe" -c \"/bin/git describe --tags  --dirty=* 2> /dev/null  \")
      APP_VERSION_SHORT=$$system("C:\\progs\\Git\\bin\\sh.exe" -c \"/bin/git describe --tags --abbrev=0 2> /dev/null  \")
   }
}
message("APP_DATE_SYS = " $$APP_DATE_SYS)
DEFINES += APP_DATE=\\\"$$APP_DATE_SYS\\\"
message("APP_VERSION_FULL = " $$APP_VERSION_FULL)
DEFINES += APP_VERSION_FULL=\\\"$$APP_VERSION_FULL\\\"
DEFINES += APP_VERSION_SHORT=\\\"$$APP_VERSION_SHORT\\\"
message("APP_VERSION_SHORT = " $$APP_VERSION_SHORT)

#QT info
message("QT_VERSION = " $${QT_VERSION})
DEFINES += QMAKE_QMAKE=\\\"$${QMAKE_QMAKE}\\\"
message("QMAKE_QMAKE = " $${QMAKE_QMAKE})
DEFINES += QMAKE_QT_DLL=\\\"$${QMAKE_QT_DLL}\\\"
message("QMAKE_QT_DLL = " $${QMAKE_QT_DLL})

DEFINES += APPLICATION_NAME=\\\"${QMAKE_TARGET}\\\"

QT          = core gui xml

# All generated files goes to the same directory
win32:INSTALL_ROOT= /progs/semaphored


[gcc] Enabled additional warnings

[gcc] Enabled additional warnings

# This file is a template commmon for all qmake projects.
#
# To use it, define ROOT_DIR variable and include($$ROOT_DIR/common.pri)

# our own version variables
VERSION_MAJOR = 1
VERSION_MINOR = 0

# qt's variable
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}

# Additional include directories, common to most projects.
INCLUDEPATH += $$ROOT_DIR/3party/boost

CONFIG(release, debug|release) {
  DEFINES += RELEASE _RELEASE NDEBUG
  CONFIG_NAME = release
} else {
  DEFINES += DEBUG _DEBUG
  CONFIG_NAME = debug
}

# turn off maps downloader engine for desktops in release and production
!iphone* {
  CONFIG(release, debug|release)|CONFIG(production) {
    CONFIG += no_downloader
    DEFINES += NO_DOWNLOADER
  }
}

BINARIES_PATH = $$ROOT_DIR/out/$$CONFIG_NAME
TEMP_PATH = $$ROOT_DIR/out/$$CONFIG_NAME/tmp/$$TARGET

DESTDIR = $$BINARIES_PATH
OBJECTS_DIR = $$TEMP_PATH
RCC_DIR = $$TEMP_PATH
MOC_DIR = $$TEMP_PATH
UI_DIR = $$TEMP_PATH

LIBS += -L$$BINARIES_PATH

# By default, do not include base QT classes in any project.
QT -= core gui

# Turn on compiler warnings.
CONFIG += warn_on

# Libraries' dependencies hack.
win32-msvc*|symbian {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|bada-simulator {
 LIB_EXT = .a
 LIB_PREFIX = lib
}

# Add libraries' dependencies.
for(project, DEPENDENCIES) {
  PRE_TARGETDEPS += $$BINARIES_PATH/$$LIB_PREFIX$$project$$LIB_EXT
  LIBS += -l$$project
}

#INCLUDEPATH += $$ROOT_DIR/3party/protobuf/src/

# Windows-specific options for all projects
win32 {
  DEFINES += _WIN32_WINNT=0x0501
  DEFINES += WINVER=0x0501
  DEFINES += _WIN32_IE=0x0501
  DEFINES += WIN32_LEAN_AND_MEAN=1
  DEFINES += NTDDI_VERSION=0x05010000
}

win32-msvc* {
  QMAKE_CLEAN += *.user
  DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
  QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast
  QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast

  QMAKE_CXXFLAGS_RELEASE -= /O2
  # don't set -GL - bug in msvc2008
  QMAKE_CXXFLAGS_RELEASE += /Ox /GF
  # don't set /LTCG - bug in msvc2008
  QMAKE_LFLAGS_RELEASE += /MACHINE:X86 /OPT:REF

  CONFIG(release, debug|release) {
    DEFINES += _SECURE_SCL=0
  }
}

win32-msvc2010 {
  DEFINES += _HAS_CPP0X=0 # disable tr1 and c++0x features to avoid build errors
  QMAKE_CFLAGS_RELEASE += /GL
  QMAKE_CXXFLAGS_RELEASE += /GL
  QMAKE_LFLAGS_RELEASE += /LTCG
  QMAKE_LIB += /LTCG
}

unix|win32-g++ {
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare -Wno-strict-aliasing -Wconversion
  # experimental
  QMAKE_CFLAGS_RELEASE -= -O2
  QMAKE_CFLAGS_RELEASE += -O3
  QMAKE_CXXFLAGS_RELEASE -= -O2
  QMAKE_CXXFLAGS_RELEASE += -O3
  QMAKE_CFLAGS_RELEASE *= -ffast-math
  QMAKE_CXXFLAGS_RELEASE *= -ffast-math
}

linux-g++* {
  QMAKE_CC                = gcc-4.5
  QMAKE_CXX               = g++-4.5
  QMAKE_CFLAGS_RELEASE   += -flto
  QMAKE_CXXFLAGS_RELEASE += -flto
  QMAKE_LFLAGS_RELEASE   += -flto
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
}

macx-* {
  # minimum supported Mac OS X version
  QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
  QMAKE_CFLAGS *= -mmacosx-version-min=10.6
  QMAKE_CXXFLAGS *= -mmacosx-version-min=10.6
  # replace 10.5 with 10.6
  QMAKE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_CXXFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_CFLAGS_X86_64 += -mmacosx-version-min=10.6    # CXX is made based on CFLAGS
  QMAKE_OBJECTIVE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_OBJECTIVE_CFLAGS_X86_64 += -mmacosx-version-min=10.6
  QMAKE_LFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_LFLAGS_X86_64 += -mmacosx-version-min=10.6
}

CONFIG(production) {
  DEFINES += OMIM_PRODUCTION
} else {
  # enable debugging information for non-production release builds
  unix|win32-g++ {
    QMAKE_CFLAGS_RELEASE += -g
    QMAKE_CXXFLAGS_RELEASE += -g
  } win32-msvc* {
    QMAKE_LFLAGS += /PDB:$${DESTDIR}/$${TARGET}.pdb /DEBUG
  }
}

# This file is a template commmon for all qmake projects.
#
# To use it, define ROOT_DIR variable and include($$ROOT_DIR/common.pri)

# our own version variables
VERSION_MAJOR = 1
VERSION_MINOR = 0

# qt's variable
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}

# Additional include directories, common to most projects.
INCLUDEPATH += $$ROOT_DIR/3party/boost

CONFIG(release, debug|release) {
  DEFINES += RELEASE _RELEASE NDEBUG
  CONFIG_NAME = release
} else {
  DEFINES += DEBUG _DEBUG
  CONFIG_NAME = debug
}

# turn off maps downloader engine for desktops in release and production
!iphone* {
  CONFIG(release, debug|release)|CONFIG(production) {
    CONFIG += no_downloader
    DEFINES += NO_DOWNLOADER
  }
}

BINARIES_PATH = $$ROOT_DIR/out/$$CONFIG_NAME
TEMP_PATH = $$ROOT_DIR/out/$$CONFIG_NAME/tmp/$$TARGET

DESTDIR = $$BINARIES_PATH
OBJECTS_DIR = $$TEMP_PATH
RCC_DIR = $$TEMP_PATH
MOC_DIR = $$TEMP_PATH
UI_DIR = $$TEMP_PATH

LIBS += -L$$BINARIES_PATH

# By default, do not include base QT classes in any project.
QT -= core gui

# Turn on compiler warnings.
CONFIG += warn_on

# Libraries' dependencies hack.
win32-msvc*|symbian {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|bada-simulator {
 LIB_EXT = .a
 LIB_PREFIX = lib
}

# Add libraries' dependencies.
for(project, DEPENDENCIES) {
  PRE_TARGETDEPS += $$BINARIES_PATH/$$LIB_PREFIX$$project$$LIB_EXT
  LIBS += -l$$project
}

#INCLUDEPATH += $$ROOT_DIR/3party/protobuf/src/

# Windows-specific options for all projects
win32 {
  DEFINES += _WIN32_WINNT=0x0501
  DEFINES += WINVER=0x0501
  DEFINES += _WIN32_IE=0x0501
  DEFINES += WIN32_LEAN_AND_MEAN=1
  DEFINES += NTDDI_VERSION=0x05010000
}

win32-msvc* {
  QMAKE_CLEAN += *.user
  DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
  QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast
  QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast

  QMAKE_CXXFLAGS_RELEASE -= /O2
  # don't set -GL - bug in msvc2008
  QMAKE_CXXFLAGS_RELEASE += /Ox /GF
  # don't set /LTCG - bug in msvc2008
  QMAKE_LFLAGS_RELEASE += /MACHINE:X86 /OPT:REF

  CONFIG(release, debug|release) {
    DEFINES += _SECURE_SCL=0
  }
}

win32-msvc2010 {
  DEFINES += _HAS_CPP0X=0 # disable tr1 and c++0x features to avoid build errors
  QMAKE_CFLAGS_RELEASE += /GL
  QMAKE_CXXFLAGS_RELEASE += /GL
  QMAKE_LFLAGS_RELEASE += /LTCG
  QMAKE_LIB += /LTCG
}

unix|win32-g++ {
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare -Wno-strict-aliasing
  # experimental
  QMAKE_CFLAGS_RELEASE -= -O2
  QMAKE_CFLAGS_RELEASE += -O3
  QMAKE_CXXFLAGS_RELEASE -= -O2
  QMAKE_CXXFLAGS_RELEASE += -O3
  QMAKE_CFLAGS_RELEASE *= -ffast-math
  QMAKE_CXXFLAGS_RELEASE *= -ffast-math
}

linux-g++* {
  QMAKE_CC                = gcc-4.5
  QMAKE_CXX               = g++-4.5
  QMAKE_CFLAGS_RELEASE   += -flto
  QMAKE_CXXFLAGS_RELEASE += -flto
  QMAKE_LFLAGS_RELEASE   += -flto
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
}

macx-* {
  # minimum supported Mac OS X version
  QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
  QMAKE_CFLAGS *= -mmacosx-version-min=10.6
  QMAKE_CXXFLAGS *= -mmacosx-version-min=10.6
  # replace 10.5 with 10.6
  QMAKE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_CXXFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_CFLAGS_X86_64 += -mmacosx-version-min=10.6    # CXX is made based on CFLAGS
  QMAKE_OBJECTIVE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_OBJECTIVE_CFLAGS_X86_64 += -mmacosx-version-min=10.6
  QMAKE_LFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_LFLAGS_X86_64 += -mmacosx-version-min=10.6
}

CONFIG(production) {
  DEFINES += OMIM_PRODUCTION
} else {
  # enable debugging information for non-production release builds
  unix|win32-g++ {
    QMAKE_CFLAGS_RELEASE += -g
    QMAKE_CXXFLAGS_RELEASE += -g
  } win32-msvc* {
    QMAKE_LFLAGS += /PDB:$${DESTDIR}/$${TARGET}.pdb /DEBUG
  }
}


Add HAVE_MEEGOTOUCH define to all code compiled

RevBy: Jon Nordby

!enable-meegotouch {
    CONFIG+=nomeegotouch
} else {
    CONFIG-=nomeegotouch
}

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

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

!nomeegotouch {
    include(defines-legacy.pri)
} else {
    include(defines.pri)
}

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

isEmpty(M_IM_VERSION) {
    M_IM_VERSION=$$MALIIT_VERSION
}

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

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

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

isEmpty(M_IM_ENABLE_MULTITOUCH) {

    M_IM_ENABLE_MULTITOUCH=true
}

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

!nomeegotouch {
    M_IM_DEFAULT_PLUGIN = libmeego-keyboard.so
    M_IM_DEFAULT_SUBVIEW = en_gb.xml
} else {
    M_IM_DEFAULT_PLUGIN = libmeego-keyboard-quick.so
    M_IM_DEFAULT_SUBVIEW =
}

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

DEFINES += MALIIT_TEST_PLUGINS_DIR=\\\"$$MALIIT_TEST_LIBDIR/plugins\\\"

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

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

!nomeegotouch {
    DEFINES += HAVE_MEEGOTOUCH
}

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

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

    MALIIT_IN_DIR = $$IN_PWD
    MALIIT_OUT_DIR = $$OUT_PWD

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

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

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

    return(true)
}

defineTest(outputFiles) {
    files = $$ARGS

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

    return(true)
}

!enable-meegotouch {
    CONFIG+=nomeegotouch
} else {
    CONFIG-=nomeegotouch
}

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

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

!nomeegotouch {
    include(defines-legacy.pri)
} else {
    include(defines.pri)
}

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

isEmpty(M_IM_VERSION) {
    M_IM_VERSION=$$MALIIT_VERSION
}

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

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

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

isEmpty(M_IM_ENABLE_MULTITOUCH) {

    M_IM_ENABLE_MULTITOUCH=true
}

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

!nomeegotouch {
    M_IM_DEFAULT_PLUGIN = libmeego-keyboard.so
    M_IM_DEFAULT_SUBVIEW = en_gb.xml
} else {
    M_IM_DEFAULT_PLUGIN = libmeego-keyboard-quick.so
    M_IM_DEFAULT_SUBVIEW =
}

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

DEFINES += MALIIT_TEST_PLUGINS_DIR=\\\"$$MALIIT_TEST_LIBDIR/plugins\\\"

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

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

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

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

    MALIIT_IN_DIR = $$IN_PWD
    MALIIT_OUT_DIR = $$OUT_PWD

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

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

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

    return(true)
}

defineTest(outputFiles) {
    files = $$ARGS

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

    return(true)
}


Check if boost is present before including AirMap This is temporary until we get rid of it

#
# [REQUIRED] Add support for <inttypes.h> to Windows.
#
WindowsBuild {
    INCLUDEPATH += libs/lib/msinttypes
}

#
# [REQUIRED] Add support for the MAVLink communications protocol.
#
# By default MAVLink dialect is hardwired to arudpilotmega. The reason being
# the current codebase supports both PX4 and APM flight stack. PX4 flight stack
# only uses common MAVLink specifications, whereas APM flight stack uses custom
# MAVLink specifications which adds to common. So by using the adupilotmega dialect
# QGC can support both in the same codebase.

# Once the mavlink helper routines include support for multiple dialects within
# a single compiled codebase this hardwiring of dialect can go away. But until then
# this "workaround" is needed.

# In the mean time, it’s possible to define a completely different dialect by defining the
# location and name below.

isEmpty(MAVLINKPATH_REL) {
    MAVLINKPATH_REL = libs/mavlink/include/mavlink/v2.0
}
isEmpty(MAVLINKPATH) {
    MAVLINKPATH     = $$BASEDIR/$$MAVLINKPATH_REL
}
isEmpty(MAVLINK_CONF) {
    MAVLINK_CONF    = ardupilotmega
}

# If defined, all APM specific MAVLink messages are disabled
contains (CONFIG, QGC_DISABLE_APM_MAVLINK) {
    message("Disable APM MAVLink support")
    DEFINES += NO_ARDUPILOT_DIALECT
}

# First we select the dialect, checking for valid user selection
# Users can override all other settings by specifying MAVLINK_CONF as an argument to qmake
!isEmpty(MAVLINK_CONF) {
    message($$sprintf("Using MAVLink dialect '%1'.", $$MAVLINK_CONF))
}

# Then we add the proper include paths dependent on the dialect.
INCLUDEPATH += $$MAVLINKPATH

exists($$MAVLINKPATH/common) {
    !isEmpty(MAVLINK_CONF) {
        count(MAVLINK_CONF, 1) {
            exists($$MAVLINKPATH/$$MAVLINK_CONF) {
                INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
                DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
            } else {
                error($$sprintf("MAVLink dialect '%1' does not exist at '%2'!", $$MAVLINK_CONF, $$MAVLINKPATH_REL))
            }
        } else {
            error(Only a single mavlink dialect can be specified in MAVLINK_CONF)
        }
    } else {
        INCLUDEPATH += $$MAVLINKPATH/common
    }
} else {
    error($$sprintf("MAVLink folder does not exist at '%1'! Run 'git submodule init && git submodule update' on the command line.",$$MAVLINKPATH_REL))
}

#
# [REQUIRED] EIGEN matrix library
# NOMINMAX constant required to make internal min/max work.
INCLUDEPATH += libs/eigen
DEFINES += NOMINMAX

#
# [REQUIRED] QWT plotting library dependency. Provides plotting capabilities.
#
!MobileBuild {
include(libs/qwt.pri)
DEPENDPATH += libs/qwt
INCLUDEPATH += libs/qwt
}

#
# [REQUIRED] SDL dependency. Provides joystick/gamepad support.
# The SDL is packaged with QGC for the Mac and Windows. Linux support requires installing the SDL
# library (development libraries and static binaries).
#
MacBuild {
    INCLUDEPATH += \
        $$BASEDIR/libs/lib/Frameworks/SDL2.framework/Headers

    LIBS += \
        -F$$BASEDIR/libs/lib/Frameworks \
        -framework SDL2
} else:LinuxBuild {
    PKGCONFIG = sdl2
} else:WindowsBuild {
    INCLUDEPATH += $$BASEDIR/libs/lib/sdl2/msvc/include

    contains(QT_ARCH, i386) {
        LIBS += -L$$BASEDIR/libs/lib/sdl2/msvc/lib/x86
    } else {
        LIBS += -L$$BASEDIR/libs/lib/sdl2/msvc/lib/x64
    }
    LIBS += \
        -lSDL2main \
        -lSDL2
}

#
# [OPTIONAL] Zeroconf for UDP links
#
contains (DEFINES, DISABLE_ZEROCONF) {
    message("Skipping support for Zeroconf (manual override from command line)")
    DEFINES -= DISABLE_ZEROCONF
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_ZEROCONF) {
    message("Skipping support for Zeroconf (manual override from user_config.pri)")
# Mac support is built into OS
} else:MacBuild|iOSBuild {
    message("Including support for Zeroconf (Bonjour)")
    DEFINES += QGC_ZEROCONF_ENABLED
} else {
    message("Skipping support for Zeroconf (unsupported platform)")
}

#
# [OPTIONAL] AirMap Support
#
contains (DEFINES, DISABLE_AIRMAP) {
    message("Skipping support for AirMap (manual override from command line)")
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_AIRMAP) {
    message("Skipping support for AirMap (manual override from user_config.pri)")
} else {
    AIRMAPD_PATH = $$PWD/libs/airmapd
    # Temporary until we get rid of boost
    exists($${AIRMAPD_PATH}/include/boost) {
        MacBuild|iOSBuild {
            exists($${AIRMAPD_PATH}/macOS/Qt.5.9) {
                message("Including support for AirMap for macOS")
                LIBS += -L$${AIRMAPD_PATH}/macOS/Qt.5.9 -lairmap-qt
                DEFINES += QGC_AIRMAP_ENABLED
            }
        } else {
            message("Skipping support for Airmap (unsupported platform)")
        }
        contains (DEFINES, QGC_AIRMAP_ENABLED) {
            INCLUDEPATH += \
                $${AIRMAPD_PATH}/include
        }
    } else {
        message("Missing boost for AirMap. Excluding AirMap support")
    }
}

#
# [REQUIRED] Add support for <inttypes.h> to Windows.
#
WindowsBuild {
    INCLUDEPATH += libs/lib/msinttypes
}

#
# [REQUIRED] Add support for the MAVLink communications protocol.
#
# By default MAVLink dialect is hardwired to arudpilotmega. The reason being
# the current codebase supports both PX4 and APM flight stack. PX4 flight stack
# only uses common MAVLink specifications, whereas APM flight stack uses custom
# MAVLink specifications which adds to common. So by using the adupilotmega dialect
# QGC can support both in the same codebase.

# Once the mavlink helper routines include support for multiple dialects within
# a single compiled codebase this hardwiring of dialect can go away. But until then
# this "workaround" is needed.

# In the mean time, it’s possible to define a completely different dialect by defining the
# location and name below.

isEmpty(MAVLINKPATH_REL) {
    MAVLINKPATH_REL = libs/mavlink/include/mavlink/v2.0
}
isEmpty(MAVLINKPATH) {
    MAVLINKPATH     = $$BASEDIR/$$MAVLINKPATH_REL
}
isEmpty(MAVLINK_CONF) {
    MAVLINK_CONF    = ardupilotmega
}

# If defined, all APM specific MAVLink messages are disabled
contains (CONFIG, QGC_DISABLE_APM_MAVLINK) {
    message("Disable APM MAVLink support")
    DEFINES += NO_ARDUPILOT_DIALECT
}

# First we select the dialect, checking for valid user selection
# Users can override all other settings by specifying MAVLINK_CONF as an argument to qmake
!isEmpty(MAVLINK_CONF) {
    message($$sprintf("Using MAVLink dialect '%1'.", $$MAVLINK_CONF))
}

# Then we add the proper include paths dependent on the dialect.
INCLUDEPATH += $$MAVLINKPATH

exists($$MAVLINKPATH/common) {
    !isEmpty(MAVLINK_CONF) {
        count(MAVLINK_CONF, 1) {
            exists($$MAVLINKPATH/$$MAVLINK_CONF) {
                INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
                DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
            } else {
                error($$sprintf("MAVLink dialect '%1' does not exist at '%2'!", $$MAVLINK_CONF, $$MAVLINKPATH_REL))
            }
        } else {
            error(Only a single mavlink dialect can be specified in MAVLINK_CONF)
        }
    } else {
        INCLUDEPATH += $$MAVLINKPATH/common
    }
} else {
    error($$sprintf("MAVLink folder does not exist at '%1'! Run 'git submodule init && git submodule update' on the command line.",$$MAVLINKPATH_REL))
}

#
# [REQUIRED] EIGEN matrix library
# NOMINMAX constant required to make internal min/max work.
INCLUDEPATH += libs/eigen
DEFINES += NOMINMAX

#
# [REQUIRED] QWT plotting library dependency. Provides plotting capabilities.
#
!MobileBuild {
include(libs/qwt.pri)
DEPENDPATH += libs/qwt
INCLUDEPATH += libs/qwt
}

#
# [REQUIRED] SDL dependency. Provides joystick/gamepad support.
# The SDL is packaged with QGC for the Mac and Windows. Linux support requires installing the SDL
# library (development libraries and static binaries).
#
MacBuild {
    INCLUDEPATH += \
        $$BASEDIR/libs/lib/Frameworks/SDL2.framework/Headers

    LIBS += \
        -F$$BASEDIR/libs/lib/Frameworks \
        -framework SDL2
} else:LinuxBuild {
    PKGCONFIG = sdl2
} else:WindowsBuild {
    INCLUDEPATH += $$BASEDIR/libs/lib/sdl2/msvc/include

    contains(QT_ARCH, i386) {
        LIBS += -L$$BASEDIR/libs/lib/sdl2/msvc/lib/x86
    } else {
        LIBS += -L$$BASEDIR/libs/lib/sdl2/msvc/lib/x64
    }
    LIBS += \
        -lSDL2main \
        -lSDL2
}

#
# [OPTIONAL] Zeroconf for UDP links
#
contains (DEFINES, DISABLE_ZEROCONF) {
    message("Skipping support for Zeroconf (manual override from command line)")
    DEFINES -= DISABLE_ZEROCONF
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_ZEROCONF) {
    message("Skipping support for Zeroconf (manual override from user_config.pri)")
# Mac support is built into OS
} else:MacBuild|iOSBuild {
    message("Including support for Zeroconf (Bonjour)")
    DEFINES += QGC_ZEROCONF_ENABLED
} else {
    message("Skipping support for Zeroconf (unsupported platform)")
}

#
# [OPTIONAL] AirMap Support
#
contains (DEFINES, DISABLE_AIRMAP) {
    message("Skipping support for AirMap (manual override from command line)")
    DEFINES -= QGC_AIRMAP_ENABLED
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_AIRMAP) {
    message("Skipping support for AirMap (manual override from user_config.pri)")
    DEFINES -= QGC_AIRMAP_ENABLED
} else {
    AIRMAPD_PATH = $$PWD/libs/airmapd
    MacBuild|iOSBuild {
        exists($${AIRMAPD_PATH}/macOS/Qt.5.9) {
            message("Including support for AirMap for macOS")
            LIBS += -L$${AIRMAPD_PATH}/macOS/Qt.5.9 -lairmap-qt
            DEFINES += QGC_AIRMAP_ENABLED
        }
    } else {
        message("Skipping support for Airmap (unsupported platform)")
        DEFINES -= QGC_AIRMAP_ENABLED
    }
    contains (DEFINES, QGC_AIRMAP_ENABLED) {
        INCLUDEPATH += \
            $${AIRMAPD_PATH}/include
    }
}


Updated version number.

Updated version number.

Updated version for 3.2.0 release.

# Default settings for MPI CXX include
isEmpty(MPICXX) { MPICXX = "yes" }

# Versions
MAJOR_VERSION = 3
MINOR_VERSION = 2
REVISION = 0
VERSION = $${MAJOR_VERSION}.$${MINOR_VERSION}.$${REVISION}

# Version compiler defines
DEFINES += \
    QT_DEPRECATED_WARNINGS \
    MAJOR_VERSION=$${MAJOR_VERSION} \
    MINOR_VERSION=$${MINOR_VERSION} \
    REVISION=$${REVISION}

# Basic settings
QT += core
TEMPLATE = app
QMAKE_CXX = mpic++
CONFIG += c++11

# Compiler defines
DEFINES += QT_DEPRECATED_WARNINGS

# External libraries
LIBS += -lmpi
equals(MPICXX,"yes") { LIBS += -lmpi_cxx }
LIBS += -lacecore -lOpenCL -lgsl -lgslcblas -L$${PWD}/../../build/libs -lkinccore

# Used to ignore useless warnings with OpenCL
QMAKE_CXXFLAGS += -Wno-ignored-attributes

# Source files
SOURCES += \
    ../main.cpp \

# Resource files
RESOURCES += \
    ../opencl.qrc

# Default settings for MPI CXX include
isEmpty(MPICXX) { MPICXX = "yes" }

# Versions
MAJOR_VERSION = 0
MINOR_VERSION = 0
REVISION = 999
VERSION = $${MAJOR_VERSION}.$${MINOR_VERSION}.$${REVISION}

# Version compiler defines
DEFINES += \
    QT_DEPRECATED_WARNINGS \
    MAJOR_VERSION=$${MAJOR_VERSION} \
    MINOR_VERSION=$${MINOR_VERSION} \
    REVISION=$${REVISION}

# Basic settings
QT += core
TEMPLATE = app
QMAKE_CXX = mpic++
CONFIG += c++11

# Compiler defines
DEFINES += QT_DEPRECATED_WARNINGS

# External libraries
LIBS += -lmpi
equals(MPICXX,"yes") { LIBS += -lmpi_cxx }
LIBS += -lacecore -lOpenCL -lgsl -lgslcblas -L$${PWD}/../../build/libs -lkinccore

# Used to ignore useless warnings with OpenCL
QMAKE_CXXFLAGS += -Wno-ignored-attributes

# Source files
SOURCES += \
    ../main.cpp \

# Resource files
RESOURCES += \
    ../opencl.qrc


Optimized ptgf.pri check for Qt version function

# This file is part of the Parallel Tools GUI Framework (PTGF)
# Copyright (C) 2010-2013 Argo Navis Technologies, LLC
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

!isEmpty(PTGF_PRI_INCLUDED): error("PTGF.pri already included")
PTGF_PRI_INCLUDED = 1

##################
# QT INFORMATION #
##################
defineTest(qtVer) {
    greaterThan(QT_MAJOR_VERSION, $$1) : return(true)
    isEqual(QT_MAJOR_VERSION, $$1) {
        greaterThan(QT_MINOR_VERSION, $$2) : return(true)
        isEqual(QT_MINOR_VERSION, $$2) {
            greaterThan(QT_PATCH_VERSION, $$3) : return(true)
            isEqual(QT_PATCH_VERSION, $$3) : return(true)
        }
    }
    return(false)
}
!qtVer(4,6,0): error(This application requires at least Qt version 4.6.0)

#####################
# QMAKE INFORMATION #
#####################
CONFIG -= debug_and_release

greaterThan(QT_MAJOR_VERSION, 4) {
    QT += core gui widgets
} else {
    QT += core gui
}

APPLICATION_TARGET = PTGF

#######################
# VERSION INFORMATION #
#######################
VER_MAJ      = 0
VER_MIN      = 3
VER_PAT      = 0
VERSION      = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
DEFINES     += 'VER_MAJ=$${VER_MAJ}' 'VER_MIN=$${VER_MIN}' 'VER_PAT=$${VER_PAT}' 'VERSION=$${VERSION}'

#################
# INSTALL PATHS #
#################
!isEmpty(SOURCEDIR): SOURCE_PATH = $${SOURCEDIR}
isEmpty(SOURCE_PATH): SOURCE_PATH = $$quote($${PWD})

!isEmpty(BUILDDIR): BUILD_PATH = $${BUILDDIR}
isEmpty(BUILD_PATH): BUILD_PATH = $$quote($${PWD})

#########################
# DEBUG/RELEASE DIR_POSTFIX #
#########################
CONFIG(debug_and_release) {
  CONFIG(debug, debug|release) {
    DIR_POSTFIX = debug
  } else {
    DIR_POSTFIX = release
  }
}

CONFIG(debug, debug|release) {
  win32: LIB_POSTFIX = D$${VER_MAJ}
  else: LIB_POSTFIX = D
} else {
  win32: LIB_POSTFIX = $${VER_MAJ}
  else: LIB_POSTFIX =
}

#################
# INCLUDE PATHS #
#################
INCLUDEPATH       += $$quote($${SOURCE_PATH}/core/lib) $$quote($${SOURCE_PATH}/plugins)
DEPENDPATH        += $$quote($${SOURCE_PATH}/core/lib) $$quote($${SOURCE_PATH}/plugins)

# This file is part of the Parallel Tools GUI Framework (PTGF)
# Copyright (C) 2010-2013 Argo Navis Technologies, LLC
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

!isEmpty(PTGF_PRI_INCLUDED): error("PTGF.pri already included")
PTGF_PRI_INCLUDED = 1

##################
# QT INFORMATION #
##################
defineTest(qtVer) {
    isEqual(QT_MAJOR_VERSION, $$1) {
        isEqual(QT_MINOR_VERSION, $$2) {
            isEqual(QT_PATCH_VERSION, $$3) : return(true)
            greaterThan(QT_PATCH_VERSION, $$3) : return(true)
        }
        greaterThan(QT_MINOR_VERSION, $$2) : return(true)
    }
    greaterThan(QT_MAJOR_VERSION, $$1) : return(true)
    return(false)
}
!qtVer(4,6,0): error(This application requires at least Qt version 4.6.0)

#####################
# QMAKE INFORMATION #
#####################
CONFIG -= debug_and_release

greaterThan(QT_MAJOR_VERSION, 4) {
    QT += core gui widgets
} else {
    QT += core gui
}

APPLICATION_TARGET = PTGF

#######################
# VERSION INFORMATION #
#######################
VER_MAJ      = 0
VER_MIN      = 3
VER_PAT      = 0
VERSION      = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
DEFINES     += 'VER_MAJ=$${VER_MAJ}' 'VER_MIN=$${VER_MIN}' 'VER_PAT=$${VER_PAT}' 'VERSION=$${VERSION}'

#################
# INSTALL PATHS #
#################
!isEmpty(SOURCEDIR): SOURCE_PATH = $${SOURCEDIR}
isEmpty(SOURCE_PATH): SOURCE_PATH = $$quote($${PWD})

!isEmpty(BUILDDIR): BUILD_PATH = $${BUILDDIR}
isEmpty(BUILD_PATH): BUILD_PATH = $$quote($${PWD})

#########################
# DEBUG/RELEASE DIR_POSTFIX #
#########################
CONFIG(debug_and_release) {
  CONFIG(debug, debug|release) {
    DIR_POSTFIX = debug
  } else {
    DIR_POSTFIX = release
  }
}

CONFIG(debug, debug|release) {
  win32: LIB_POSTFIX = D$${VER_MAJ}
  else: LIB_POSTFIX = D
} else {
  win32: LIB_POSTFIX = $${VER_MAJ}
  else: LIB_POSTFIX =
}

#################
# INCLUDE PATHS #
#################
INCLUDEPATH       += $$quote($${SOURCE_PATH}/core/lib) $$quote($${SOURCE_PATH}/plugins)
DEPENDPATH        += $$quote($${SOURCE_PATH}/core/lib) $$quote($${SOURCE_PATH}/plugins)


Version 1.0

Version 1.0


Version 0.34

Version 0.34


Version 8.18

Version 8.18


version update

version update


Don't include pri file from qtbase source directory.

The pri file is one line, just duplicate it.

Change-Id: Ie541efb5713fa69763ca75a66f97ebaa69cb5a84
Reviewed-by: Rohan McGovern <d75463945f40a9669160a73cef2843e56b22c602@nokia.com>

INCLUDEPATH += $$PWD
SOURCES += \
    $$PWD/qdeclarativeparser.cpp \
    $$PWD/qdeclarativeinstruction.cpp \
    $$PWD/qdeclarativevmemetaobject.cpp \
    $$PWD/qdeclarativeengine.cpp \
    $$PWD/qdeclarativeexpression.cpp \
    $$PWD/qdeclarativebinding.cpp \
    $$PWD/qdeclarativeproperty.cpp \
    $$PWD/qdeclarativecomponent.cpp \
    $$PWD/qdeclarativecontext.cpp \
    $$PWD/qdeclarativeinclude.cpp \
    $$PWD/qdeclarativecustomparser.cpp \
    $$PWD/qdeclarativepropertyvaluesource.cpp \
    $$PWD/qdeclarativepropertyvalueinterceptor.cpp \
    $$PWD/qdeclarativeproxymetaobject.cpp \
    $$PWD/qdeclarativevme.cpp \
    $$PWD/qdeclarativecompiler.cpp \
    $$PWD/qdeclarativecompileddata.cpp \
    $$PWD/qdeclarativeboundsignal.cpp \
    $$PWD/qdeclarativedom.cpp \
    $$PWD/qdeclarativerefcount.cpp \
    $$PWD/qdeclarativemetatype.cpp \
    $$PWD/qdeclarativestringconverters.cpp \
    $$PWD/qdeclarativeparserstatus.cpp \
    $$PWD/qdeclarativetypeloader.cpp \
    $$PWD/qdeclarativeinfo.cpp \
    $$PWD/qdeclarativeerror.cpp \
    $$PWD/qdeclarativescriptparser.cpp \
    $$PWD/qdeclarativerewrite.cpp \
    $$PWD/qdeclarativevaluetype.cpp \
    $$PWD/qdeclarativecompiledbindings.cpp \
    $$PWD/qdeclarativefastproperties.cpp \
    $$PWD/qdeclarativexmlhttprequest.cpp \
    $$PWD/qdeclarativesqldatabase.cpp \
    $$PWD/qdeclarativewatcher.cpp \
    $$PWD/qdeclarativecleanup.cpp \
    $$PWD/qdeclarativepropertycache.cpp \
    $$PWD/qdeclarativenotifier.cpp \
    $$PWD/qdeclarativeintegercache.cpp \
    $$PWD/qdeclarativetypenotavailable.cpp \
    $$PWD/qdeclarativetypenamecache.cpp \
    $$PWD/qdeclarativescriptstring.cpp \
    $$PWD/qdeclarativeobjectscriptclass.cpp \
    $$PWD/qdeclarativecontextscriptclass.cpp \
    $$PWD/qdeclarativeglobalscriptclass.cpp \
    $$PWD/qdeclarativevaluetypescriptclass.cpp \
    $$PWD/qdeclarativetypenamescriptclass.cpp \
    $$PWD/qdeclarativelistscriptclass.cpp \
    $$PWD/qdeclarativeworkerscript.cpp \
    $$PWD/qdeclarativeimageprovider.cpp \
    $$PWD/qdeclarativenetworkaccessmanagerfactory.cpp \
    $$PWD/qdeclarativedirparser.cpp \
    $$PWD/qdeclarativeextensionplugin.cpp \
    $$PWD/qdeclarativeimport.cpp \
    $$PWD/qdeclarativelist.cpp \
    $$PWD/qperformancetimer.cpp

HEADERS += \
    $$PWD/qdeclarativeparser_p.h \
    $$PWD/qdeclarativeglobal_p.h \
    $$PWD/qdeclarativeinstruction_p.h \
    $$PWD/qdeclarativevmemetaobject_p.h \
    $$PWD/qdeclarative.h \
    $$PWD/qdeclarativebinding_p.h \
    $$PWD/qdeclarativebinding_p_p.h \
    $$PWD/qdeclarativeproperty.h \
    $$PWD/qdeclarativecomponent.h \
    $$PWD/qdeclarativecomponent_p.h \
    $$PWD/qdeclarativecustomparser_p.h \
    $$PWD/qdeclarativecustomparser_p_p.h \
    $$PWD/qdeclarativepropertyvaluesource.h \
    $$PWD/qdeclarativepropertyvalueinterceptor.h \
    $$PWD/qdeclarativeboundsignal_p.h \
    $$PWD/qdeclarativeparserstatus.h \
    $$PWD/qdeclarativeproxymetaobject_p.h \
    $$PWD/qdeclarativevme_p.h \
    $$PWD/qdeclarativecompiler_p.h \
    $$PWD/qdeclarativeengine_p.h \
    $$PWD/qdeclarativeexpression_p.h \
    $$PWD/qdeclarativeprivate.h \
    $$PWD/qdeclarativedom_p.h \
    $$PWD/qdeclarativedom_p_p.h \
    $$PWD/qdeclarativerefcount_p.h \
    $$PWD/qdeclarativemetatype_p.h \
    $$PWD/qdeclarativeengine.h \
    $$PWD/qdeclarativecontext.h \
    $$PWD/qdeclarativeexpression.h \
    $$PWD/qdeclarativestringconverters_p.h \
    $$PWD/qdeclarativeinfo.h \
    $$PWD/qdeclarativeproperty_p.h \
    $$PWD/qdeclarativecontext_p.h \
    $$PWD/qdeclarativeinclude_p.h \
    $$PWD/qdeclarativetypeloader_p.h \
    $$PWD/qdeclarativelist.h \
    $$PWD/qdeclarativelist_p.h \
    $$PWD/qdeclarativedata_p.h \
    $$PWD/qdeclarativeerror.h \
    $$PWD/qdeclarativescriptparser_p.h \
    $$PWD/qdeclarativerewrite_p.h \
    $$PWD/qpodvector_p.h \
    $$PWD/qbitfield_p.h \
    $$PWD/qdeclarativevaluetype_p.h \
    $$PWD/qdeclarativecompiledbindings_p.h \
    $$PWD/qdeclarativefastproperties_p.h \
    $$PWD/qdeclarativexmlhttprequest_p.h \
    $$PWD/qdeclarativesqldatabase_p.h \
    $$PWD/qdeclarativewatcher_p.h \
    $$PWD/qdeclarativecleanup_p.h \
    $$PWD/qdeclarativepropertycache_p.h \
    $$PWD/qdeclarativenotifier_p.h \
    $$PWD/qdeclarativeintegercache_p.h \
    $$PWD/qdeclarativetypenotavailable_p.h \
    $$PWD/qdeclarativetypenamecache_p.h \
    $$PWD/qdeclarativescriptstring.h \
    $$PWD/qdeclarativeobjectscriptclass_p.h \
    $$PWD/qdeclarativecontextscriptclass_p.h \
    $$PWD/qdeclarativeglobalscriptclass_p.h \
    $$PWD/qdeclarativevaluetypescriptclass_p.h \
    $$PWD/qdeclarativetypenamescriptclass_p.h \
    $$PWD/qdeclarativelistscriptclass_p.h \
    $$PWD/qdeclarativeworkerscript_p.h \
    $$PWD/qdeclarativeguard_p.h \
    $$PWD/qdeclarativeimageprovider.h \
    $$PWD/qdeclarativenetworkaccessmanagerfactory.h \
    $$PWD/qdeclarativedirparser_p.h \
    $$PWD/qdeclarativeextensioninterface.h \
    $$PWD/qdeclarativeimport_p.h \
    $$PWD/qdeclarativeextensionplugin.h \
    $$PWD/qperformancetimer_p.h

QT += sql
include(parser/parser.pri)
include(rewriter/rewriter.pri)

# mirrors logic in $$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri
# clock_gettime() is implemented in librt on these systems
contains(QT_CONFIG, clock-gettime):linux-*|hpux-*|solaris-*:LIBS_PRIVATE *= -lrt

INCLUDEPATH += $$PWD
SOURCES += \
    $$PWD/qdeclarativeparser.cpp \
    $$PWD/qdeclarativeinstruction.cpp \
    $$PWD/qdeclarativevmemetaobject.cpp \
    $$PWD/qdeclarativeengine.cpp \
    $$PWD/qdeclarativeexpression.cpp \
    $$PWD/qdeclarativebinding.cpp \
    $$PWD/qdeclarativeproperty.cpp \
    $$PWD/qdeclarativecomponent.cpp \
    $$PWD/qdeclarativecontext.cpp \
    $$PWD/qdeclarativeinclude.cpp \
    $$PWD/qdeclarativecustomparser.cpp \
    $$PWD/qdeclarativepropertyvaluesource.cpp \
    $$PWD/qdeclarativepropertyvalueinterceptor.cpp \
    $$PWD/qdeclarativeproxymetaobject.cpp \
    $$PWD/qdeclarativevme.cpp \
    $$PWD/qdeclarativecompiler.cpp \
    $$PWD/qdeclarativecompileddata.cpp \
    $$PWD/qdeclarativeboundsignal.cpp \
    $$PWD/qdeclarativedom.cpp \
    $$PWD/qdeclarativerefcount.cpp \
    $$PWD/qdeclarativemetatype.cpp \
    $$PWD/qdeclarativestringconverters.cpp \
    $$PWD/qdeclarativeparserstatus.cpp \
    $$PWD/qdeclarativetypeloader.cpp \
    $$PWD/qdeclarativeinfo.cpp \
    $$PWD/qdeclarativeerror.cpp \
    $$PWD/qdeclarativescriptparser.cpp \
    $$PWD/qdeclarativerewrite.cpp \
    $$PWD/qdeclarativevaluetype.cpp \
    $$PWD/qdeclarativecompiledbindings.cpp \
    $$PWD/qdeclarativefastproperties.cpp \
    $$PWD/qdeclarativexmlhttprequest.cpp \
    $$PWD/qdeclarativesqldatabase.cpp \
    $$PWD/qdeclarativewatcher.cpp \
    $$PWD/qdeclarativecleanup.cpp \
    $$PWD/qdeclarativepropertycache.cpp \
    $$PWD/qdeclarativenotifier.cpp \
    $$PWD/qdeclarativeintegercache.cpp \
    $$PWD/qdeclarativetypenotavailable.cpp \
    $$PWD/qdeclarativetypenamecache.cpp \
    $$PWD/qdeclarativescriptstring.cpp \
    $$PWD/qdeclarativeobjectscriptclass.cpp \
    $$PWD/qdeclarativecontextscriptclass.cpp \
    $$PWD/qdeclarativeglobalscriptclass.cpp \
    $$PWD/qdeclarativevaluetypescriptclass.cpp \
    $$PWD/qdeclarativetypenamescriptclass.cpp \
    $$PWD/qdeclarativelistscriptclass.cpp \
    $$PWD/qdeclarativeworkerscript.cpp \
    $$PWD/qdeclarativeimageprovider.cpp \
    $$PWD/qdeclarativenetworkaccessmanagerfactory.cpp \
    $$PWD/qdeclarativedirparser.cpp \
    $$PWD/qdeclarativeextensionplugin.cpp \
    $$PWD/qdeclarativeimport.cpp \
    $$PWD/qdeclarativelist.cpp \
    $$PWD/qperformancetimer.cpp

HEADERS += \
    $$PWD/qdeclarativeparser_p.h \
    $$PWD/qdeclarativeglobal_p.h \
    $$PWD/qdeclarativeinstruction_p.h \
    $$PWD/qdeclarativevmemetaobject_p.h \
    $$PWD/qdeclarative.h \
    $$PWD/qdeclarativebinding_p.h \
    $$PWD/qdeclarativebinding_p_p.h \
    $$PWD/qdeclarativeproperty.h \
    $$PWD/qdeclarativecomponent.h \
    $$PWD/qdeclarativecomponent_p.h \
    $$PWD/qdeclarativecustomparser_p.h \
    $$PWD/qdeclarativecustomparser_p_p.h \
    $$PWD/qdeclarativepropertyvaluesource.h \
    $$PWD/qdeclarativepropertyvalueinterceptor.h \
    $$PWD/qdeclarativeboundsignal_p.h \
    $$PWD/qdeclarativeparserstatus.h \
    $$PWD/qdeclarativeproxymetaobject_p.h \
    $$PWD/qdeclarativevme_p.h \
    $$PWD/qdeclarativecompiler_p.h \
    $$PWD/qdeclarativeengine_p.h \
    $$PWD/qdeclarativeexpression_p.h \
    $$PWD/qdeclarativeprivate.h \
    $$PWD/qdeclarativedom_p.h \
    $$PWD/qdeclarativedom_p_p.h \
    $$PWD/qdeclarativerefcount_p.h \
    $$PWD/qdeclarativemetatype_p.h \
    $$PWD/qdeclarativeengine.h \
    $$PWD/qdeclarativecontext.h \
    $$PWD/qdeclarativeexpression.h \
    $$PWD/qdeclarativestringconverters_p.h \
    $$PWD/qdeclarativeinfo.h \
    $$PWD/qdeclarativeproperty_p.h \
    $$PWD/qdeclarativecontext_p.h \
    $$PWD/qdeclarativeinclude_p.h \
    $$PWD/qdeclarativetypeloader_p.h \
    $$PWD/qdeclarativelist.h \
    $$PWD/qdeclarativelist_p.h \
    $$PWD/qdeclarativedata_p.h \
    $$PWD/qdeclarativeerror.h \
    $$PWD/qdeclarativescriptparser_p.h \
    $$PWD/qdeclarativerewrite_p.h \
    $$PWD/qpodvector_p.h \
    $$PWD/qbitfield_p.h \
    $$PWD/qdeclarativevaluetype_p.h \
    $$PWD/qdeclarativecompiledbindings_p.h \
    $$PWD/qdeclarativefastproperties_p.h \
    $$PWD/qdeclarativexmlhttprequest_p.h \
    $$PWD/qdeclarativesqldatabase_p.h \
    $$PWD/qdeclarativewatcher_p.h \
    $$PWD/qdeclarativecleanup_p.h \
    $$PWD/qdeclarativepropertycache_p.h \
    $$PWD/qdeclarativenotifier_p.h \
    $$PWD/qdeclarativeintegercache_p.h \
    $$PWD/qdeclarativetypenotavailable_p.h \
    $$PWD/qdeclarativetypenamecache_p.h \
    $$PWD/qdeclarativescriptstring.h \
    $$PWD/qdeclarativeobjectscriptclass_p.h \
    $$PWD/qdeclarativecontextscriptclass_p.h \
    $$PWD/qdeclarativeglobalscriptclass_p.h \
    $$PWD/qdeclarativevaluetypescriptclass_p.h \
    $$PWD/qdeclarativetypenamescriptclass_p.h \
    $$PWD/qdeclarativelistscriptclass_p.h \
    $$PWD/qdeclarativeworkerscript_p.h \
    $$PWD/qdeclarativeguard_p.h \
    $$PWD/qdeclarativeimageprovider.h \
    $$PWD/qdeclarativenetworkaccessmanagerfactory.h \
    $$PWD/qdeclarativedirparser_p.h \
    $$PWD/qdeclarativeextensioninterface.h \
    $$PWD/qdeclarativeimport_p.h \
    $$PWD/qdeclarativeextensionplugin.h \
    $$PWD/qperformancetimer_p.h

QT += sql
include(parser/parser.pri)
include(rewriter/rewriter.pri)

# mirrors logic in corelib/kernel/kernel.pri
unix:!symbian: contains(QT_CONFIG, clock-gettime):include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri)


do not install testcases (fixes #37)

do not install testcases (fixes #37)

include(../qxmpp.pri)

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

QMAKE_LIBDIR += ../../src
QMAKE_RPATHDIR += $$OUT_PWD/../../src
INCLUDEPATH += $$PWD $$QXMPP_INCLUDEPATH
LIBS += $$QXMPP_LIBS

# do not install testcases
target.CONFIG += no_default_install


libicu: Build file path was specified in wrong order

# icu 5.3.1
# icu build for doing bidi and script itemization
# TODO update to 5.4

# icu doesn't use "#include <...>" instead
# of "#include "..."" to differentiate
# between local and system headers, so some
# of the headers point to the system unicode
# headers instead of local ones

# try and fix:
PATH_ICU_COMMON = $${PWD}/common
QMAKE_CXXFLAGS += -iquote$${PATH_ICU_COMMON}

message("PATH ICU COMMON $${PATH_ICU_COMMON}")

# defines
# based on:
# icu/readme.html#HowToBuild
DEFINES += "U_USING_ICU_NAMESPACE=0"

# force default charset to utf-8 for
# some optimization and space saving
DEFINES += "U_CHARSET_IS_UTF8=1"

# use explicit to prevent construction with
# unintended params
# [breaks ICU test suites]
DEFINES += "UNISTR_FROM_CHAR_EXPLICIT=explicit"
DEFINES += "UNISTR_FROM_STRING_EXPLICIT=explicit"

# prevent unnecessary inclusion of legacy headers
# [breaks UCI test suites]
DEFINES += "U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"

# tell libicu which modules are being built
DEFINES += U_COMMON_IMPLEMENTATION

# build type so libicu knows how to export symbols
DEFINES += U_STATIC_IMPLEMENTATION

# additional flag from Android.mk reference;
# bionic doesn't have <langinfo.h>
DEFINES += "U_HAVE_NL_LANGINFO_CODESET=0"

# turn off modules we dont use
# http://userguide.icu-project.org/packaging
# and more from uconfig.h
DEFINES += UCONFIG_NO_LEGACY_CONVERSION
DEFINES += UCONFIG_NO_NORMALIZATION # (turns off break itr, collation and translitr)
#DEFINES += UCONFIG_NO_BREAK_ITERATION
#DEFINES += UCONFIG_NO_COLLATION
#DEFINES += UCONFIG_NO_TRANSLITERATION
DEFINES += UCONFIG_NO_FORMATTING
DEFINES += UCONFIG_NO_REGULAR_EXPRESSIONS

# from uconfig.h
DEFINES += "U_ENABLE_DYLOAD=0"
DEFINES += "U_CHECK_DYLOAD=0"

# since we only care about ubidi and ubidi
# data is compiled into the lib we shouldn't
# need file IO (not sure though)
DEFINES += "UCONFIG_NO_FILE_IO=1"

#////////////////////////////////////////////////////////////////////

# common
INCLUDEPATH += $${PATH_ICU_COMMON}

# platform
SOURCES += \
    $${PATH_ICU_COMMON}/cmemory.c \
    $${PATH_ICU_COMMON}/uobject.cpp \
    $${PATH_ICU_COMMON}/cstring.c \
    $${PATH_ICU_COMMON}/cwchar.c \
    $${PATH_ICU_COMMON}/uinvchar.c \
    $${PATH_ICU_COMMON}/ustring.cpp \
    $${PATH_ICU_COMMON}/ustrfmt.c \
    $${PATH_ICU_COMMON}/utf_impl.c \
    $${PATH_ICU_COMMON}/putil.cpp \
    $${PATH_ICU_COMMON}/ucln_cmn.c \
    $${PATH_ICU_COMMON}/udataswp.c \
    $${PATH_ICU_COMMON}/umath.c \
    $${PATH_ICU_COMMON}/umutex.cpp \
    $${PATH_ICU_COMMON}/sharedobject.cpp \
    $${PATH_ICU_COMMON}/utrace.c

# appendable
SOURCES += \
    $${PATH_ICU_COMMON}/appendable.cpp

# ustrtrns
SOURCES += \
    $${PATH_ICU_COMMON}/ustrtrns.cpp

# unistr_core
SOURCES += \
    $${PATH_ICU_COMMON}/unistr.cpp

# charstr
SOURCES += \
    $${PATH_ICU_COMMON}/charstr.cpp

# uhash
SOURCES += \
    $${PATH_ICU_COMMON}/uhash.c

# udata
SOURCES += \
    $${PATH_ICU_COMMON}/udata.cpp \
    $${PATH_ICU_COMMON}/ucmndata.c \
    $${PATH_ICU_COMMON}/udatamem.c \
    $${PATH_ICU_COMMON}/umapfile.c

# ucol_swp
SOURCES += \
    $${PATH_ICU_COMMON}/ucol_swp.cpp

# utrie2
SOURCES += \
    $${PATH_ICU_COMMON}/utrie2.cpp

# sort
SOURCES += \
    $${PATH_ICU_COMMON}/uarrsort.c

# stringenumeration
SOURCES += \
    $${PATH_ICU_COMMON}/ustrenum.cpp \
    $${PATH_ICU_COMMON}/uenum.c

# resourcebundle
SOURCES += \
    $${PATH_ICU_COMMON}/resbund.cpp \
    $${PATH_ICU_COMMON}/uresbund.cpp \
    $${PATH_ICU_COMMON}/uresdata.c \
    $${PATH_ICU_COMMON}/locavailable.cpp \
    $${PATH_ICU_COMMON}/uloc.cpp \
    $${PATH_ICU_COMMON}/uloc_tag.c \
    $${PATH_ICU_COMMON}/locid.cpp \
    $${PATH_ICU_COMMON}/locmap.c \
    $${PATH_ICU_COMMON}/wintz.c \
    $${PATH_ICU_COMMON}/locbased.cpp

# bytestrie
SOURCES += \
    $${PATH_ICU_COMMON}/bytestrie.cpp

# propname
SOURCES += \
    $${PATH_ICU_COMMON}/propname.cpp

# uscript
SOURCES += \
    $${PATH_ICU_COMMON}/uscript.c

# uchar
SOURCES += \
    $${PATH_ICU_COMMON}/uchar.c

# ubidi_props
SOURCES += \
    $${PATH_ICU_COMMON}/ubidi_props.c

# ubidi
SOURCES += \
    $${PATH_ICU_COMMON}/ubidi.c \
    $${PATH_ICU_COMMON}/ubidiln.c \
    $${PATH_ICU_COMMON}/ubidiwrt.c

# stringpiece
SOURCES += \
    $${PATH_ICU_COMMON}/stringpiece.cpp

# schriter
SOURCES += \
    $${PATH_ICU_COMMON}/schriter.cpp \
    $${PATH_ICU_COMMON}/uchriter.cpp

# chariter
SOURCES += \
    $${PATH_ICU_COMMON}/chariter.cpp

# errorcode (for logging)
SOURCES += \
    $${PATH_ICU_COMMON}/errorcode.cpp

# utypes (needed for errorcode)
SOURCES += \
    $${PATH_ICU_COMMON}/utypes.c

#////////////////////////////////////////////////////////////////////

# stubdata
PATH_ICU_STUBDATA = $${PWD}/stubdata
INCLUDEPATH += $${PATH_ICU_STUBDATA}
SOURCES += \
    $${PATH_ICU_STUBDATA}/stubdata.c

#////////////////////////////////////////////////////////////////////

# extra (scrptrun is a tool for script itemization)
PATH_ICU_EXTRA = $${PWD}/extra
INCLUDEPATH += $${PATH_ICU_EXTRA}
HEADERS += $${PATH_ICU_EXTRA}/scrptrun.h
SOURCES += $${PATH_ICU_EXTRA}/scrptrun.cpp

# icu 5.3.1
# icu build for doing bidi and script itemization
# TODO update to 5.4

# icu doesn't use "#include <...>" instead
# of "#include "..."" to differentiate
# between local and system headers, so some
# of the headers point to the system unicode
# headers instead of local ones

# try and fix:
QMAKE_CXXFLAGS += -iquote$${PATH_ICU_COMMON}

# defines
# based on:
# icu/readme.html#HowToBuild
DEFINES += "U_USING_ICU_NAMESPACE=0"

# force default charset to utf-8 for
# some optimization and space saving
DEFINES += "U_CHARSET_IS_UTF8=1"

# use explicit to prevent construction with
# unintended params
# [breaks ICU test suites]
DEFINES += "UNISTR_FROM_CHAR_EXPLICIT=explicit"
DEFINES += "UNISTR_FROM_STRING_EXPLICIT=explicit"

# prevent unnecessary inclusion of legacy headers
# [breaks UCI test suites]
DEFINES += "U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"

# tell libicu which modules are being built
DEFINES += U_COMMON_IMPLEMENTATION

# build type so libicu knows how to export symbols
DEFINES += U_STATIC_IMPLEMENTATION

# additional flag from Android.mk reference;
# bionic doesn't have <langinfo.h>
DEFINES += "U_HAVE_NL_LANGINFO_CODESET=0"

# turn off modules we dont use
# http://userguide.icu-project.org/packaging
# and more from uconfig.h
DEFINES += UCONFIG_NO_LEGACY_CONVERSION
DEFINES += UCONFIG_NO_NORMALIZATION # (turns off break itr, collation and translitr)
#DEFINES += UCONFIG_NO_BREAK_ITERATION
#DEFINES += UCONFIG_NO_COLLATION
#DEFINES += UCONFIG_NO_TRANSLITERATION
DEFINES += UCONFIG_NO_FORMATTING
DEFINES += UCONFIG_NO_REGULAR_EXPRESSIONS

# from uconfig.h
DEFINES += "U_ENABLE_DYLOAD=0"
DEFINES += "U_CHECK_DYLOAD=0"

# since we only care about ubidi and ubidi
# data is compiled into the lib we shouldn't
# need file IO (not sure though)
DEFINES += "UCONFIG_NO_FILE_IO=1"

#////////////////////////////////////////////////////////////////////

# common
PATH_ICU_COMMON = $${PWD}/common
INCLUDEPATH += $${PATH_ICU_COMMON}

# platform
SOURCES += \
    $${PATH_ICU_COMMON}/cmemory.c \
    $${PATH_ICU_COMMON}/uobject.cpp \
    $${PATH_ICU_COMMON}/cstring.c \
    $${PATH_ICU_COMMON}/cwchar.c \
    $${PATH_ICU_COMMON}/uinvchar.c \
    $${PATH_ICU_COMMON}/ustring.cpp \
    $${PATH_ICU_COMMON}/ustrfmt.c \
    $${PATH_ICU_COMMON}/utf_impl.c \
    $${PATH_ICU_COMMON}/putil.cpp \
    $${PATH_ICU_COMMON}/ucln_cmn.c \
    $${PATH_ICU_COMMON}/udataswp.c \
    $${PATH_ICU_COMMON}/umath.c \
    $${PATH_ICU_COMMON}/umutex.cpp \
    $${PATH_ICU_COMMON}/sharedobject.cpp \
    $${PATH_ICU_COMMON}/utrace.c

# appendable
SOURCES += \
    $${PATH_ICU_COMMON}/appendable.cpp

# ustrtrns
SOURCES += \
    $${PATH_ICU_COMMON}/ustrtrns.cpp

# unistr_core
SOURCES += \
    $${PATH_ICU_COMMON}/unistr.cpp

# charstr
SOURCES += \
    $${PATH_ICU_COMMON}/charstr.cpp

# uhash
SOURCES += \
    $${PATH_ICU_COMMON}/uhash.c

# udata
SOURCES += \
    $${PATH_ICU_COMMON}/udata.cpp \
    $${PATH_ICU_COMMON}/ucmndata.c \
    $${PATH_ICU_COMMON}/udatamem.c \
    $${PATH_ICU_COMMON}/umapfile.c

# ucol_swp
SOURCES += \
    $${PATH_ICU_COMMON}/ucol_swp.cpp

# utrie2
SOURCES += \
    $${PATH_ICU_COMMON}/utrie2.cpp

# sort
SOURCES += \
    $${PATH_ICU_COMMON}/uarrsort.c

# stringenumeration
SOURCES += \
    $${PATH_ICU_COMMON}/ustrenum.cpp \
    $${PATH_ICU_COMMON}/uenum.c

# resourcebundle
SOURCES += \
    $${PATH_ICU_COMMON}/resbund.cpp \
    $${PATH_ICU_COMMON}/uresbund.cpp \
    $${PATH_ICU_COMMON}/uresdata.c \
    $${PATH_ICU_COMMON}/locavailable.cpp \
    $${PATH_ICU_COMMON}/uloc.cpp \
    $${PATH_ICU_COMMON}/uloc_tag.c \
    $${PATH_ICU_COMMON}/locid.cpp \
    $${PATH_ICU_COMMON}/locmap.c \
    $${PATH_ICU_COMMON}/wintz.c \
    $${PATH_ICU_COMMON}/locbased.cpp

# bytestrie
SOURCES += \
    $${PATH_ICU_COMMON}/bytestrie.cpp

# propname
SOURCES += \
    $${PATH_ICU_COMMON}/propname.cpp

# uscript
SOURCES += \
    $${PATH_ICU_COMMON}/uscript.c

# uchar
SOURCES += \
    $${PATH_ICU_COMMON}/uchar.c

# ubidi_props
SOURCES += \
    $${PATH_ICU_COMMON}/ubidi_props.c

# ubidi
SOURCES += \
    $${PATH_ICU_COMMON}/ubidi.c \
    $${PATH_ICU_COMMON}/ubidiln.c \
    $${PATH_ICU_COMMON}/ubidiwrt.c

# stringpiece
SOURCES += \
    $${PATH_ICU_COMMON}/stringpiece.cpp

# schriter
SOURCES += \
    $${PATH_ICU_COMMON}/schriter.cpp \
    $${PATH_ICU_COMMON}/uchriter.cpp

# chariter
SOURCES += \
    $${PATH_ICU_COMMON}/chariter.cpp

# errorcode (for logging)
SOURCES += \
    $${PATH_ICU_COMMON}/errorcode.cpp

# utypes (needed for errorcode)
SOURCES += \
    $${PATH_ICU_COMMON}/utypes.c

#////////////////////////////////////////////////////////////////////

# stubdata
PATH_ICU_STUBDATA = $${PWD}/stubdata
INCLUDEPATH += $${PATH_ICU_STUBDATA}
SOURCES += \
    $${PATH_ICU_STUBDATA}/stubdata.c

#////////////////////////////////////////////////////////////////////

# extra (scrptrun is a tool for script itemization)
PATH_ICU_EXTRA = $${PWD}/extra
INCLUDEPATH += $${PATH_ICU_EXTRA}
HEADERS += $${PATH_ICU_EXTRA}/scrptrun.h
SOURCES += $${PATH_ICU_EXTRA}/scrptrun.cpp


Fix: 2021-10-17

Fix: 2021-10-17

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

HEADERS += \
    $$PWD/xformats.h

SOURCES += \
    $$PWD/xformats.cpp

!contains(XCONFIG, xbinary) {
    XCONFIG += xbinary
    include($$PWD/xbinary.pri)
}

!contains(XCONFIG, xcom) {
    XCONFIG += xcom
    include($$PWD/xcom.pri)
}

!contains(XCONFIG, xmsdos) {
    XCONFIG += xmsdos
    include($$PWD/xmsdos.pri)
}

!contains(XCONFIG, xne) {
    XCONFIG += xne
    include($$PWD/xne.pri)
}

!contains(XCONFIG, xle) {
    XCONFIG += xle
    include($$PWD/xle.pri)
}

!contains(XCONFIG, xpe) {
    XCONFIG += xpe
    include($$PWD/xpe.pri)
}

!contains(XCONFIG, xmach) {
    XCONFIG += xmach
    include($$PWD/xmach.pri)
}

!contains(XCONFIG, xelf) {
    XCONFIG += xelf
    include($$PWD/xelf.pri)
}

contains(XCONFIG, use_dex) {
    DEFINES += USE_DEX
    !contains(XCONFIG, xdex) {
        XCONFIG += xdex
        include($$PWD/../XDEX/xdex.pri)
    }
}

contains(XCONFIG, use_archive) {
    DEFINES += USE_ARCHIVE
    !contains(XCONFIG, xarchives) {
        XCONFIG += xarchives
        include($$PWD/../XArchive/xarchives.pri)
    }
}

DISTFILES += \
    $$PWD/LICENSE \
    $$PWD/README.md


Fix lib path in lib.pri

Fix lib path in lib.pri

DEPENDPATH += $${PWD}
INCLUDEPATH += $${PWD}/src

CONFIG(release, debug|release) {
	LIBS = -L$${PWD}/build/release/ -llib
	win32: PRE_TARGETDEPS += $${PWD}/build/release/lib.lib
	unix:  PRE_TARGETDEPS += $${PWD}/build/release/liblib.a
}
else {
	LIBS = -L$${PWD}/build/debug/ -llib
	win32: PRE_TARGETDEPS += $${PWD}/build/debug/lib.lib
	unix:  PRE_TARGETDEPS += $${PWD}/build/debug/liblib.a
}

DEPENDPATH += $${PDIR}/lib
INCLUDEPATH += $${PDIR}/lib/src

CONFIG(release, debug|release) {
	LIBS = -L$${PDIR}/lib/build/release/ -llib
	win32: PRE_TARGETDEPS += $${PDIR}/lib/build/release/lib.lib
	unix:  PRE_TARGETDEPS += $${PDIR}/lib/build/release/liblib.a
}
else {
	LIBS = -L$${PDIR}/lib/build/debug/ -llib
	win32: PRE_TARGETDEPS += $${PDIR}/lib/build/debug/lib.lib
	unix:  PRE_TARGETDEPS += $${PDIR}/lib/build/debug/liblib.a
}


Change to iOS universal build

Change to iOS universal 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 {
        message("Linux build")
        CONFIG += LinuxBuild
        DEFINES += __STDC_LIMIT_MACROS
    } 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
        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
    }
}

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
#

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 {
        message("Linux build")
        CONFIG += LinuxBuild
        DEFINES += __STDC_LIMIT_MACROS
    } 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
        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)
    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
    }
}

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
#

DebugBuild {
    DEFINES += UNITTEST_BUILD
}


Fix app naming

Fix app naming

# -------------------------------------------------
# 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
# License terms set in COPYING.md
# -------------------------------------------------

installer {
    DEFINES += QGC_INSTALL_RELEASE
    MacBuild {
        VideoEnabled {
            # Install the gstreamer framework
            # This will:
            # Copy from the original distibution into DESTDIR/gstwork (if not already there)
            # Prune the framework, removing stuff we don't need
            # Relocate all dylibs so they can work under @executable_path/...
            # Copy the result into the app bundle
            # Make sure qgroundcontrol can find them
            message("Preparing GStreamer Framework")
            QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET}
        } else {
            message("Skipping GStreamer Framework")
        }
        # We cd to release directory so we can run macdeployqt without a path to the
        # qgroundcontrol.app file. If you specify a path to the .app file the symbolic
        # links to plugins will not be created correctly.
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
        QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt QGroundControl.app -appstore-compliant -verbose=2 -qmldir=$${BASEDIR}/src
        QMAKE_POST_LINK += && cd $${OUT_PWD}
        QMAKE_POST_LINK += && hdiutil create -verbose -stretch 1g -layout SPUD -srcfolder $${DESTDIR}/QGroundControl.app -volname QGroundControl $${DESTDIR}/package/QGroundControl.dmg
    }
    WindowsBuild {
        # The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much
        # easier to debug user crashes.
        #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY $${DESTDIR_WIN}\\qgroundcontrol.pdb
        #QMAKE_POST_LINK += $$escape_expand(\\n) del $${DESTDIR_WIN}\\qgroundcontrol.pdb
        QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\QGroundControl-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
        #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY qgroundcontrol.pdb $${DESTDIR_WIN}
        #QMAKE_POST_LINK += $$escape_expand(\\n) del qgroundcontrol.pdb
        OTHER_FILES += deploy/qgroundcontrol_installer.nsi
    }
    LinuxBuild {
        #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
        QMAKE_POST_LINK += && mkdir -p release/package
        QMAKE_POST_LINK += && tar -cjf release/package/QGroundControl.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/'
    }
    AndroidBuild {
        #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
        QMAKE_POST_LINK += && make install INSTALL_ROOT=$${DESTDIR}/android-build/
        QMAKE_POST_LINK += && androiddeployqt --input android-libQGroundControl.so-deployment-settings.json --output $${DESTDIR}/android-build --deployment bundled --gradle --sign $${BASEDIR}/android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS)
        QMAKE_POST_LINK += && cp $${DESTDIR}/android-build/build/outputs/apk/android-build-release-signed.apk $${DESTDIR}/package/QGroundControl.apk
    }
}

# -------------------------------------------------
# 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
# License terms set in COPYING.md
# -------------------------------------------------

installer {
    DEFINES += QGC_INSTALL_RELEASE
    MacBuild {
        VideoEnabled {
            # Install the gstreamer framework
            # This will:
            # Copy from the original distibution into DESTDIR/gstwork (if not already there)
            # Prune the framework, removing stuff we don't need
            # Relocate all dylibs so they can work under @executable_path/...
            # Copy the result into the app bundle
            # Make sure qgroundcontrol can find them
            message("Preparing GStreamer Framework")
            QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET}
        } else {
            message("Skipping GStreamer Framework")
        }
        # We cd to release directory so we can run macdeployqt without a path to the
        # qgroundcontrol.app file. If you specify a path to the .app file the symbolic
        # links to plugins will not be created correctly.
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
        QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt qgroundcontrol.app -appstore-compliant -verbose=2 -qmldir=$${BASEDIR}/src
        QMAKE_POST_LINK += && cd $${OUT_PWD}
        QMAKE_POST_LINK += && hdiutil create -verbose -stretch 1g -layout SPUD -srcfolder $${DESTDIR}/qgroundcontrol.app -volname QGroundControl $${DESTDIR}/package/QGroundControl.dmg
    }
    WindowsBuild {
        # The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much
        # easier to debug user crashes.
        #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY $${DESTDIR_WIN}\\qgroundcontrol.pdb
        #QMAKE_POST_LINK += $$escape_expand(\\n) del $${DESTDIR_WIN}\\qgroundcontrol.pdb
        QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\QGroundControl-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
        #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY qgroundcontrol.pdb $${DESTDIR_WIN}
        #QMAKE_POST_LINK += $$escape_expand(\\n) del qgroundcontrol.pdb
        OTHER_FILES += deploy/qgroundcontrol_installer.nsi
    }
    LinuxBuild {
        #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
        QMAKE_POST_LINK += && mkdir -p release/package
        QMAKE_POST_LINK += && tar -cjf release/package/QGroundControl.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/'
    }
    AndroidBuild {
        #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
        QMAKE_POST_LINK += && make install INSTALL_ROOT=$${DESTDIR}/android-build/
        QMAKE_POST_LINK += && androiddeployqt --input android-libQGroundControl.so-deployment-settings.json --output $${DESTDIR}/android-build --deployment bundled --gradle --sign $${BASEDIR}/android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS)
        QMAKE_POST_LINK += && cp $${DESTDIR}/android-build/build/outputs/apk/android-build-release-signed.apk $${DESTDIR}/package/QGroundControl.apk
    }
}


use ExecutableAllocatorWin.cpp on all Windows platforms

In particular, this is needed for Windows CE.

# JavaScriptCore - Qt4 build info
VPATH += $$PWD

CONFIG(debug, debug|release) {
    isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug
    OBJECTS_DIR = obj/debug
} else { # Release
    isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release
    OBJECTS_DIR = obj/release
}

INCLUDEPATH = \
    $$PWD \
    $$PWD/.. \
    $$PWD/assembler \
    $$PWD/bytecode \
    $$PWD/bytecompiler \
    $$PWD/debugger \
    $$PWD/interpreter \
    $$PWD/jit \
    $$PWD/parser \
    $$PWD/profiler \
    $$PWD/runtime \
    $$PWD/wrec \
    $$PWD/wtf \
    $$PWD/wtf/unicode \
    $$PWD/yarr \
    $$PWD/API \
    $$PWD/ForwardingHeaders \
    $$GENERATED_SOURCES_DIR \
    $$INCLUDEPATH

DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF

GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
win32-* {
    LIBS += -lwinmm
}

# In debug mode JIT disabled until crash fixed
win32-* {
    CONFIG(debug):!contains(DEFINES, ENABLE_JIT=1): DEFINES+=ENABLE_JIT=0
}

# Rules when JIT enabled (not disabled)
!contains(DEFINES, ENABLE_JIT=0) {
    linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
        QMAKE_CXXFLAGS += -fno-stack-protector
        QMAKE_CFLAGS += -fno-stack-protector
    }
}

win32-msvc*: INCLUDEPATH += $$PWD/os-win32
wince* {
    INCLUDEPATH += $$PWD/os-wince
    INCLUDEPATH += $$PWD/os-win32
    SOURCES += $$PWD/os-wince/ce_time.cpp
}

include(pcre/pcre.pri)

LUT_FILES += \
    runtime/DatePrototype.cpp \
    runtime/JSONObject.cpp \
    runtime/NumberConstructor.cpp \
    runtime/StringPrototype.cpp \
    runtime/ArrayPrototype.cpp \
    runtime/MathObject.cpp \
    runtime/RegExpConstructor.cpp \
    runtime/RegExpObject.cpp

KEYWORDLUT_FILES += \
    parser/Keywords.table

JSCBISON += \
    parser/Grammar.y

SOURCES += \
    wtf/Assertions.cpp \
    wtf/ByteArray.cpp \
    wtf/HashTable.cpp \
    wtf/MainThread.cpp \
    wtf/RandomNumber.cpp \
    wtf/RefCountedLeakCounter.cpp \
    wtf/TypeTraits.cpp \
    wtf/unicode/CollatorDefault.cpp \
    wtf/unicode/icu/CollatorICU.cpp \
    wtf/unicode/UTF8.cpp \
    API/JSBase.cpp \
    API/JSCallbackConstructor.cpp \
    API/JSCallbackFunction.cpp \
    API/JSCallbackObject.cpp \
    API/JSClassRef.cpp \
    API/JSContextRef.cpp \
    API/JSObjectRef.cpp \
    API/JSStringRef.cpp \
    API/JSValueRef.cpp \
    API/OpaqueJSString.cpp \
    runtime/InitializeThreading.cpp \
    runtime/JSGlobalData.cpp \
    runtime/JSGlobalObject.cpp \
    runtime/JSStaticScopeObject.cpp \
    runtime/JSVariableObject.cpp \
    runtime/JSActivation.cpp \
    runtime/JSNotAnObject.cpp \
    runtime/JSONObject.cpp \
    runtime/LiteralParser.cpp \
    runtime/TimeoutChecker.cpp \
    bytecode/CodeBlock.cpp \
    bytecode/StructureStubInfo.cpp \
    bytecode/JumpTable.cpp \
    assembler/ARMAssembler.cpp \
    jit/JIT.cpp \
    jit/JITCall.cpp \
    jit/JITArithmetic.cpp \
    jit/JITOpcodes.cpp \
    jit/JITPropertyAccess.cpp \
    jit/ExecutableAllocator.cpp \
    jit/JITStubs.cpp \
    bytecompiler/BytecodeGenerator.cpp \
    runtime/ExceptionHelpers.cpp \
    runtime/JSPropertyNameIterator.cpp \
    interpreter/Interpreter.cpp \
    bytecode/Opcode.cpp \
    bytecode/SamplingTool.cpp \
    yarr/RegexCompiler.cpp \
    yarr/RegexInterpreter.cpp \
    yarr/RegexJIT.cpp \
    interpreter/RegisterFile.cpp

win*: SOURCES += jit/ExecutableAllocatorWin.cpp
else: SOURCES += jit/ExecutableAllocatorPosix.cpp

# AllInOneFile.cpp helps gcc analize and optimize code
# Other compilers may be able to do this at link time
SOURCES += \
    runtime/ArgList.cpp \
    runtime/Arguments.cpp \
    runtime/ArrayConstructor.cpp \
    runtime/ArrayPrototype.cpp \
    runtime/BooleanConstructor.cpp \
    runtime/BooleanObject.cpp \
    runtime/BooleanPrototype.cpp \
    runtime/CallData.cpp \
    runtime/Collector.cpp \
    runtime/CommonIdentifiers.cpp \
    runtime/ConstructData.cpp \
    wtf/CurrentTime.cpp \
    runtime/DateConstructor.cpp \
    runtime/DateConversion.cpp \
    runtime/DateInstance.cpp \
    runtime/DatePrototype.cpp \
    debugger/Debugger.cpp \
    debugger/DebuggerCallFrame.cpp \
    debugger/DebuggerActivation.cpp \
    wtf/dtoa.cpp \
    runtime/Error.cpp \
    runtime/ErrorConstructor.cpp \
    runtime/ErrorInstance.cpp \
    runtime/ErrorPrototype.cpp \
    interpreter/CallFrame.cpp \
    runtime/FunctionConstructor.cpp \
    runtime/FunctionPrototype.cpp \
    runtime/GetterSetter.cpp \
    runtime/GlobalEvalFunction.cpp \
    runtime/Identifier.cpp \
    runtime/InternalFunction.cpp \
    runtime/Completion.cpp \
    runtime/JSArray.cpp \
    runtime/JSByteArray.cpp \
    runtime/JSCell.cpp \
    runtime/JSFunction.cpp \
    runtime/JSGlobalObjectFunctions.cpp \
    runtime/JSImmediate.cpp \
    runtime/JSLock.cpp \
    runtime/JSNumberCell.cpp \
    runtime/JSObject.cpp \
    runtime/JSString.cpp \
    runtime/JSValue.cpp \
    runtime/JSWrapperObject.cpp \
    parser/Lexer.cpp \
    runtime/Lookup.cpp \
    runtime/MathObject.cpp \
    runtime/NativeErrorConstructor.cpp \
    runtime/NativeErrorPrototype.cpp \
    parser/Nodes.cpp \
    runtime/NumberConstructor.cpp \
    runtime/NumberObject.cpp \
    runtime/NumberPrototype.cpp \
    runtime/ObjectConstructor.cpp \
    runtime/ObjectPrototype.cpp \
    runtime/Operations.cpp \
    parser/Parser.cpp \
    parser/ParserArena.cpp \
    runtime/PropertyNameArray.cpp \
    runtime/PropertySlot.cpp \
    runtime/PrototypeFunction.cpp \
    runtime/RegExp.cpp \
    runtime/RegExpConstructor.cpp \
    runtime/RegExpObject.cpp \
    runtime/RegExpPrototype.cpp \
    runtime/ScopeChain.cpp \
    runtime/SmallStrings.cpp \
    runtime/StringConstructor.cpp \
    runtime/StringObject.cpp \
    runtime/StringPrototype.cpp \
    runtime/Structure.cpp \
    runtime/StructureChain.cpp \
    runtime/UString.cpp \
    profiler/HeavyProfile.cpp \
    profiler/Profile.cpp \
    profiler/ProfileGenerator.cpp \
    profiler/ProfileNode.cpp \
    profiler/Profiler.cpp \
    profiler/TreeProfile.cpp \
    wtf/DateMath.cpp \
    wtf/FastMalloc.cpp \
    wtf/Threading.cpp \
    wtf/qt/MainThreadQt.cpp \
    parser/SourcePoolQt.cpp

!contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
    SOURCES += wtf/qt/ThreadingQt.cpp
} else {
    DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0
    SOURCES += wtf/ThreadingNone.cpp
}

# GENERATOR 1-A: LUT creator
lut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
lut.depend = ${QMAKE_FILE_NAME}
lut.input = LUT_FILES
lut.CONFIG += no_link
addExtraCompiler(lut)

# GENERATOR 1-B: particular LUT creator (for 1 file only)
keywordlut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
keywordlut.depend = ${QMAKE_FILE_NAME}
keywordlut.input = KEYWORDLUT_FILES
keywordlut.CONFIG += no_link
addExtraCompiler(keywordlut)

# GENERATOR 2: bison grammar
jscbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
jscbison.depend = ${QMAKE_FILE_NAME}
jscbison.input = JSCBISON
jscbison.variable_out = GENERATED_SOURCES
jscbison.dependency_type = TYPE_C
jscbison.CONFIG = target_predeps
addExtraCompilerWithHeader(jscbison)

# JavaScriptCore - Qt4 build info
VPATH += $$PWD

CONFIG(debug, debug|release) {
    isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug
    OBJECTS_DIR = obj/debug
} else { # Release
    isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release
    OBJECTS_DIR = obj/release
}

INCLUDEPATH = \
    $$PWD \
    $$PWD/.. \
    $$PWD/assembler \
    $$PWD/bytecode \
    $$PWD/bytecompiler \
    $$PWD/debugger \
    $$PWD/interpreter \
    $$PWD/jit \
    $$PWD/parser \
    $$PWD/profiler \
    $$PWD/runtime \
    $$PWD/wrec \
    $$PWD/wtf \
    $$PWD/wtf/unicode \
    $$PWD/yarr \
    $$PWD/API \
    $$PWD/ForwardingHeaders \
    $$GENERATED_SOURCES_DIR \
    $$INCLUDEPATH

DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF

GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
win32-* {
    LIBS += -lwinmm
}

# In debug mode JIT disabled until crash fixed
win32-* {
    CONFIG(debug):!contains(DEFINES, ENABLE_JIT=1): DEFINES+=ENABLE_JIT=0
}

# Rules when JIT enabled (not disabled)
!contains(DEFINES, ENABLE_JIT=0) {
    linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
        QMAKE_CXXFLAGS += -fno-stack-protector
        QMAKE_CFLAGS += -fno-stack-protector
    }
}

win32-msvc*: INCLUDEPATH += $$PWD/os-win32
wince* {
    INCLUDEPATH += $$PWD/os-wince
    INCLUDEPATH += $$PWD/os-win32
    SOURCES += $$PWD/os-wince/ce_time.cpp
}

include(pcre/pcre.pri)

LUT_FILES += \
    runtime/DatePrototype.cpp \
    runtime/JSONObject.cpp \
    runtime/NumberConstructor.cpp \
    runtime/StringPrototype.cpp \
    runtime/ArrayPrototype.cpp \
    runtime/MathObject.cpp \
    runtime/RegExpConstructor.cpp \
    runtime/RegExpObject.cpp

KEYWORDLUT_FILES += \
    parser/Keywords.table

JSCBISON += \
    parser/Grammar.y

SOURCES += \
    wtf/Assertions.cpp \
    wtf/ByteArray.cpp \
    wtf/HashTable.cpp \
    wtf/MainThread.cpp \
    wtf/RandomNumber.cpp \
    wtf/RefCountedLeakCounter.cpp \
    wtf/TypeTraits.cpp \
    wtf/unicode/CollatorDefault.cpp \
    wtf/unicode/icu/CollatorICU.cpp \
    wtf/unicode/UTF8.cpp \
    API/JSBase.cpp \
    API/JSCallbackConstructor.cpp \
    API/JSCallbackFunction.cpp \
    API/JSCallbackObject.cpp \
    API/JSClassRef.cpp \
    API/JSContextRef.cpp \
    API/JSObjectRef.cpp \
    API/JSStringRef.cpp \
    API/JSValueRef.cpp \
    API/OpaqueJSString.cpp \
    runtime/InitializeThreading.cpp \
    runtime/JSGlobalData.cpp \
    runtime/JSGlobalObject.cpp \
    runtime/JSStaticScopeObject.cpp \
    runtime/JSVariableObject.cpp \
    runtime/JSActivation.cpp \
    runtime/JSNotAnObject.cpp \
    runtime/JSONObject.cpp \
    runtime/LiteralParser.cpp \
    runtime/TimeoutChecker.cpp \
    bytecode/CodeBlock.cpp \
    bytecode/StructureStubInfo.cpp \
    bytecode/JumpTable.cpp \
    assembler/ARMAssembler.cpp \
    jit/JIT.cpp \
    jit/JITCall.cpp \
    jit/JITArithmetic.cpp \
    jit/JITOpcodes.cpp \
    jit/JITPropertyAccess.cpp \
    jit/ExecutableAllocator.cpp \
    jit/JITStubs.cpp \
    bytecompiler/BytecodeGenerator.cpp \
    runtime/ExceptionHelpers.cpp \
    runtime/JSPropertyNameIterator.cpp \
    interpreter/Interpreter.cpp \
    bytecode/Opcode.cpp \
    bytecode/SamplingTool.cpp \
    yarr/RegexCompiler.cpp \
    yarr/RegexInterpreter.cpp \
    yarr/RegexJIT.cpp \
    interpreter/RegisterFile.cpp

win32-*: SOURCES += jit/ExecutableAllocatorWin.cpp
else: SOURCES += jit/ExecutableAllocatorPosix.cpp

# AllInOneFile.cpp helps gcc analize and optimize code
# Other compilers may be able to do this at link time
SOURCES += \
    runtime/ArgList.cpp \
    runtime/Arguments.cpp \
    runtime/ArrayConstructor.cpp \
    runtime/ArrayPrototype.cpp \
    runtime/BooleanConstructor.cpp \
    runtime/BooleanObject.cpp \
    runtime/BooleanPrototype.cpp \
    runtime/CallData.cpp \
    runtime/Collector.cpp \
    runtime/CommonIdentifiers.cpp \
    runtime/ConstructData.cpp \
    wtf/CurrentTime.cpp \
    runtime/DateConstructor.cpp \
    runtime/DateConversion.cpp \
    runtime/DateInstance.cpp \
    runtime/DatePrototype.cpp \
    debugger/Debugger.cpp \
    debugger/DebuggerCallFrame.cpp \
    debugger/DebuggerActivation.cpp \
    wtf/dtoa.cpp \
    runtime/Error.cpp \
    runtime/ErrorConstructor.cpp \
    runtime/ErrorInstance.cpp \
    runtime/ErrorPrototype.cpp \
    interpreter/CallFrame.cpp \
    runtime/FunctionConstructor.cpp \
    runtime/FunctionPrototype.cpp \
    runtime/GetterSetter.cpp \
    runtime/GlobalEvalFunction.cpp \
    runtime/Identifier.cpp \
    runtime/InternalFunction.cpp \
    runtime/Completion.cpp \
    runtime/JSArray.cpp \
    runtime/JSByteArray.cpp \
    runtime/JSCell.cpp \
    runtime/JSFunction.cpp \
    runtime/JSGlobalObjectFunctions.cpp \
    runtime/JSImmediate.cpp \
    runtime/JSLock.cpp \
    runtime/JSNumberCell.cpp \
    runtime/JSObject.cpp \
    runtime/JSString.cpp \
    runtime/JSValue.cpp \
    runtime/JSWrapperObject.cpp \
    parser/Lexer.cpp \
    runtime/Lookup.cpp \
    runtime/MathObject.cpp \
    runtime/NativeErrorConstructor.cpp \
    runtime/NativeErrorPrototype.cpp \
    parser/Nodes.cpp \
    runtime/NumberConstructor.cpp \
    runtime/NumberObject.cpp \
    runtime/NumberPrototype.cpp \
    runtime/ObjectConstructor.cpp \
    runtime/ObjectPrototype.cpp \
    runtime/Operations.cpp \
    parser/Parser.cpp \
    parser/ParserArena.cpp \
    runtime/PropertyNameArray.cpp \
    runtime/PropertySlot.cpp \
    runtime/PrototypeFunction.cpp \
    runtime/RegExp.cpp \
    runtime/RegExpConstructor.cpp \
    runtime/RegExpObject.cpp \
    runtime/RegExpPrototype.cpp \
    runtime/ScopeChain.cpp \
    runtime/SmallStrings.cpp \
    runtime/StringConstructor.cpp \
    runtime/StringObject.cpp \
    runtime/StringPrototype.cpp \
    runtime/Structure.cpp \
    runtime/StructureChain.cpp \
    runtime/UString.cpp \
    profiler/HeavyProfile.cpp \
    profiler/Profile.cpp \
    profiler/ProfileGenerator.cpp \
    profiler/ProfileNode.cpp \
    profiler/Profiler.cpp \
    profiler/TreeProfile.cpp \
    wtf/DateMath.cpp \
    wtf/FastMalloc.cpp \
    wtf/Threading.cpp \
    wtf/qt/MainThreadQt.cpp \
    parser/SourcePoolQt.cpp

!contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
    SOURCES += wtf/qt/ThreadingQt.cpp
} else {
    DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0
    SOURCES += wtf/ThreadingNone.cpp
}

# GENERATOR 1-A: LUT creator
lut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
lut.depend = ${QMAKE_FILE_NAME}
lut.input = LUT_FILES
lut.CONFIG += no_link
addExtraCompiler(lut)

# GENERATOR 1-B: particular LUT creator (for 1 file only)
keywordlut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
keywordlut.depend = ${QMAKE_FILE_NAME}
keywordlut.input = KEYWORDLUT_FILES
keywordlut.CONFIG += no_link
addExtraCompiler(keywordlut)

# GENERATOR 2: bison grammar
jscbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
jscbison.depend = ${QMAKE_FILE_NAME}
jscbison.input = JSCBISON
jscbison.variable_out = GENERATED_SOURCES
jscbison.dependency_type = TYPE_C
jscbison.CONFIG = target_predeps
addExtraCompilerWithHeader(jscbison)