Fix docs build for out of tree builds

Fix docs build for out of tree builds

#-----------------------------------------------------------------------------
# doc.pri
#-----------------------------------------------------------------------------

# list of documentation folders to install
DOC_FOLDERS = doc/html \
              doc/qch

# files and folders listed in the installation target's .files section
# must exist _before_ qmake generates the Makefile...so, make sure our
# documentation target folders exist in the current build folder
for( folder, DOC_FOLDERS ) {
    system( mkdir -p $$OUT_PWD/$${folder} )
}

#-----------------------------------------------------------------------------
# extra build targets for generating and cleaning documentation
#-----------------------------------------------------------------------------
DOC_INPUT += $${_PRO_FILE_PWD_}/doc/src
DOC_INPUT += $${_PRO_FILE_PWD_}/src

# target for generating documentation
doctarget.target     = docs
doctarget.commands   = OUTPUT_DIRECTORY=doc \
                       PROJECT_NAME=\"$${PROJECT_NAME}\" \
                       PROJECT_NUMBER=\"$${PROJECT_VERSION}\" \
                       STRIP_FROM_PATH=\"$${_PRO_FILE_PWD_}\" \
                       INPUT=\"$${DOC_INPUT}\" \
                       QHP_NAMESPACE=\"com.nokia.example.$${TARGET}\" \
                       QHP_VIRTUAL_FOLDER=\"$${TARGET}\" \
                       TAGFILES=\"$$system(pwd)/qt.tags\" \
                       TAGFILE=\"doc/$${TARGET}.tags\" \
                       doxygen $$system(pwd)/doxy.conf
doctarget.depends    = FORCE
QMAKE_EXTRA_TARGETS += doctarget

# target for cleaning generated documentation
doccleantarget.target = cleandocs
for( folder, DOC_FOLDERS ) {
    doccleantarget.commands += rm -r -f $${folder};
}
doccleantarget.commands += rm -r -f doc/signon.tags;
doccleantarget.depends   = FORCE
QMAKE_EXTRA_TARGETS     += doccleantarget

#-----------------------------------------------------------------------------
# installation setup
# NOTE: remember to set headers.files before this include to have the headers
# properly setup.
#-----------------------------------------------------------------------------
include( ../common-project-config.pri )
include( ../common-installs-config.pri )

#-----------------------------------------------------------------------------
# Installation target setup for documentation
#-----------------------------------------------------------------------------
documentation.path = $${INSTALL_PREFIX}/share/doc/$${PROJECT_NAME}
for( folder, DOC_FOLDERS ) {
    documentation.files += $$OUT_PWD/$${folder}
}
# make sure docs are generated before trying to install anything
documentation.depends  = docs
INSTALLS              += documentation
message("====")
message("==== INSTALLS += documentation")

# End of File

#-----------------------------------------------------------------------------
# doc.pri
#-----------------------------------------------------------------------------

# list of documentation folders to install
DOC_FOLDERS = doc/html \
              doc/qch

# files and folders listed in the installation target's .files section
# must exist _before_ qmake generates the Makefile...so, make sure our
# documentation target folders exist in the current build folder
for( folder, DOC_FOLDERS ) {
    system( mkdir -p $$(PWD)/$${folder} )
}

#-----------------------------------------------------------------------------
# extra build targets for generating and cleaning documentation
#-----------------------------------------------------------------------------
DOC_INPUT += $${_PRO_FILE_PWD_}/doc/src
DOC_INPUT += $${_PRO_FILE_PWD_}/src

# target for generating documentation
doctarget.target     = docs
doctarget.commands   = OUTPUT_DIRECTORY=doc \
                       PROJECT_NAME=\"$${PROJECT_NAME}\" \
                       PROJECT_NUMBER=\"$${PROJECT_VERSION}\" \
                       STRIP_FROM_PATH=\"$${_PRO_FILE_PWD_}\" \
                       INPUT=\"$${DOC_INPUT}\" \
                       QHP_NAMESPACE=\"com.nokia.example.$${TARGET}\" \
                       QHP_VIRTUAL_FOLDER=\"$${TARGET}\" \
                       TAGFILES=\"$$system(pwd)/qt.tags\" \
                       TAGFILE=\"doc/$${TARGET}.tags\" \
                       doxygen $$system(pwd)/doxy.conf
doctarget.depends    = FORCE
QMAKE_EXTRA_TARGETS += doctarget

# target for cleaning generated documentation
doccleantarget.target = cleandocs
for( folder, DOC_FOLDERS ) {
    doccleantarget.commands += rm -r -f $${folder};
}
doccleantarget.commands += rm -r -f doc/signon.tags;
doccleantarget.depends   = FORCE
QMAKE_EXTRA_TARGETS     += doccleantarget

#-----------------------------------------------------------------------------
# installation setup
# NOTE: remember to set headers.files before this include to have the headers
# properly setup.
#-----------------------------------------------------------------------------
include( ../common-project-config.pri )
include( ../common-installs-config.pri )

#-----------------------------------------------------------------------------
# Installation target setup for documentation
#-----------------------------------------------------------------------------
documentation.path = $${INSTALL_PREFIX}/share/doc/$${PROJECT_NAME}
for( folder, DOC_FOLDERS ) {
    documentation.files += $${folder}
}
# make sure docs are generated before trying to install anything
documentation.depends  = docs
INSTALLS              += documentation
message("====")
message("==== INSTALLS += documentation")

# End of File


qt submodule update

qt submodule update

DEFINES += HAVE_SUITABLE_QT_VERSION=1

QT += websockets

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

DEPENDPATH += $$PWD

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

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

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

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

}

macx {
DEFINES += __RE_OS_MACOSX__=1

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

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

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

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

## jansson defines
DEFINES += JSON_INLINE=inline

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

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

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

}

linux-* {
DEFINES += __RE_OS_LINUX__=1

}

DEFINES += HAVE_SUITABLE_QT_VERSION=1

QT += websockets

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

DEPENDPATH += $$PWD

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

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

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

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

}

macx {
DEFINES += __RE_OS_MACOSX__=1

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

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

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

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

## jansson defines
DEFINES += JSON_INLINE=inline

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

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

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

}

linux-* {
DEFINES += __RE_OS_LINUX__=1

}


Fix 'nmake qch_docs' failed on Windows

Fix 'nmake qch_docs' failed on Windows

Task-number: QTBUG-24953

Change-Id: I949e724f718603f58a163351499b639c631a2d80
Reviewed-by: Casper van Donderen <808524cef5c654648bea2a2b954f3b3445ed083c@nokia.com>

#####################################################################
# Qt documentation build
#####################################################################

DOCS_GENERATION_DEFINES =
GENERATOR = $${QT.help.bins}/qhelpgenerator
MODULE = qtdoc

win32:!win32-g++* {
    unixstyle = false
} else :win32-g++*:isEmpty(QMAKE_SH) {
    unixstyle = false
} else {
    unixstyle = true
}

$$unixstyle {
    SET =
    SEP =
} else {
    SET = set
    SEP = &&
}

# The module names correspond to the names of files in qtbase/mkspecs/modules
# that take the form qt_<module>.pri. This is why we see clucene, not qttools,
# and systeminfo, not systems.

MODULES = activeqt \
          core \ # dbus gui network opengl openvg sql testlib uilib uitools xml
          declarative \
          doc \
          clucene \ # help designer
          location \
          multimedia \
          phonon \
          publishsubscribe \
          3d \
          script \ # scripttools
          sensors \
          serviceframework \
          systeminfo \
          svg \
          webkit \
          webkit-examples-and-demos \
          xmlpatterns \
          contacts \
          organizer \
          versit \
          bluetooth

# Compile a list of location definitions for each of the modules and a list of
# qdocconf files to include.

LOCATIONS =
INCLUDES =
for(module, MODULES) {

    INCLUDES += $$SET

    # Take the module name and convert it to the name of the variable that
    # contains the sources path, which takes the form, QT.<module name>.sources.

    module_name = $$upper($$module)
    module_name = $$replace(module_name, "-", "_")
    module_value = $$eval(QT.$$replace(module, "-", "_").sources)
    !isEmpty(module_value) {
        LOCATIONS += $$SET
        LOCATIONS += QT_$${module_name}_SOURCES=$$module_value$$SEP

        INCLUDES += QT_$${module_name}_QDOCCONF=modules/qt$${module}.qdocconf$$SEP
        debug : message($$module : $$module_value)
    } else {
        INCLUDES += QT_$${module_name}_QDOCCONF=modules/missing.qdocconf$$SEP
        debug : message($$module not found.)
    }
}

# Output the locations and includes as build messages. This helps the user to
# see which modules have been installed and diagnose any problems.

message($$LOCATIONS)
message($$INCLUDES)

# Input files in the source tree
ONLINE_QDOCCONF = $${QT.doc.sources}/doc/config/qt-build-docs-online.qdocconf
ONLINE_QDOCCONF = $$replace(ONLINE_QDOCCONF, "/", $$QMAKE_DIR_SEP)

DITA_QDOCCONF = $${QT.doc.sources}/doc/config/qt-ditaxml.qdocconf
DITA_QDOCCONF = $$replace(DITA_QDOCCONF, "/", $$QMAKE_DIR_SEP)

OFFLINE_QDOCCONF = $${QT.doc.sources}/doc/config/qt-build-docs.qdocconf
OFFLINE_QDOCCONF = $$replace(OFFLINE_QDOCCONF, "/", $$QMAKE_DIR_SEP)

MODULE_ONLINE_QDOCCONF = $${QT.doc.sources}/doc/config/$${MODULE}-online.qdocconf
MODULE_ONLINE_QDOCCONF = $$replace(ONLINE_QDOCCONF, "/", $$QMAKE_DIR_SEP)

MODULE_OFFLINE_QDOCCONF = $${QT.doc.sources}/doc/config/$${MODULE}.qdocconf
MODULE_OFFLINE_QDOCCONF = $$replace(OFFLINE_QDOCCONF, "/", $$QMAKE_DIR_SEP)

# Output files in the build tree
QHP_FILE = html/qt.qhp
QHP_FILE = $$replace(QHP_FILE, "/", $$QMAKE_DIR_SEP)
QCH_FILE = qch/qt.qch
QCH_FILE = $$replace(QCH_FILE, "/", $$QMAKE_DIR_SEP)

INDEX_FILE = html/qt.index
INDEX_FILE = $$replace(INDEX_FILE, "/", $$QMAKE_DIR_SEP)
INDEX_DEST = $$INDEX_DESTDIR/qt.index
INDEX_DEST = $$replace(INDEX_DEST, "/", $$QMAKE_DIR_SEP)

MODULE_QHP_FILE = html/$${MODULE}.qhp
MODULE_QHP_FILE = $$replace(QHP_FILE, "/", $$QMAKE_DIR_SEP)
MODULE_QCH_FILE = qch/$${MODULE}.qch
MODULE_QCH_FILE = $$replace(QCH_FILE, "/", $$QMAKE_DIR_SEP)

MODULE_INDEX_FILE = html/$${MODULE}.index
MODULE_INDEX_FILE = $$replace(INDEX_FILE, "/", $$QMAKE_DIR_SEP)
MODULE_INDEX_DEST = $$INDEX_DESTDIR/$${MODULE}.index
MODULE_INDEX_DEST = $$replace(INDEX_DEST, "/", $$QMAKE_DIR_SEP)

$$unixstyle {
    QDOC = $$LOCATIONS $$INCLUDES MODULE_SOURCE_TREE=$${QT.doc.sources} MODULE_BUILD_TREE=$$MODULE_BUILD_DIR $$QT.core.bins/qdoc $$DOCS_GENERATION_DEFINES
} else {
    QDOC = $$LOCATIONS $$INCLUDES set MODULE_SOURCE_TREE=$${QT.doc.sources}&& set MODULE_BUILD_TREE=$$MODULE_BUILD_DIR&& $$QT.core.bins/qdoc.exe $$DOCS_GENERATION_DEFINES
    QDOC = $$replace(QDOC, "/", $$QMAKE_DIR_SEP)
}

# Build rules:

online_docs.commands = ($$QDOC $$ONLINE_QDOCCONF)

dita_docs.commands = ($$QDOC $$DITA_QDOCCONF)

qch_docs.commands = ($$QDOC $$OFFLINE_QDOCCONF && \
                     $$GENERATOR -platform minimal $$QHP_FILE -o $$QCH_FILE)

docs.commands = ($$QDOC $$OFFLINE_QDOCCONF && \
                 $$GENERATOR -platform minimal $$QHP_FILE -o $$QCH_FILE && \
                 $$QDOC $$ONLINE_QDOCCONF)

# Install rules

htmldocs.files = html
htmldocs.path = $$[QT_INSTALL_DOCS]
htmldocs.CONFIG += no_check_exist directory

qchdocs.files= qch
qchdocs.path = $$[QT_INSTALL_DOCS]
qchdocs.CONFIG += no_check_exist directory

docimages.files = src/images
docimages.path = $$[QT_INSTALL_DOCS]/src

QMAKE_EXTRA_TARGETS += online_docs qch_docs docs dita_docs
INSTALLS += htmldocs qchdocs docimages

#####################################################################
# Qt documentation build
#####################################################################

DOCS_GENERATION_DEFINES =
GENERATOR = $${QT.help.bins}/qhelpgenerator
MODULE = qtdoc

win32:!win32-g++* {
    unixstyle = false
} else :win32-g++*:isEmpty(QMAKE_SH) {
    unixstyle = false
} else {
    unixstyle = true
}

$$unixstyle {
    SET =
    SEP =
} else {
    SET = set
    SEP = &&
}

# The module names correspond to the names of files in qtbase/mkspecs/modules
# that take the form qt_<module>.pri. This is why we see clucene, not qttools,
# and systeminfo, not systems.

MODULES = activeqt \
          core \ # dbus gui network opengl openvg sql testlib uilib uitools xml
          declarative \
          doc \
          clucene \ # help designer
          location \
          multimedia \
          phonon \
          publishsubscribe \
          3d \
          script \ # scripttools
          sensors \
          serviceframework \
          systeminfo \
          svg \
          webkit \
          webkit-examples-and-demos \
          xmlpatterns \
          contacts \
          organizer \
          versit \
          bluetooth

# Compile a list of location definitions for each of the modules and a list of
# qdocconf files to include.

LOCATIONS =
INCLUDES =
for(module, MODULES) {

    INCLUDES += $$SET

    # Take the module name and convert it to the name of the variable that
    # contains the sources path, which takes the form, QT.<module name>.sources.

    module_name = $$upper($$module)
    module_name = $$replace(module_name, "-", "_")
    module_value = $$eval(QT.$$replace(module, "-", "_").sources)
    !isEmpty(module_value) {
        LOCATIONS += $$SET
        LOCATIONS += QT_$${module_name}_SOURCES=$$module_value$$SEP

        INCLUDES += QT_$${module_name}_QDOCCONF=modules/qt$${module}.qdocconf$$SEP
        debug : message($$module : $$module_value)
    } else {
        INCLUDES += QT_$${module_name}_QDOCCONF=modules/missing.qdocconf$$SEP
        debug : message($$module not found.)
    }
}

# Output the locations and includes as build messages. This helps the user to
# see which modules have been installed and diagnose any problems.

message($$LOCATIONS)
message($$INCLUDES)

# Input files in the source tree
ONLINE_QDOCCONF = $${QT.doc.sources}/doc/config/qt-build-docs-online.qdocconf
ONLINE_QDOCCONF = $$replace(ONLINE_QDOCCONF, "/", $$QMAKE_DIR_SEP)

DITA_QDOCCONF = $${QT.doc.sources}/doc/config/qt-ditaxml.qdocconf
DITA_QDOCCONF = $$replace(DITA_QDOCCONF, "/", $$QMAKE_DIR_SEP)

OFFLINE_QDOCCONF = $${QT.doc.sources}/doc/config/qt-build-docs.qdocconf
OFFLINE_QDOCCONF = $$replace(OFFLINE_QDOCCONF, "/", $$QMAKE_DIR_SEP)

MODULE_ONLINE_QDOCCONF = $${QT.doc.sources}/doc/config/$${MODULE}-online.qdocconf
MODULE_ONLINE_QDOCCONF = $$replace(ONLINE_QDOCCONF, "/", $$QMAKE_DIR_SEP)

MODULE_OFFLINE_QDOCCONF = $${QT.doc.sources}/doc/config/$${MODULE}.qdocconf
MODULE_OFFLINE_QDOCCONF = $$replace(OFFLINE_QDOCCONF, "/", $$QMAKE_DIR_SEP)

# Output files in the build tree
QHP_FILE = html/qt.qhp
QHP_FILE = $$replace(QHP_FILE, "/", $$QMAKE_DIR_SEP)
QCH_FILE = qch/qt.qch
QCH_FILE = $$replace(QCH_FILE, "/", $$QMAKE_DIR_SEP)

INDEX_FILE = html/qt.index
INDEX_FILE = $$replace(INDEX_FILE, "/", $$QMAKE_DIR_SEP)
INDEX_DEST = $$INDEX_DESTDIR/qt.index
INDEX_DEST = $$replace(INDEX_DEST, "/", $$QMAKE_DIR_SEP)

MODULE_QHP_FILE = html/$${MODULE}.qhp
MODULE_QHP_FILE = $$replace(QHP_FILE, "/", $$QMAKE_DIR_SEP)
MODULE_QCH_FILE = qch/$${MODULE}.qch
MODULE_QCH_FILE = $$replace(QCH_FILE, "/", $$QMAKE_DIR_SEP)

MODULE_INDEX_FILE = html/$${MODULE}.index
MODULE_INDEX_FILE = $$replace(INDEX_FILE, "/", $$QMAKE_DIR_SEP)
MODULE_INDEX_DEST = $$INDEX_DESTDIR/$${MODULE}.index
MODULE_INDEX_DEST = $$replace(INDEX_DEST, "/", $$QMAKE_DIR_SEP)

$$unixstyle {
    QDOC = $$LOCATIONS $$INCLUDES MODULE_SOURCE_TREE=$${QT.doc.sources} MODULE_BUILD_TREE=$$MODULE_BUILD_DIR $$QT.core.bins/qdoc $$DOCS_GENERATION_DEFINES
} else {
    QDOC = $$LOCATIONS $$INCLUDES set MODULE_SOURCE_TREE=$${QT.doc.sources} && set MODULE_BUILD_TREE=$$MODULE_BUILD_DIR && $$QT.core.bins/qdoc.exe $$DOCS_GENERATION_DEFINES
    QDOC = $$replace(QDOC, "/", $$QMAKE_DIR_SEP)
}

# Build rules:

online_docs.commands = ($$QDOC $$ONLINE_QDOCCONF)

dita_docs.commands = ($$QDOC $$DITA_QDOCCONF)

qch_docs.commands = ($$QDOC $$OFFLINE_QDOCCONF && \
                     $$GENERATOR -platform minimal $$QHP_FILE -o $$QCH_FILE)

docs.commands = ($$QDOC $$OFFLINE_QDOCCONF && \
                 $$GENERATOR -platform minimal $$QHP_FILE -o $$QCH_FILE && \
                 $$QDOC $$ONLINE_QDOCCONF)

# Install rules

htmldocs.files = html
htmldocs.path = $$[QT_INSTALL_DOCS]
htmldocs.CONFIG += no_check_exist directory

qchdocs.files= qch
qchdocs.path = $$[QT_INSTALL_DOCS]
qchdocs.CONFIG += no_check_exist directory

docimages.files = src/images
docimages.path = $$[QT_INSTALL_DOCS]/src

QMAKE_EXTRA_TARGETS += online_docs qch_docs docs dita_docs
INSTALLS += htmldocs qchdocs docimages


don't install test cases

don't install test cases

Unless no_testcase_installs is specified in the CONFIG line, test
cases will be automatically installed to /usr/share during a make
install. This adds the required line to the tests.pri file, so no
tests will be installed

INCLUDEPATH += $${QJSONRPC_INCLUDEPATH} \
               $${QJSONRPC_INCLUDEPATH}/json
LIBS += -L$${DEPTH}/src $${QJSONRPC_LIBS}
QT = core network testlib
QT -= gui
CONFIG -= app_bundle
CONFIG += testcase no_testcase_installs

unix:!macx:QMAKE_RPATHDIR += $${OUT_PWD}/$${DEPTH}/src
macx {
    QMAKE_RPATHDIR += @loader_path/$${DEPTH}/src
    QMAKE_LFLAGS += -Wl,-rpath,@loader_path/$${DEPTH}/src
}

INCLUDEPATH += $${QJSONRPC_INCLUDEPATH} \
               $${QJSONRPC_INCLUDEPATH}/json
LIBS += -L$${DEPTH}/src $${QJSONRPC_LIBS}
QT = core network testlib
QT -= gui
CONFIG -= app_bundle
CONFIG += testcase

unix:!macx:QMAKE_RPATHDIR += $${OUT_PWD}/$${DEPTH}/src
macx {
    QMAKE_RPATHDIR += @loader_path/$${DEPTH}/src
    QMAKE_LFLAGS += -Wl,-rpath,@loader_path/$${DEPTH}/src
}


Changed a hardcoded "gnustl" specification to a variable. This way the STL variant to be used can be specified for example in the main app .pro file. By setting the variable QTFIREBASE_STL_VARIANT to "c++" the project will also compile with clang without linking errors (otherwise the wrong libraries are used)

message("QtFirebase: configuring build for supported Firebase target platform...")

isEmpty(QTFIREBASE_SDK_PATH){
    QTFIREBASE_SDK_PATH = $$PWD/firebase_cpp_sdk
    message("No QTFIREBASE_SDK_PATH path sat. Using default (firebase_cpp_sdk) $$QTFIREBASE_SDK_PATH")
} else {
    message("Using QTFIREBASE_SDK_PATH ($$QTFIREBASE_SDK_PATH)")
}

QTFIREBASE_SDK_LIBS_PREFIX = "firebase_"

QML_IMPORT_PATH += $$PWD

INCLUDEPATH += $$PWD

INCLUDEPATH += \
    $$QTFIREBASE_SDK_PATH/include \
    \

HEADERS += \
    $$PWD/src/platformutils.h \
    $$PWD/src/qtfirebase.h \
    $$PWD/src/qtfirebaseservice.h \
    \

SOURCES += \
    $$PWD/src/qtfirebase.cpp \
    $$PWD/src/qtfirebaseservice.cpp \
    \

contains(QTPLUGIN,qtfirebase) {
    HEADERS += $$PWD/src/qtfirebase_plugin.h
    SOURCES += $$PWD/src/qtfirebase_plugin.cpp
}

!ios: {
    SOURCES += \
        $$PWD/src/platformutils.cpp \
    \
}

RESOURCES += \
    $$PWD/qtfirebase.qrc \
    \

android: {

    # Setup tips
    #
    # Add services to xml file
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/AndroidManifest.xml
    #
    # Add the 'onNewIntent' function to your Qt Activity
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/src/android/java/com/google/firebase/example/TestappNativeActivity.java

    message("QtFirebase Android base")
    QT += androidextras gui-private

    # Specify the STL variant that is to be used in the app .pro file with the $$QTFIREBASE_STL_VARIANT variable
    # c++:      LLVM libc++ runtime
    # gnustl:   GNU STL
    # stlport:  STLPort runtime
    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/android/$$ANDROID_TARGET_ARCH/$$QTFIREBASE_STL_VARIANT

    DEPENDPATH += $$QTFIREBASE_SDK_LIBS_PATH
}

ios: {

    # Setup tips
    #
    # Download the Google Firebase Framework link for Ios
    # and extract the files to this folder $$PWD/src/ios/Firebase/
    # or use your own folder QTFIREBASE_FRAMEWORKS_ROOT = YOUR/PWD
    # https://firebase.google.com/docs/ios/setup#frameworks

    message("QtFirebase iOS base")
    QT += gui_private

    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/ios/universal/

    QTFIREBASE_FRAMEWORKS_ROOT = $$PWD/src/ios/Firebase/

    QMAKE_LFLAGS += -ObjC

    HEADERS += \
        $$PWD/src/ios/AppDelegate.h \
        \

    OBJECTIVE_SOURCES += \
        $$PWD/src/ios/platformutils.mm \
        $$PWD/src/ios/AppDelegate.mm \
        \

    LIBS += \
        -ObjC \
        -lsqlite3 \
        -lz \
        -L$$QTFIREBASE_SDK_LIBS_PATH \
        -framework MediaPlayer \
        -framework CoreMotion \
        -framework CoreTelephony \
        -framework MessageUI \
        -framework GLKit \
        -framework AddressBook \
        -framework UIKit \
        -framework SystemConfiguration \
        \

    INCLUDEPATH += \
        $$QTFIREBASE_SDK_PATH/include \
        $$PWD/src \
        $$PWD/src/ios \
        \
}

# NOTE the order of linking is important!

PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}app.a
LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app

# AdMob
contains(DEFINES,QTFIREBASE_BUILD_ADMOB) {
    message( "QtFirebase including AdMob" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/AdMob \
            -framework GoogleMobileAds \
            -framework AdSupport \
            -framework StoreKit \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseadmob.h
    SOURCES += $$PWD/src/qtfirebaseadmob.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}admob.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}admob
}

# Remote Config
contains(DEFINES,QTFIREBASE_BUILD_REMOTE_CONFIG) {
    message( "QtFirebase including RemoteConfig" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/RemoteConfig \
            -framework FirebaseABTesting \ # Required for Firebase iOS >= 4.5.0
            -framework FirebaseRemoteConfig \
            -framework Protobuf \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseremoteconfig.h
    SOURCES += $$PWD/src/qtfirebaseremoteconfig.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config
}

# Messaging
contains(DEFINES,QTFIREBASE_BUILD_MESSAGING) {
    message( "QtFirebase including Messaging" )

    ios: {
        message( "QtFirebase Messaging requires iOS v10.x to build. Setting QMAKE_IOS_DEPLOYMENT_TARGET = 10.0" )
        QMAKE_IOS_DEPLOYMENT_TARGET = 10.0

        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Messaging \
            -framework FirebaseMessaging \
            -framework Protobuf \
            -framework UserNotifications \
            \
    }

    HEADERS += $$PWD/src/qtfirebasemessaging.h
    SOURCES += $$PWD/src/qtfirebasemessaging.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}messaging.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}messaging
}

# Analytics
contains(DEFINES,QTFIREBASE_BUILD_ANALYTICS) {
    message( "QtFirebase including Analytics" )

    ios: {
        LIBS += \
            -framework StoreKit \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Analytics \
            -framework FirebaseAnalytics \
            -framework FirebaseCore \
            -framework FirebaseCoreDiagnostics \
            -framework FirebaseInstanceID \
            -framework GoogleAppMeasurement \
            -framework GoogleUtilities \
            -framework nanopb \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseanalytics.h
    SOURCES += $$PWD/src/qtfirebaseanalytics.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}analytics.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}analytics
}

# Auth
contains(DEFINES,QTFIREBASE_BUILD_AUTH) {
    message( "QtFirebase including Auth" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Auth \
            -framework FirebaseAuth \
            -framework GTMSessionFetcher \
            -framework SafariServices \ # Required for Firebase iOS >= 4.4.0
        \
    }

    HEADERS += $$PWD/src/qtfirebaseauth.h
    SOURCES += $$PWD/src/qtfirebaseauth.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}auth.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}auth
}

# Database
contains(DEFINES,QTFIREBASE_BUILD_DATABASE) {
    message( "QtFirebase including Database" )

    ios: {
        LIBS += \
            -licucore \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Database \
            -framework FirebaseDatabase \
            -framework leveldb-library \
        \
    }

    HEADERS += $$PWD/src/qtfirebasedatabase.h
    SOURCES += $$PWD/src/qtfirebasedatabase.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}database.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}database
}

LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app

message("QtFirebase: configuring build for supported Firebase target platform...")

isEmpty(QTFIREBASE_SDK_PATH){
    QTFIREBASE_SDK_PATH = $$PWD/firebase_cpp_sdk
    message("No QTFIREBASE_SDK_PATH path sat. Using default (firebase_cpp_sdk) $$QTFIREBASE_SDK_PATH")
} else {
    message("Using QTFIREBASE_SDK_PATH ($$QTFIREBASE_SDK_PATH)")
}

QTFIREBASE_SDK_LIBS_PREFIX = "firebase_"

QML_IMPORT_PATH += $$PWD

INCLUDEPATH += $$PWD

INCLUDEPATH += \
    $$QTFIREBASE_SDK_PATH/include \
    \

HEADERS += \
    $$PWD/src/platformutils.h \
    $$PWD/src/qtfirebase.h \
    $$PWD/src/qtfirebaseservice.h \
    \

SOURCES += \
    $$PWD/src/qtfirebase.cpp \
    $$PWD/src/qtfirebaseservice.cpp \
    \

contains(QTPLUGIN,qtfirebase) {
    HEADERS += $$PWD/src/qtfirebase_plugin.h
    SOURCES += $$PWD/src/qtfirebase_plugin.cpp
}

!ios: {
    SOURCES += \
        $$PWD/src/platformutils.cpp \
    \
}

RESOURCES += \
    $$PWD/qtfirebase.qrc \
    \

android: {

    # Setup tips
    #
    # Add services to xml file
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/AndroidManifest.xml
    #
    # Add the 'onNewIntent' function to your Qt Activity
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/src/android/java/com/google/firebase/example/TestappNativeActivity.java

    message("QtFirebase Android base")
    QT += androidextras gui-private

    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/android/$$ANDROID_TARGET_ARCH/gnustl

    DEPENDPATH += $$QTFIREBASE_SDK_LIBS_PATH
}

ios: {

    # Setup tips
    #
    # Download the Google Firebase Framework link for Ios
    # and extract the files to this folder $$PWD/src/ios/Firebase/
    # or use your own folder QTFIREBASE_FRAMEWORKS_ROOT = YOUR/PWD
    # https://firebase.google.com/docs/ios/setup#frameworks

    message("QtFirebase iOS base")
    QT += gui_private

    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/ios/universal/

    QTFIREBASE_FRAMEWORKS_ROOT = $$PWD/src/ios/Firebase/

    QMAKE_LFLAGS += -ObjC

    HEADERS += \
        $$PWD/src/ios/AppDelegate.h \
        \

    OBJECTIVE_SOURCES += \
        $$PWD/src/ios/platformutils.mm \
        $$PWD/src/ios/AppDelegate.mm \
        \

    LIBS += \
        -ObjC \
        -lsqlite3 \
        -lz \
        -L$$QTFIREBASE_SDK_LIBS_PATH \
        -framework MediaPlayer \
        -framework CoreMotion \
        -framework CoreTelephony \
        -framework MessageUI \
        -framework GLKit \
        -framework AddressBook \
        -framework UIKit \
        -framework SystemConfiguration \
        \

    INCLUDEPATH += \
        $$QTFIREBASE_SDK_PATH/include \
        $$PWD/src \
        $$PWD/src/ios \
        \
}

# NOTE the order of linking is important!

PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}app.a
LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app

# AdMob
contains(DEFINES,QTFIREBASE_BUILD_ADMOB) {
    message( "QtFirebase including AdMob" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/AdMob \
            -framework GoogleMobileAds \
            -framework AdSupport \
            -framework StoreKit \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseadmob.h
    SOURCES += $$PWD/src/qtfirebaseadmob.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}admob.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}admob
}

# Remote Config
contains(DEFINES,QTFIREBASE_BUILD_REMOTE_CONFIG) {
    message( "QtFirebase including RemoteConfig" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/RemoteConfig \
            -framework FirebaseABTesting \ # Required for Firebase iOS >= 4.5.0
            -framework FirebaseRemoteConfig \
            -framework Protobuf \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseremoteconfig.h
    SOURCES += $$PWD/src/qtfirebaseremoteconfig.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config
}

# Messaging
contains(DEFINES,QTFIREBASE_BUILD_MESSAGING) {
    message( "QtFirebase including Messaging" )

    ios: {
        message( "QtFirebase Messaging requires iOS v10.x to build. Setting QMAKE_IOS_DEPLOYMENT_TARGET = 10.0" )
        QMAKE_IOS_DEPLOYMENT_TARGET = 10.0

        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Messaging \
            -framework FirebaseMessaging \
            -framework Protobuf \
            -framework UserNotifications \
            \
    }

    HEADERS += $$PWD/src/qtfirebasemessaging.h
    SOURCES += $$PWD/src/qtfirebasemessaging.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}messaging.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}messaging
}

# Analytics
contains(DEFINES,QTFIREBASE_BUILD_ANALYTICS) {
    message( "QtFirebase including Analytics" )

    ios: {
        LIBS += \
            -framework StoreKit \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Analytics \
            -framework FirebaseAnalytics \
            -framework FirebaseCore \
            -framework FirebaseCoreDiagnostics \
            -framework FirebaseInstanceID \
            -framework GoogleAppMeasurement \
            -framework GoogleUtilities \
            -framework nanopb \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseanalytics.h
    SOURCES += $$PWD/src/qtfirebaseanalytics.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}analytics.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}analytics
}

# Auth
contains(DEFINES,QTFIREBASE_BUILD_AUTH) {
    message( "QtFirebase including Auth" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Auth \
            -framework FirebaseAuth \
            -framework GTMSessionFetcher \
            -framework SafariServices \ # Required for Firebase iOS >= 4.4.0
        \
    }

    HEADERS += $$PWD/src/qtfirebaseauth.h
    SOURCES += $$PWD/src/qtfirebaseauth.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}auth.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}auth
}

# Database
contains(DEFINES,QTFIREBASE_BUILD_DATABASE) {
    message( "QtFirebase including Database" )

    ios: {
        LIBS += \
            -licucore \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Database \
            -framework FirebaseDatabase \
            -framework leveldb-library \
        \
    }

    HEADERS += $$PWD/src/qtfirebasedatabase.h
    SOURCES += $$PWD/src/qtfirebasedatabase.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}database.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}database
}

LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app


Fix build on ARMv6 when NEON is detected.

The compiler requires -mfpu=neon to enable NEON instructions.

# Qt gui library, paint module

HEADERS += \
        painting/qbezier_p.h \
        painting/qbrush.h \
        painting/qcolor.h \
        painting/qcolor_p.h \
        painting/qcolormap.h \
        painting/qdrawutil.h \
        painting/qemulationpaintengine_p.h \
        painting/qgraphicssystem_p.h \
        painting/qmatrix.h \
        painting/qmemrotate_p.h \
        painting/qoutlinemapper_p.h \
        painting/qpaintdevice.h \
        painting/qpaintengine.h \
		painting/qpaintengine_p.h \
        painting/qpaintengine_alpha_p.h \
        painting/qpaintengine_preview_p.h \
        painting/qpaintengineex_p.h \
        painting/qpainter.h \
        painting/qpainter_p.h \
        painting/qpainterpath.h \
        painting/qpainterpath_p.h \
        painting/qvectorpath_p.h \
        painting/qpathclipper_p.h \
        painting/qpdf_p.h \
        painting/qpen.h \
        painting/qpolygon.h \
        painting/qpolygonclipper_p.h \
        painting/qprintengine.h \
        painting/qprintengine_pdf_p.h \
        painting/qprintengine_ps_p.h \
        painting/qprinter.h \
        painting/qprinter_p.h \
        painting/qprinterinfo.h \
        painting/qrasterizer_p.h \
        painting/qregion.h \
        painting/qstroker_p.h \
        painting/qstylepainter.h \
        painting/qtessellator_p.h \
        painting/qtextureglyphcache_p.h \
        painting/qtransform.h \
        painting/qwindowsurface_p.h \
        painting/qwmatrix.h \
        painting/qpaintbuffer_p.h

SOURCES += \
        painting/qbezier.cpp \
        painting/qblendfunctions.cpp \
        painting/qbrush.cpp \
        painting/qcolor.cpp \
        painting/qcolor_p.cpp \
        painting/qcssutil.cpp \
        painting/qdrawutil.cpp \
        painting/qemulationpaintengine.cpp \
        painting/qgraphicssystem.cpp \
        painting/qmatrix.cpp \
        painting/qmemrotate.cpp \
        painting/qoutlinemapper.cpp \
        painting/qpaintdevice.cpp \
        painting/qpaintengine.cpp \
        painting/qpaintengine_alpha.cpp \
        painting/qpaintengine_preview.cpp \
        painting/qpaintengineex.cpp \
        painting/qpainter.cpp \
        painting/qpainterpath.cpp \
        painting/qpathclipper.cpp \
        painting/qpdf.cpp \
        painting/qpen.cpp \
        painting/qpolygon.cpp \
        painting/qprintengine_pdf.cpp \
        painting/qprintengine_ps.cpp \
        painting/qprinter.cpp \
        painting/qrasterizer.cpp \
        painting/qregion.cpp \
        painting/qstroker.cpp \
        painting/qstylepainter.cpp \
        painting/qtessellator.cpp \
        painting/qtextureglyphcache.cpp \
        painting/qtransform.cpp \
        painting/qwindowsurface.cpp \
        painting/qpaintbuffer.cpp

        SOURCES +=                                      \
                painting/qpaintengine_raster.cpp        \
                painting/qdrawhelper.cpp                \
                painting/qimagescale.cpp                \
                painting/qgrayraster.c

        HEADERS +=                                      \
                painting/qpaintengine_raster_p.h        \
                painting/qrasterdefs_p.h                \
                painting/qgrayraster_p.h

win32 {
        HEADERS += painting/qprintengine_win_p.h

        SOURCES += \
                painting/qcolormap_win.cpp \
                painting/qpaintdevice_win.cpp \
                painting/qprintengine_win.cpp \
                painting/qprinterinfo_win.cpp

        !win32-borland:!wince*:LIBS += -lmsimg32
}

embedded {
    HEADERS += \
        painting/qgraphicssystem_qws_p.h \

    SOURCES += \
        painting/qgraphicssystem_qws.cpp \

} else {
    HEADERS += \
        painting/qgraphicssystem_raster_p.h \
        painting/qgraphicssystemfactory_p.h \
        painting/qgraphicssystemplugin_p.h \
        painting/qwindowsurface_raster_p.h \

    SOURCES += \
        painting/qgraphicssystem_raster.cpp \
        painting/qgraphicssystemfactory.cpp \
        painting/qgraphicssystemplugin.cpp \
        painting/qwindowsurface_raster.cpp \
}

unix:x11 {
        HEADERS += \
                painting/qpaintengine_x11_p.h

        SOURCES += \
                painting/qcolormap_x11.cpp \
                painting/qpaintdevice_x11.cpp \
                painting/qpaintengine_x11.cpp
}

!embedded:!x11:mac {
        HEADERS += \
                painting/qpaintengine_mac_p.h \
                painting/qgraphicssystem_mac_p.h \
                painting/qprintengine_mac_p.h

        SOURCES += \
                painting/qcolormap_mac.cpp \
                painting/qpaintdevice_mac.cpp \
                painting/qpaintengine_mac.cpp \
                painting/qgraphicssystem_mac.cpp \
                painting/qprinterinfo_mac.cpp
        OBJECTIVE_SOURCES += \
                painting/qprintengine_mac.mm \
}

unix:!mac:!symbian {
        HEADERS += \
                painting/qprinterinfo_unix_p.h
        SOURCES += \
                painting/qprinterinfo_unix.cpp
}

win32|x11|mac|embedded|symbian {
        SOURCES += painting/qbackingstore.cpp
        HEADERS += painting/qbackingstore_p.h
}

embedded {
        contains(QT_CONFIG,qtopia) {
                DEFINES += QTOPIA_PRINTENGINE
                HEADERS += painting/qprintengine_qws_p.h
                SOURCES += painting/qprintengine_qws.cpp
        }

        SOURCES += \
                painting/qcolormap_qws.cpp \
                painting/qpaintdevice_qws.cpp
}

symbian {
        SOURCES += \
				painting/qpaintengine_s60.cpp \
                painting/qregion_s60.cpp \
                painting/qcolormap_s60.cpp

        HEADERS += \
                painting/qpaintengine_s60_p.h
}

x11|embedded {
        contains(QT_CONFIG,qtopia) {
            DEFINES += QT_NO_CUPS QT_NO_LPR
        } else {
            SOURCES += painting/qcups.cpp
            HEADERS += painting/qcups_p.h
        }
} else {
        DEFINES += QT_NO_CUPS QT_NO_LPR
}

contains(QMAKE_MAC_XARCH, no) {
    DEFINES += QT_NO_MAC_XARCH
} else:if(mmx|3dnow|sse|sse2|iwmmxt) {
    HEADERS += painting/qdrawhelper_x86_p.h \
               painting/qdrawhelper_mmx_p.h \
               painting/qdrawhelper_sse_p.h
    mmx {
        DEFINES += QT_HAVE_MMX
        MMX_SOURCES += painting/qdrawhelper_mmx.cpp
    }
    3dnow {
        DEFINES += QT_HAVE_3DNOW
        MMX3DNOW_SOURCES += painting/qdrawhelper_mmx3dnow.cpp
        sse {
            SSE3DNOW_SOURCES += painting/qdrawhelper_sse3dnow.cpp
        }
    }
    sse {
        DEFINES += QT_HAVE_SSE
        SSE_SOURCES += painting/qdrawhelper_sse.cpp

        DEFINES += QT_HAVE_MMXEXT
    }
    sse2 {
        DEFINES += QT_HAVE_SSE2
        SSE2_SOURCES += painting/qdrawhelper_sse2.cpp
    }
    iwmmxt {
        DEFINES += QT_HAVE_IWMMXT
        IWMMXT_SOURCES += painting/qdrawhelper_iwmmxt.cpp
    }

    win32-g++|!win32:!*-icc* {
        mmx {
            mmx_compiler.commands = $$QMAKE_CXX -c -Winline

            mac {
                mmx_compiler.commands += -Xarch_i386 -mmmx
                mmx_compiler.commands += -Xarch_x86_64 -mmmx
            } else {
                mmx_compiler.commands += -mmmx
            }

            mmx_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            mmx_compiler.dependency_type = TYPE_C
            mmx_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            mmx_compiler.input = MMX_SOURCES
            mmx_compiler.variable_out = OBJECTS
            mmx_compiler.name = compiling[mmx] ${QMAKE_FILE_IN}
            silent:mmx_compiler.commands = @echo compiling[mmx] ${QMAKE_FILE_IN} && $$mmx_compiler.commands
            QMAKE_EXTRA_COMPILERS += mmx_compiler
        }
        3dnow {
            mmx3dnow_compiler.commands = $$QMAKE_CXX -c -Winline

            mac {
                mmx3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -mmmx
                mmx3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -mmmx
            } else {
                mmx3dnow_compiler.commands += -m3dnow -mmmx
            }

            mmx3dnow_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            mmx3dnow_compiler.dependency_type = TYPE_C
            mmx3dnow_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            mmx3dnow_compiler.input = MMX3DNOW_SOURCES
            mmx3dnow_compiler.variable_out = OBJECTS
            mmx3dnow_compiler.name = compiling[mmx3dnow] ${QMAKE_FILE_IN}
            silent:mmx3dnow_compiler.commands = @echo compiling[mmx3dnow] ${QMAKE_FILE_IN} && $$mmx3dnow_compiler.commands
            QMAKE_EXTRA_COMPILERS += mmx3dnow_compiler
            sse {
                sse3dnow_compiler.commands = $$QMAKE_CXX -c -Winline

                mac {
                    sse3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -msse
                    sse3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -msse
                } else {
                    sse3dnow_compiler.commands += -m3dnow -msse
                }

                sse3dnow_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
                sse3dnow_compiler.dependency_type = TYPE_C
                sse3dnow_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
                sse3dnow_compiler.input = SSE3DNOW_SOURCES
                sse3dnow_compiler.variable_out = OBJECTS
                sse3dnow_compiler.name = compiling[sse3dnow] ${QMAKE_FILE_IN}
                silent:sse3dnow_compiler.commands = @echo compiling[sse3dnow] ${QMAKE_FILE_IN} && $$sse3dnow_compiler.commands
                QMAKE_EXTRA_COMPILERS += sse3dnow_compiler
            }
        }
        sse {
            sse_compiler.commands = $$QMAKE_CXX -c -Winline

            mac {
                sse_compiler.commands += -Xarch_i386 -msse
                sse_compiler.commands += -Xarch_x86_64 -msse
            } else {
                sse_compiler.commands += -msse
            }

            sse_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            sse_compiler.dependency_type = TYPE_C
            sse_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            sse_compiler.input = SSE_SOURCES
            sse_compiler.variable_out = OBJECTS
            sse_compiler.name = compiling[sse] ${QMAKE_FILE_IN}
            silent:sse_compiler.commands = @echo compiling[sse] ${QMAKE_FILE_IN} && $$sse_compiler.commands
            QMAKE_EXTRA_COMPILERS += sse_compiler
        }
        sse2 {
            sse2_compiler.commands = $$QMAKE_CXX -c -Winline

            mac {
                sse2_compiler.commands += -Xarch_i386 -msse2
                sse2_compiler.commands += -Xarch_x86_64 -msse2
            } else {
                sse2_compiler.commands += -msse2
            }

            sse2_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            sse2_compiler.dependency_type = TYPE_C
            sse2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            sse2_compiler.input = SSE2_SOURCES
            sse2_compiler.variable_out = OBJECTS
            sse2_compiler.name = compiling[sse2] ${QMAKE_FILE_IN}
            silent:sse2_compiler.commands = @echo compiling[sse2] ${QMAKE_FILE_IN} && $$sse2_compiler.commands
            QMAKE_EXTRA_COMPILERS += sse2_compiler
        }
        iwmmxt {
            iwmmxt_compiler.commands = $$QMAKE_CXX -c -Winline
            iwmmxt_compiler.commands += -mcpu=iwmmxt
            iwmmxt_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            iwmmxt_compiler.dependency_type = TYPE_C
            iwmmxt_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            iwmmxt_compiler.input = IWMMXT_SOURCES
            iwmmxt_compiler.variable_out = OBJECTS
            iwmmxt_compiler.name = compiling[iwmmxt] ${QMAKE_FILE_IN}
            silent:iwmmxt_compiler.commands = @echo compiling[iwmmxt] ${QMAKE_FILE_IN} && $$iwmmxt_compiler.commands
            QMAKE_EXTRA_COMPILERS += iwmmxt_compiler
        }
    } else {
        mmx: SOURCES += $$MMX_SOURCES
        3dnow: SOURCES += $$MMX3DNOW_SOURCES
        3dnow:sse: SOURCES += $$SSE3DNOW_SOURCES
        sse: SOURCES += $$SSE_SOURCES
        sse2: SOURCES += $$SSE2_SOURCES
        iwmmxt: SOURCES += $$IWMMXT_SOURCES
    }
}

x11 {
        HEADERS += painting/qwindowsurface_x11_p.h
        SOURCES += painting/qwindowsurface_x11.cpp
}

mac {
        HEADERS += painting/qwindowsurface_mac_p.h
        SOURCES += painting/qwindowsurface_mac.cpp
}

embedded {
        HEADERS += painting/qwindowsurface_qws_p.h
        SOURCES += painting/qwindowsurface_qws.cpp
}

symbian {
        HEADERS += painting/qwindowsurface_s60_p.h
        SOURCES += painting/qwindowsurface_s60.cpp
        armccIfdefBlock = \
        "$${LITERAL_HASH}if defined(ARMV6)" \
        "SOURCEPATH 	painting" \
        "SOURCE			qblendfunctions_armv6_rvct.s" \
        "SOURCE			qdrawhelper_armv6_rvct.s" \
        "$${LITERAL_HASH}endif"

        MMP_RULES += armccIfdefBlock
        QMAKE_CXXFLAGS.ARMCC *= -O3
}

neon {
    DEFINES += QT_HAVE_NEON
    HEADERS += painting/qdrawhelper_neon_p.h
    SOURCES += painting/qdrawhelper_neon.cpp
    QMAKE_CXXFLAGS *= -mfpu=neon
}

contains(QT_CONFIG, zlib) {
   INCLUDEPATH += ../3rdparty/zlib
} else:!contains(QT_CONFIG, no-zlib) {
   unix:LIBS_PRIVATE += -lz
#  win32:LIBS += libz.lib
}

# Qt gui library, paint module

HEADERS += \
        painting/qbezier_p.h \
        painting/qbrush.h \
        painting/qcolor.h \
        painting/qcolor_p.h \
        painting/qcolormap.h \
        painting/qdrawutil.h \
        painting/qemulationpaintengine_p.h \
        painting/qgraphicssystem_p.h \
        painting/qmatrix.h \
        painting/qmemrotate_p.h \
        painting/qoutlinemapper_p.h \
        painting/qpaintdevice.h \
        painting/qpaintengine.h \
		painting/qpaintengine_p.h \
        painting/qpaintengine_alpha_p.h \
        painting/qpaintengine_preview_p.h \
        painting/qpaintengineex_p.h \
        painting/qpainter.h \
        painting/qpainter_p.h \
        painting/qpainterpath.h \
        painting/qpainterpath_p.h \
        painting/qvectorpath_p.h \
        painting/qpathclipper_p.h \
        painting/qpdf_p.h \
        painting/qpen.h \
        painting/qpolygon.h \
        painting/qpolygonclipper_p.h \
        painting/qprintengine.h \
        painting/qprintengine_pdf_p.h \
        painting/qprintengine_ps_p.h \
        painting/qprinter.h \
        painting/qprinter_p.h \
        painting/qprinterinfo.h \
        painting/qrasterizer_p.h \
        painting/qregion.h \
        painting/qstroker_p.h \
        painting/qstylepainter.h \
        painting/qtessellator_p.h \
        painting/qtextureglyphcache_p.h \
        painting/qtransform.h \
        painting/qwindowsurface_p.h \
        painting/qwmatrix.h \
        painting/qpaintbuffer_p.h

SOURCES += \
        painting/qbezier.cpp \
        painting/qblendfunctions.cpp \
        painting/qbrush.cpp \
        painting/qcolor.cpp \
        painting/qcolor_p.cpp \
        painting/qcssutil.cpp \
        painting/qdrawutil.cpp \
        painting/qemulationpaintengine.cpp \
        painting/qgraphicssystem.cpp \
        painting/qmatrix.cpp \
        painting/qmemrotate.cpp \
        painting/qoutlinemapper.cpp \
        painting/qpaintdevice.cpp \
        painting/qpaintengine.cpp \
        painting/qpaintengine_alpha.cpp \
        painting/qpaintengine_preview.cpp \
        painting/qpaintengineex.cpp \
        painting/qpainter.cpp \
        painting/qpainterpath.cpp \
        painting/qpathclipper.cpp \
        painting/qpdf.cpp \
        painting/qpen.cpp \
        painting/qpolygon.cpp \
        painting/qprintengine_pdf.cpp \
        painting/qprintengine_ps.cpp \
        painting/qprinter.cpp \
        painting/qrasterizer.cpp \
        painting/qregion.cpp \
        painting/qstroker.cpp \
        painting/qstylepainter.cpp \
        painting/qtessellator.cpp \
        painting/qtextureglyphcache.cpp \
        painting/qtransform.cpp \
        painting/qwindowsurface.cpp \
        painting/qpaintbuffer.cpp

        SOURCES +=                                      \
                painting/qpaintengine_raster.cpp        \
                painting/qdrawhelper.cpp                \
                painting/qimagescale.cpp                \
                painting/qgrayraster.c

        HEADERS +=                                      \
                painting/qpaintengine_raster_p.h        \
                painting/qrasterdefs_p.h                \
                painting/qgrayraster_p.h

win32 {
        HEADERS += painting/qprintengine_win_p.h

        SOURCES += \
                painting/qcolormap_win.cpp \
                painting/qpaintdevice_win.cpp \
                painting/qprintengine_win.cpp \
                painting/qprinterinfo_win.cpp

        !win32-borland:!wince*:LIBS += -lmsimg32
}

embedded {
    HEADERS += \
        painting/qgraphicssystem_qws_p.h \

    SOURCES += \
        painting/qgraphicssystem_qws.cpp \

} else {
    HEADERS += \
        painting/qgraphicssystem_raster_p.h \
        painting/qgraphicssystemfactory_p.h \
        painting/qgraphicssystemplugin_p.h \
        painting/qwindowsurface_raster_p.h \

    SOURCES += \
        painting/qgraphicssystem_raster.cpp \
        painting/qgraphicssystemfactory.cpp \
        painting/qgraphicssystemplugin.cpp \
        painting/qwindowsurface_raster.cpp \
}

unix:x11 {
        HEADERS += \
                painting/qpaintengine_x11_p.h

        SOURCES += \
                painting/qcolormap_x11.cpp \
                painting/qpaintdevice_x11.cpp \
                painting/qpaintengine_x11.cpp
}

!embedded:!x11:mac {
        HEADERS += \
                painting/qpaintengine_mac_p.h \
                painting/qgraphicssystem_mac_p.h \
                painting/qprintengine_mac_p.h

        SOURCES += \
                painting/qcolormap_mac.cpp \
                painting/qpaintdevice_mac.cpp \
                painting/qpaintengine_mac.cpp \
                painting/qgraphicssystem_mac.cpp \
                painting/qprinterinfo_mac.cpp
        OBJECTIVE_SOURCES += \
                painting/qprintengine_mac.mm \
}

unix:!mac:!symbian {
        HEADERS += \
                painting/qprinterinfo_unix_p.h
        SOURCES += \
                painting/qprinterinfo_unix.cpp
}

win32|x11|mac|embedded|symbian {
        SOURCES += painting/qbackingstore.cpp
        HEADERS += painting/qbackingstore_p.h
}

embedded {
        contains(QT_CONFIG,qtopia) {
                DEFINES += QTOPIA_PRINTENGINE
                HEADERS += painting/qprintengine_qws_p.h
                SOURCES += painting/qprintengine_qws.cpp
        }

        SOURCES += \
                painting/qcolormap_qws.cpp \
                painting/qpaintdevice_qws.cpp
}

symbian {
        SOURCES += \
				painting/qpaintengine_s60.cpp \
                painting/qregion_s60.cpp \
                painting/qcolormap_s60.cpp

        HEADERS += \
                painting/qpaintengine_s60_p.h
}

x11|embedded {
        contains(QT_CONFIG,qtopia) {
            DEFINES += QT_NO_CUPS QT_NO_LPR
        } else {
            SOURCES += painting/qcups.cpp
            HEADERS += painting/qcups_p.h
        }
} else {
        DEFINES += QT_NO_CUPS QT_NO_LPR
}

contains(QMAKE_MAC_XARCH, no) {
    DEFINES += QT_NO_MAC_XARCH
} else:if(mmx|3dnow|sse|sse2|iwmmxt) {
    HEADERS += painting/qdrawhelper_x86_p.h \
               painting/qdrawhelper_mmx_p.h \
               painting/qdrawhelper_sse_p.h
    mmx {
        DEFINES += QT_HAVE_MMX
        MMX_SOURCES += painting/qdrawhelper_mmx.cpp
    }
    3dnow {
        DEFINES += QT_HAVE_3DNOW
        MMX3DNOW_SOURCES += painting/qdrawhelper_mmx3dnow.cpp
        sse {
            SSE3DNOW_SOURCES += painting/qdrawhelper_sse3dnow.cpp
        }
    }
    sse {
        DEFINES += QT_HAVE_SSE
        SSE_SOURCES += painting/qdrawhelper_sse.cpp

        DEFINES += QT_HAVE_MMXEXT
    }
    sse2 {
        DEFINES += QT_HAVE_SSE2
        SSE2_SOURCES += painting/qdrawhelper_sse2.cpp
    }
    iwmmxt {
        DEFINES += QT_HAVE_IWMMXT
        IWMMXT_SOURCES += painting/qdrawhelper_iwmmxt.cpp
    }

    win32-g++|!win32:!*-icc* {
        mmx {
            mmx_compiler.commands = $$QMAKE_CXX -c -Winline

            mac {
                mmx_compiler.commands += -Xarch_i386 -mmmx
                mmx_compiler.commands += -Xarch_x86_64 -mmmx
            } else {
                mmx_compiler.commands += -mmmx
            }

            mmx_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            mmx_compiler.dependency_type = TYPE_C
            mmx_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            mmx_compiler.input = MMX_SOURCES
            mmx_compiler.variable_out = OBJECTS
            mmx_compiler.name = compiling[mmx] ${QMAKE_FILE_IN}
            silent:mmx_compiler.commands = @echo compiling[mmx] ${QMAKE_FILE_IN} && $$mmx_compiler.commands
            QMAKE_EXTRA_COMPILERS += mmx_compiler
        }
        3dnow {
            mmx3dnow_compiler.commands = $$QMAKE_CXX -c -Winline

            mac {
                mmx3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -mmmx
                mmx3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -mmmx
            } else {
                mmx3dnow_compiler.commands += -m3dnow -mmmx
            }

            mmx3dnow_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            mmx3dnow_compiler.dependency_type = TYPE_C
            mmx3dnow_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            mmx3dnow_compiler.input = MMX3DNOW_SOURCES
            mmx3dnow_compiler.variable_out = OBJECTS
            mmx3dnow_compiler.name = compiling[mmx3dnow] ${QMAKE_FILE_IN}
            silent:mmx3dnow_compiler.commands = @echo compiling[mmx3dnow] ${QMAKE_FILE_IN} && $$mmx3dnow_compiler.commands
            QMAKE_EXTRA_COMPILERS += mmx3dnow_compiler
            sse {
                sse3dnow_compiler.commands = $$QMAKE_CXX -c -Winline

                mac {
                    sse3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -msse
                    sse3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -msse
                } else {
                    sse3dnow_compiler.commands += -m3dnow -msse
                }

                sse3dnow_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
                sse3dnow_compiler.dependency_type = TYPE_C
                sse3dnow_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
                sse3dnow_compiler.input = SSE3DNOW_SOURCES
                sse3dnow_compiler.variable_out = OBJECTS
                sse3dnow_compiler.name = compiling[sse3dnow] ${QMAKE_FILE_IN}
                silent:sse3dnow_compiler.commands = @echo compiling[sse3dnow] ${QMAKE_FILE_IN} && $$sse3dnow_compiler.commands
                QMAKE_EXTRA_COMPILERS += sse3dnow_compiler
            }
        }
        sse {
            sse_compiler.commands = $$QMAKE_CXX -c -Winline

            mac {
                sse_compiler.commands += -Xarch_i386 -msse
                sse_compiler.commands += -Xarch_x86_64 -msse
            } else {
                sse_compiler.commands += -msse
            }

            sse_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            sse_compiler.dependency_type = TYPE_C
            sse_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            sse_compiler.input = SSE_SOURCES
            sse_compiler.variable_out = OBJECTS
            sse_compiler.name = compiling[sse] ${QMAKE_FILE_IN}
            silent:sse_compiler.commands = @echo compiling[sse] ${QMAKE_FILE_IN} && $$sse_compiler.commands
            QMAKE_EXTRA_COMPILERS += sse_compiler
        }
        sse2 {
            sse2_compiler.commands = $$QMAKE_CXX -c -Winline

            mac {
                sse2_compiler.commands += -Xarch_i386 -msse2
                sse2_compiler.commands += -Xarch_x86_64 -msse2
            } else {
                sse2_compiler.commands += -msse2
            }

            sse2_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            sse2_compiler.dependency_type = TYPE_C
            sse2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            sse2_compiler.input = SSE2_SOURCES
            sse2_compiler.variable_out = OBJECTS
            sse2_compiler.name = compiling[sse2] ${QMAKE_FILE_IN}
            silent:sse2_compiler.commands = @echo compiling[sse2] ${QMAKE_FILE_IN} && $$sse2_compiler.commands
            QMAKE_EXTRA_COMPILERS += sse2_compiler
        }
        iwmmxt {
            iwmmxt_compiler.commands = $$QMAKE_CXX -c -Winline
            iwmmxt_compiler.commands += -mcpu=iwmmxt
            iwmmxt_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
            iwmmxt_compiler.dependency_type = TYPE_C
            iwmmxt_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
            iwmmxt_compiler.input = IWMMXT_SOURCES
            iwmmxt_compiler.variable_out = OBJECTS
            iwmmxt_compiler.name = compiling[iwmmxt] ${QMAKE_FILE_IN}
            silent:iwmmxt_compiler.commands = @echo compiling[iwmmxt] ${QMAKE_FILE_IN} && $$iwmmxt_compiler.commands
            QMAKE_EXTRA_COMPILERS += iwmmxt_compiler
        }
    } else {
        mmx: SOURCES += $$MMX_SOURCES
        3dnow: SOURCES += $$MMX3DNOW_SOURCES
        3dnow:sse: SOURCES += $$SSE3DNOW_SOURCES
        sse: SOURCES += $$SSE_SOURCES
        sse2: SOURCES += $$SSE2_SOURCES
        iwmmxt: SOURCES += $$IWMMXT_SOURCES
    }
}

x11 {
        HEADERS += painting/qwindowsurface_x11_p.h
        SOURCES += painting/qwindowsurface_x11.cpp
}

mac {
        HEADERS += painting/qwindowsurface_mac_p.h
        SOURCES += painting/qwindowsurface_mac.cpp
}

embedded {
        HEADERS += painting/qwindowsurface_qws_p.h
        SOURCES += painting/qwindowsurface_qws.cpp
}

symbian {
        HEADERS += painting/qwindowsurface_s60_p.h
        SOURCES += painting/qwindowsurface_s60.cpp
        armccIfdefBlock = \
        "$${LITERAL_HASH}if defined(ARMV6)" \
        "SOURCEPATH 	painting" \
        "SOURCE			qblendfunctions_armv6_rvct.s" \
        "SOURCE			qdrawhelper_armv6_rvct.s" \
        "$${LITERAL_HASH}endif"

        MMP_RULES += armccIfdefBlock
        QMAKE_CXXFLAGS.ARMCC *= -O3
}

neon {
    DEFINES += QT_HAVE_NEON
    HEADERS += painting/qdrawhelper_neon_p.h
    SOURCES += painting/qdrawhelper_neon.cpp
    QMAKE.CXXFLAGS *= -mfpu=neon
}

contains(QT_CONFIG, zlib) {
   INCLUDEPATH += ../3rdparty/zlib
} else:!contains(QT_CONFIG, no-zlib) {
   unix:LIBS_PRIVATE += -lz
#  win32:LIBS += libz.lib
}


Removed lib prefix of PRE_TARGETDEPS for win32-g++ build #13

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

include($$PWD/win32.pri)

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

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

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

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

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

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

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

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

include($$PWD/win32.pri)

QMAKE_PROJECT_DEPTH = 0 # Forces absolute paths

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

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

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

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

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

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


Prospective Mac build fix

Prospective Mac build fix

Define ahead of time which "feature" set we want, i.e. no LLINT/DFG/JIT
code but only ENABLE(ASSEMBLER). Otherwise Platform.h will make a choice
for us depending on the platform.

Change-Id: I372dc690ecbc624e9d589f6f10078a7647fcb570
Reviewed-by: Erik Verbruggen <5edfe905d082749f2ac3f4e6b42937f39f083771@digia.com>

HEADERS += $$PWD/assembler/*.h
SOURCES += $$PWD/assembler/ARMAssembler.cpp
SOURCES += $$PWD/assembler/ARMv7Assembler.cpp
SOURCES += $$PWD/assembler/MacroAssemblerARM.cpp
SOURCES += $$PWD/assembler/MacroAssemblerSH4.cpp
SOURCES += $$PWD/assembler/LinkBuffer.cpp

SOURCES += $$PWD/stubs/WTFStubs.cpp
HEADERS += $$PWD/stubs/WTFStubs.h

DEFINES += WTF_EXPORT_PRIVATE=""

DEFINES += ENABLE_LLINT=0
DEFINES += ENABLE_DFG_JIT=0
DEFINES += ENABLE_JIT=0
DEFINES += ENABLE_ASSEMBLER=1

INCLUDEPATH += $$PWD/jit
INCLUDEPATH += $$PWD/assembler
INCLUDEPATH += $$PWD/wtf
INCLUDEPATH += $$PWD/stubs
INCLUDEPATH += $$PWD

DEFINES += WTF_USE_UDIS86=1
INCLUDEPATH += $$PWD/disassembler
INCLUDEPATH += $$PWD/disassembler/udis86
SOURCES += $$PWD/disassembler/UDis86Disassembler.cpp
SOURCES += $$PWD/disassembler/udis86/udis86.c
SOURCES += $$PWD/disassembler/udis86/udis86_decode.c
SOURCES += $$PWD/disassembler/udis86/udis86_input.c
SOURCES += $$PWD/disassembler/udis86/udis86_itab_holder.c
SOURCES += $$PWD/disassembler/udis86/udis86_syn-att.c
SOURCES += $$PWD/disassembler/udis86/udis86_syn.c
SOURCES += $$PWD/disassembler/udis86/udis86_syn-intel.c

ITAB = $$PWD/disassembler/udis86/optable.xml
udis86.output = udis86_itab.h
udis86.input = ITAB
udis86.commands = python $$PWD/disassembler/udis86/itab.py ${QMAKE_FILE_IN}
QMAKE_EXTRA_COMPILERS += udis86

HEADERS += $$PWD/assembler/*.h
SOURCES += $$PWD/assembler/ARMAssembler.cpp
SOURCES += $$PWD/assembler/ARMv7Assembler.cpp
SOURCES += $$PWD/assembler/MacroAssemblerARM.cpp
SOURCES += $$PWD/assembler/MacroAssemblerSH4.cpp
SOURCES += $$PWD/assembler/LinkBuffer.cpp

SOURCES += $$PWD/stubs/WTFStubs.cpp
HEADERS += $$PWD/stubs/WTFStubs.h

DEFINES += WTF_EXPORT_PRIVATE=""

INCLUDEPATH += $$PWD/jit
INCLUDEPATH += $$PWD/assembler
INCLUDEPATH += $$PWD/wtf
INCLUDEPATH += $$PWD/stubs
INCLUDEPATH += $$PWD

DEFINES += WTF_USE_UDIS86=1
INCLUDEPATH += $$PWD/disassembler
INCLUDEPATH += $$PWD/disassembler/udis86
SOURCES += $$PWD/disassembler/UDis86Disassembler.cpp
SOURCES += $$PWD/disassembler/udis86/udis86.c
SOURCES += $$PWD/disassembler/udis86/udis86_decode.c
SOURCES += $$PWD/disassembler/udis86/udis86_input.c
SOURCES += $$PWD/disassembler/udis86/udis86_itab_holder.c
SOURCES += $$PWD/disassembler/udis86/udis86_syn-att.c
SOURCES += $$PWD/disassembler/udis86/udis86_syn.c
SOURCES += $$PWD/disassembler/udis86/udis86_syn-intel.c

ITAB = $$PWD/disassembler/udis86/optable.xml
udis86.output = udis86_itab.h
udis86.input = ITAB
udis86.commands = python $$PWD/disassembler/udis86/itab.py ${QMAKE_FILE_IN}
QMAKE_EXTRA_COMPILERS += udis86


use rpath under unix to run tests with make check

TEMPLATE = app
QT += testlib
CONFIG += testcase
LIBS += -L$$OUT_PWD/../../../modules/Qnite/ -lqnite
DESTDIR = ../bin
QMAKE_RPATHDIR += $$OUT_PWD/../bin/


Disable GUI for benchmarks

Disable GUI for benchmarks


New version 0.1.4

New version 0.1.4

Signed-off-by: Shane Bryan <bb9fedbb0bee6c6c53f32da7fce5f936ef59aaaa@linux.intel.com>


Android: Fix compilation when doing ARM builds

Clean up the code to determine when to _disable_ the JIT and add
Android to that list when targeting ARMv5 (dubbed armeabi as opposed
to armeabi-v7a)

Task-number: QTBUG-33507

Change-Id: Id78e08e888df8f8075d5655e15bb754cede70638
Reviewed-by: Eskil Abrahamsen Blomfeldt <e4034124b095075783ce739a2d1c68c0d66fa1fd@digia.com>

wince*: CONFIG += disable_jit
ios: CONFIG += disable_jit
if(win*:isEqual(QT_ARCH, "x86_64")): CONFIG += disable_jit
equals(ANDROID_TARGET_ARCH, armeabi): CONFIG += disable_jit

disable_jit: DEFINES += ENABLE_YARR_JIT=0
else: DEFINES += V4_ENABLE_JIT ENABLE_YARR_JIT=1

# On Qt/Android/ARM release builds are thumb and debug builds arm,
# but we'll force the JIT to always generate thumb2
contains(DEFINES, V4_ENABLE_JIT):android:isEqual(QT_ARCH, "arm") {
    DEFINES += WTF_CPU_ARM_THUMB2
}

DEFINES += WTF_EXPORT_PRIVATE="" JS_EXPORT_PRIVATE=""

win*: DEFINES += NOMINMAX

DEFINES += ENABLE_LLINT=0
DEFINES += ENABLE_DFG_JIT=0
DEFINES += ENABLE_JIT_CONSTANT_BLINDING=0
DEFINES += ENABLE_ASSEMBLER=1
DEFINES += BUILDING_QT__

DEFINES += ENABLE_JIT=1

INCLUDEPATH += $$PWD/jit
INCLUDEPATH += $$PWD/assembler
INCLUDEPATH += $$PWD/runtime
INCLUDEPATH += $$PWD/wtf
INCLUDEPATH += $$PWD/stubs
INCLUDEPATH += $$PWD/stubs/wtf
INCLUDEPATH += $$PWD

disassembler:if(isEqual(QT_ARCH, "i386")|isEqual(QT_ARCH, "x86_64")):!win*: DEFINES += WTF_USE_UDIS86=1
else: DEFINES += WTF_USE_UDIS86=0

INCLUDEPATH += $$PWD/disassembler
INCLUDEPATH += $$PWD/disassembler/udis86
INCLUDEPATH += $$_OUT_PWD

win32-msvc2008|wince*: INCLUDEPATH += $$PWD/stubs/compat

!wince*:!ios:!if(win*:isEqual(QT_ARCH, "x86_64")): DEFINES += V4_ENABLE_JIT ENABLE_YARR_JIT=1
else: DEFINES += ENABLE_YARR_JIT=0

# On Qt/Android/ARM release builds are thumb and debug builds arm,
# but we'll force the JIT to always generate thumb2
android:isEqual(QT_ARCH, "arm") {
    DEFINES += WTF_CPU_ARM_THUMB2
}

DEFINES += WTF_EXPORT_PRIVATE="" JS_EXPORT_PRIVATE=""

win*: DEFINES += NOMINMAX

DEFINES += ENABLE_LLINT=0
DEFINES += ENABLE_DFG_JIT=0
DEFINES += ENABLE_JIT_CONSTANT_BLINDING=0
DEFINES += ENABLE_ASSEMBLER=1
DEFINES += BUILDING_QT__

DEFINES += ENABLE_JIT=1

INCLUDEPATH += $$PWD/jit
INCLUDEPATH += $$PWD/assembler
INCLUDEPATH += $$PWD/runtime
INCLUDEPATH += $$PWD/wtf
INCLUDEPATH += $$PWD/stubs
INCLUDEPATH += $$PWD/stubs/wtf
INCLUDEPATH += $$PWD

disassembler:if(isEqual(QT_ARCH, "i386")|isEqual(QT_ARCH, "x86_64")):!win*: DEFINES += WTF_USE_UDIS86=1
else: DEFINES += WTF_USE_UDIS86=0

INCLUDEPATH += $$PWD/disassembler
INCLUDEPATH += $$PWD/disassembler/udis86
INCLUDEPATH += $$_OUT_PWD

win32-msvc2008|wince*: INCLUDEPATH += $$PWD/stubs/compat


Bump version

Bump version


Add missing file in pri

Add missing file in pri

Reviewed-by:TrustMe

# Qt kernel module

# Only used on platforms with CONFIG += precompile_header
PRECOMPILED_HEADER = kernel/qt_gui_pch.h

KERNEL_P= kernel
HEADERS += \
	kernel/qaction.h \
        kernel/qaction_p.h \
	kernel/qactiongroup.h \
	kernel/qapplication.h \
	kernel/qapplication_p.h \
	kernel/qboxlayout.h \
	kernel/qclipboard.h \
	kernel/qcursor.h \
	kernel/qdesktopwidget.h \
	kernel/qdrag.h \
	kernel/qdnd_p.h \
	kernel/qevent.h \
	kernel/qevent_p.h \
	kernel/qformlayout.h \
	kernel/qgridlayout.h \
	kernel/qkeysequence.h \
	kernel/qlayout.h \
	kernel/qlayout_p.h \
	kernel/qlayoutengine_p.h \
	kernel/qlayoutitem.h \
	kernel/qmime.h \
	kernel/qsessionmanager.h \
	kernel/qshortcut.h \
	kernel/qshortcutmap_p.h \
	kernel/qsizepolicy.h \
	kernel/qpalette.h \
	kernel/qsound.h \
	kernel/qsound_p.h \
	kernel/qstackedlayout.h \
	kernel/qtooltip.h \
	kernel/qwhatsthis.h \
        kernel/qwidget.h \
        kernel/qwidget_p.h \
	kernel/qwidgetaction.h \
	kernel/qwidgetaction_p.h \
	kernel/qwindowdefs.h \
	kernel/qkeymapper_p.h \
	kernel/qgesture.h \
	kernel/qgesture_p.h \
	kernel/qstandardgestures.h \
	kernel/qstandardgestures_p.h

SOURCES += \
	kernel/qaction.cpp \
	kernel/qactiongroup.cpp \
	kernel/qapplication.cpp \
	kernel/qboxlayout.cpp \
	kernel/qclipboard.cpp \
	kernel/qcursor.cpp \
	kernel/qdrag.cpp \
	kernel/qdnd.cpp \
	kernel/qevent.cpp \
	kernel/qformlayout.cpp \
	kernel/qgridlayout.cpp \
	kernel/qkeysequence.cpp \
	kernel/qlayout.cpp \
	kernel/qlayoutengine.cpp \
	kernel/qlayoutitem.cpp \
	kernel/qmime.cpp \
	kernel/qpalette.cpp \
	kernel/qshortcut.cpp \
	kernel/qshortcutmap.cpp \
	kernel/qsound.cpp \
	kernel/qstackedlayout.cpp \
	kernel/qtooltip.cpp \
	kernel/qguivariant.cpp \
	kernel/qwhatsthis.cpp \
	kernel/qwidget.cpp \
	kernel/qwidgetaction.cpp \
	kernel/qkeymapper.cpp \
	kernel/qgesture.cpp \
	kernel/qstandardgestures.cpp

win32 {
	DEFINES += QT_NO_DIRECTDRAW

	SOURCES += \
		kernel/qapplication_win.cpp \
		kernel/qclipboard_win.cpp \
		kernel/qcursor_win.cpp \
		kernel/qdesktopwidget_win.cpp \
		kernel/qdnd_win.cpp \
		kernel/qmime_win.cpp \
		kernel/qsound_win.cpp \
		kernel/qwidget_win.cpp \
		kernel/qole_win.cpp \
		kernel/qkeymapper_win.cpp

        !contains(DEFINES, QT_NO_DIRECTDRAW):LIBS += ddraw.lib
}

symbian {
        SOURCES += \
                kernel/qapplication_s60.cpp \
                kernel/qeventdispatcher_s60.cpp \
                kernel/qwidget_s60.cpp \
                kernel/qcursor_s60.cpp \
                kernel/qdesktopwidget_s60.cpp \
                kernel/qkeymapper_s60.cpp\
                kernel/qclipboard_s60.cpp\
                kernel/qdnd_s60.cpp \
                kernel/qsound_s60.cpp

        HEADERS += \
                kernel/qt_s60_p.h \
                kernel/qeventdispatcher_s60_p.h
        LIBS += -lbafl -lestor

        INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
}

unix:x11 {
	INCLUDEPATH += ../3rdparty/xorg
	HEADERS += \
		kernel/qx11embed_x11.h \
		kernel/qx11info_x11.h \
        kernel/qkde_p.h

	SOURCES += \
		kernel/qapplication_x11.cpp \
		kernel/qclipboard_x11.cpp \
		kernel/qcursor_x11.cpp \
		kernel/qdnd_x11.cpp \
		kernel/qdesktopwidget_x11.cpp \
		kernel/qmotifdnd_x11.cpp \
		kernel/qsound_x11.cpp \
		kernel/qwidget_x11.cpp \
		kernel/qwidgetcreate_x11.cpp \
		kernel/qx11embed_x11.cpp \
		kernel/qx11info_x11.cpp \
		kernel/qkeymapper_x11.cpp \
		kernel/qkde.cpp

        contains(QT_CONFIG, glib) {
            SOURCES += \
		kernel/qguieventdispatcher_glib.cpp
            HEADERS += \
                kernel/qguieventdispatcher_glib_p.h
            QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
	    LIBS_PRIVATE +=$$QT_LIBS_GLIB
	}
            SOURCES += \
		kernel/qeventdispatcher_x11.cpp
            HEADERS += \
                kernel/qeventdispatcher_x11_p.h
}

embedded {
	HEADERS += \
		kernel/qeventdispatcher_qws_p.h

	SOURCES += \
		kernel/qapplication_qws.cpp \
		kernel/qclipboard_qws.cpp \
		kernel/qcursor_qws.cpp \
		kernel/qdesktopwidget_qws.cpp \
		kernel/qdnd_qws.cpp \
		kernel/qeventdispatcher_qws.cpp \
		kernel/qsound_qws.cpp \
		kernel/qwidget_qws.cpp \
		kernel/qkeymapper_qws.cpp \
		kernel/qsessionmanager_qws.cpp

        contains(QT_CONFIG, glib) {
            SOURCES += \
		kernel/qeventdispatcher_glib_qws.cpp
            HEADERS += \
                kernel/qeventdispatcher_glib_qws_p.h
            QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
	}

}

!embedded:!x11:mac {
	SOURCES += \
		kernel/qclipboard_mac.cpp \
		kernel/qmime_mac.cpp \
		kernel/qt_mac.cpp \
		kernel/qkeymapper_mac.cpp

        OBJECTIVE_HEADERS += \
                qcocoawindow_mac_p.h \
                qcocoawindowdelegate_mac_p.h \
                qcocoaview_mac_p.h \
                qcocoaapplication_mac_p.h \
                qcocoaapplicationdelegate_mac_p.h \
                qmultitouch_mac_p.h

        OBJECTIVE_SOURCES += \
                kernel/qcursor_mac.mm \
                kernel/qdnd_mac.mm \
                kernel/qsound_mac.mm  \
                kernel/qapplication_mac.mm \
		        kernel/qwidget_mac.mm \
		        kernel/qcocoapanel_mac.mm \
                kernel/qcocoaview_mac.mm \
                kernel/qcocoawindow_mac.mm \
                kernel/qcocoawindowdelegate_mac.mm \
                kernel/qcocoamenuloader_mac.mm \
                kernel/qcocoaapplication_mac.mm \
                kernel/qcocoaapplicationdelegate_mac.mm \
                kernel/qt_cocoa_helpers_mac.mm \
                kernel/qdesktopwidget_mac.mm \
                kernel/qeventdispatcher_mac.mm \
                kernel/qcocoawindowcustomthemeframe_mac.mm \
                kernel/qmultitouch_mac.mm \

        HEADERS += \
                kernel/qt_cocoa_helpers_mac_p.h \
                kernel/qcocoaapplication_mac_p.h \
                kernel/qcocoaapplicationdelegate_mac_p.h \
                kernel/qeventdispatcher_mac_p.h

        MENU_NIB.files = mac/qt_menu.nib
        MENU_NIB.path = Resources
        MENU_NIB.version = Versions
        QMAKE_BUNDLE_DATA += MENU_NIB
        RESOURCES += mac/macresources.qrc

        LIBS_PRIVATE += -framework AppKit
}

wince*: {
        HEADERS += \
                ../corelib/kernel/qfunctions_wince.h \
                kernel/qguifunctions_wince.h

        SOURCES += \
                ../corelib/kernel/qfunctions_wince.cpp \
                kernel/qguifunctions_wince.cpp
}

# Qt kernel module

# Only used on platforms with CONFIG += precompile_header
PRECOMPILED_HEADER = kernel/qt_gui_pch.h

KERNEL_P= kernel
HEADERS += \
	kernel/qaction.h \
	kernel/qactiongroup.h \
	kernel/qapplication.h \
	kernel/qapplication_p.h \
	kernel/qboxlayout.h \
	kernel/qclipboard.h \
	kernel/qcursor.h \
	kernel/qdesktopwidget.h \
	kernel/qdrag.h \
	kernel/qdnd_p.h \
	kernel/qevent.h \
	kernel/qevent_p.h \
	kernel/qformlayout.h \
	kernel/qgridlayout.h \
	kernel/qkeysequence.h \
	kernel/qlayout.h \
	kernel/qlayout_p.h \
	kernel/qlayoutengine_p.h \
	kernel/qlayoutitem.h \
	kernel/qmime.h \
	kernel/qsessionmanager.h \
	kernel/qshortcut.h \
	kernel/qshortcutmap_p.h \
	kernel/qsizepolicy.h \
	kernel/qpalette.h \
	kernel/qsound.h \
	kernel/qsound_p.h \
	kernel/qstackedlayout.h \
	kernel/qtooltip.h \
	kernel/qwhatsthis.h \
        kernel/qwidget.h \
        kernel/qwidget_p.h \
	kernel/qwidgetaction.h \
	kernel/qwidgetaction_p.h \
	kernel/qwindowdefs.h \
	kernel/qkeymapper_p.h \
	kernel/qgesture.h \
	kernel/qgesture_p.h \
	kernel/qstandardgestures.h \
	kernel/qstandardgestures_p.h

SOURCES += \
	kernel/qaction.cpp \
	kernel/qactiongroup.cpp \
	kernel/qapplication.cpp \
	kernel/qboxlayout.cpp \
	kernel/qclipboard.cpp \
	kernel/qcursor.cpp \
	kernel/qdrag.cpp \
	kernel/qdnd.cpp \
	kernel/qevent.cpp \
	kernel/qformlayout.cpp \
	kernel/qgridlayout.cpp \
	kernel/qkeysequence.cpp \
	kernel/qlayout.cpp \
	kernel/qlayoutengine.cpp \
	kernel/qlayoutitem.cpp \
	kernel/qmime.cpp \
	kernel/qpalette.cpp \
	kernel/qshortcut.cpp \
	kernel/qshortcutmap.cpp \
	kernel/qsound.cpp \
	kernel/qstackedlayout.cpp \
	kernel/qtooltip.cpp \
	kernel/qguivariant.cpp \
	kernel/qwhatsthis.cpp \
	kernel/qwidget.cpp \
	kernel/qwidgetaction.cpp \
	kernel/qkeymapper.cpp \
	kernel/qgesture.cpp \
	kernel/qstandardgestures.cpp

win32 {
	DEFINES += QT_NO_DIRECTDRAW

	SOURCES += \
		kernel/qapplication_win.cpp \
		kernel/qclipboard_win.cpp \
		kernel/qcursor_win.cpp \
		kernel/qdesktopwidget_win.cpp \
		kernel/qdnd_win.cpp \
		kernel/qmime_win.cpp \
		kernel/qsound_win.cpp \
		kernel/qwidget_win.cpp \
		kernel/qole_win.cpp \
		kernel/qkeymapper_win.cpp

        !contains(DEFINES, QT_NO_DIRECTDRAW):LIBS += ddraw.lib
}

symbian {
        SOURCES += \
                kernel/qapplication_s60.cpp \
                kernel/qeventdispatcher_s60.cpp \
                kernel/qwidget_s60.cpp \
                kernel/qcursor_s60.cpp \
                kernel/qdesktopwidget_s60.cpp \
                kernel/qkeymapper_s60.cpp\
                kernel/qclipboard_s60.cpp\
                kernel/qdnd_s60.cpp \
                kernel/qsound_s60.cpp

        HEADERS += \
                kernel/qt_s60_p.h \
                kernel/qeventdispatcher_s60_p.h
        LIBS += -lbafl -lestor

        INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
}

unix:x11 {
	INCLUDEPATH += ../3rdparty/xorg
	HEADERS += \
		kernel/qx11embed_x11.h \
		kernel/qx11info_x11.h \
        kernel/qkde_p.h

	SOURCES += \
		kernel/qapplication_x11.cpp \
		kernel/qclipboard_x11.cpp \
		kernel/qcursor_x11.cpp \
		kernel/qdnd_x11.cpp \
		kernel/qdesktopwidget_x11.cpp \
		kernel/qmotifdnd_x11.cpp \
		kernel/qsound_x11.cpp \
		kernel/qwidget_x11.cpp \
		kernel/qwidgetcreate_x11.cpp \
		kernel/qx11embed_x11.cpp \
		kernel/qx11info_x11.cpp \
		kernel/qkeymapper_x11.cpp \
		kernel/qkde.cpp

        contains(QT_CONFIG, glib) {
            SOURCES += \
		kernel/qguieventdispatcher_glib.cpp
            HEADERS += \
                kernel/qguieventdispatcher_glib_p.h
            QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
	    LIBS_PRIVATE +=$$QT_LIBS_GLIB
	}
            SOURCES += \
		kernel/qeventdispatcher_x11.cpp
            HEADERS += \
                kernel/qeventdispatcher_x11_p.h
}

embedded {
	HEADERS += \
		kernel/qeventdispatcher_qws_p.h

	SOURCES += \
		kernel/qapplication_qws.cpp \
		kernel/qclipboard_qws.cpp \
		kernel/qcursor_qws.cpp \
		kernel/qdesktopwidget_qws.cpp \
		kernel/qdnd_qws.cpp \
		kernel/qeventdispatcher_qws.cpp \
		kernel/qsound_qws.cpp \
		kernel/qwidget_qws.cpp \
		kernel/qkeymapper_qws.cpp \
		kernel/qsessionmanager_qws.cpp

        contains(QT_CONFIG, glib) {
            SOURCES += \
		kernel/qeventdispatcher_glib_qws.cpp
            HEADERS += \
                kernel/qeventdispatcher_glib_qws_p.h
            QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
	}

}

!embedded:!x11:mac {
	SOURCES += \
		kernel/qclipboard_mac.cpp \
		kernel/qmime_mac.cpp \
		kernel/qt_mac.cpp \
		kernel/qkeymapper_mac.cpp

        OBJECTIVE_HEADERS += \
                qcocoawindow_mac_p.h \
                qcocoawindowdelegate_mac_p.h \
                qcocoaview_mac_p.h \
                qcocoaapplication_mac_p.h \
                qcocoaapplicationdelegate_mac_p.h \
                qmultitouch_mac_p.h

        OBJECTIVE_SOURCES += \
                kernel/qcursor_mac.mm \
                kernel/qdnd_mac.mm \
                kernel/qsound_mac.mm  \
                kernel/qapplication_mac.mm \
		        kernel/qwidget_mac.mm \
		        kernel/qcocoapanel_mac.mm \
                kernel/qcocoaview_mac.mm \
                kernel/qcocoawindow_mac.mm \
                kernel/qcocoawindowdelegate_mac.mm \
                kernel/qcocoamenuloader_mac.mm \
                kernel/qcocoaapplication_mac.mm \
                kernel/qcocoaapplicationdelegate_mac.mm \
                kernel/qt_cocoa_helpers_mac.mm \
                kernel/qdesktopwidget_mac.mm \
                kernel/qeventdispatcher_mac.mm \
                kernel/qcocoawindowcustomthemeframe_mac.mm \
                kernel/qmultitouch_mac.mm \

        HEADERS += \
                kernel/qt_cocoa_helpers_mac_p.h \
                kernel/qcocoaapplication_mac_p.h \
                kernel/qcocoaapplicationdelegate_mac_p.h \
                kernel/qeventdispatcher_mac_p.h

        MENU_NIB.files = mac/qt_menu.nib
        MENU_NIB.path = Resources
        MENU_NIB.version = Versions
        QMAKE_BUNDLE_DATA += MENU_NIB
        RESOURCES += mac/macresources.qrc

        LIBS_PRIVATE += -framework AppKit
}

wince*: {
        HEADERS += \
                ../corelib/kernel/qfunctions_wince.h \
                kernel/qguifunctions_wince.h

        SOURCES += \
                ../corelib/kernel/qfunctions_wince.cpp \
                kernel/qguifunctions_wince.cpp
}


Add o2googledevice.{cpp,h} to src.pri

Add o2googledevice.{cpp,h} to src.pri

QT *= network

lessThan(QT_MAJOR_VERSION, 5): QT *= script

INCLUDEPATH += $$PWD
SOURCES += \
    $$PWD/o1.cpp \
    $$PWD/o1requestor.cpp \
    $$PWD/o1smugmug.cpp \
    $$PWD/o1timedreply.cpp \
    $$PWD/o2.cpp \
    $$PWD/o2facebook.cpp \
    $$PWD/o2gft.cpp \
    $$PWD/o2reply.cpp \
    $$PWD/o2replyserver.cpp \
    $$PWD/o2requestor.cpp \
    $$PWD/o2skydrive.cpp \
    $$PWD/oxtwitter.cpp \
    $$PWD/o2simplecrypt.cpp \
    $$PWD/o0baseauth.cpp \
    $$PWD/o0settingsstore.cpp \
    $$PWD/o2spotify.cpp \
    $$PWD/o2google.cpp \
    $$PWD/o2googledevice.cpp \
    $$PWD/o2uber.cpp \
    $$PWD/o2msgraph.cpp

HEADERS += \
    $$PWD/o1.h \
    $$PWD/o1dropbox.h \
    $$PWD/o1flickr.h \
    $$PWD/o1requestor.h \
    $$PWD/o1smugmug.h \
    $$PWD/o1twitter.h \
    $$PWD/o1timedreply.h \
    $$PWD/o1upwork.h \
    $$PWD/o2.h \
    $$PWD/o2facebook.h \
    $$PWD/o2gft.h \
    $$PWD/o2reply.h \
    $$PWD/o2replyserver.h \
    $$PWD/o2requestor.h \
    $$PWD/o2skydrive.h \
    $$PWD/oxtwitter.h \
    $$PWD/o1freshbooks.h \
    $$PWD/o0baseauth.h \
    $$PWD/o0globals.h \
    $$PWD/o0simplecrypt.h \
    $$PWD/o0requestparameter.h \
    $$PWD/o0abstractstore.h \
    $$PWD/o0settingsstore.h \
    $$PWD/o2spotify.h \
    $$PWD/o2google.h \
    $$PWD/o2googledevice.h \
    $$PWD/o2uber.h \
    $$PWD/o2msgraph.h

QT *= network

lessThan(QT_MAJOR_VERSION, 5): QT *= script

INCLUDEPATH += $$PWD
SOURCES += \
    $$PWD/o1.cpp \
    $$PWD/o1requestor.cpp \
    $$PWD/o1smugmug.cpp \
    $$PWD/o1timedreply.cpp \
    $$PWD/o2.cpp \
    $$PWD/o2facebook.cpp \
    $$PWD/o2gft.cpp \
    $$PWD/o2reply.cpp \
    $$PWD/o2replyserver.cpp \
    $$PWD/o2requestor.cpp \
    $$PWD/o2skydrive.cpp \
    $$PWD/oxtwitter.cpp \
    $$PWD/o2simplecrypt.cpp \
    $$PWD/o0baseauth.cpp \
    $$PWD/o0settingsstore.cpp \
    $$PWD/o2spotify.cpp \
    $$PWD/o2google.cpp \
    $$PWD/o2uber.cpp \
    $$PWD/o2msgraph.cpp

HEADERS += \
    $$PWD/o1.h \
    $$PWD/o1dropbox.h \
    $$PWD/o1flickr.h \
    $$PWD/o1requestor.h \
    $$PWD/o1smugmug.h \
    $$PWD/o1twitter.h \
    $$PWD/o1timedreply.h \
    $$PWD/o1upwork.h \
    $$PWD/o2.h \
    $$PWD/o2facebook.h \
    $$PWD/o2gft.h \
    $$PWD/o2reply.h \
    $$PWD/o2replyserver.h \
    $$PWD/o2requestor.h \
    $$PWD/o2skydrive.h \
    $$PWD/oxtwitter.h \
    $$PWD/o1freshbooks.h \
    $$PWD/o0baseauth.h \
    $$PWD/o0globals.h \
    $$PWD/o0simplecrypt.h \
    $$PWD/o0requestparameter.h \
    $$PWD/o0abstractstore.h \
    $$PWD/o0settingsstore.h \
    $$PWD/o2spotify.h \
    $$PWD/o2google.h \
    $$PWD/o2uber.h \
    $$PWD/o2msgraph.h


Define the QT_NO_.... when the module is absant from QT_CONFIG

Task-number: QTMODULARIZATION-38

INCLUDEPATH += $$PWD

SOURCES += \
    $$PWD/qdeclarativeapplication.cpp \
    $$PWD/qdeclarativeutilmodule.cpp\
    $$PWD/qdeclarativeview.cpp \
    $$PWD/qdeclarativeconnections.cpp \
    $$PWD/qdeclarativepackage.cpp \
    $$PWD/qdeclarativeanimation.cpp \
    $$PWD/qdeclarativesystempalette.cpp \
    $$PWD/qdeclarativespringanimation.cpp \
    $$PWD/qdeclarativesmoothedanimation.cpp \
    $$PWD/qdeclarativestate.cpp\
    $$PWD/qdeclarativetransitionmanager.cpp \
    $$PWD/qdeclarativestateoperations.cpp \
    $$PWD/qdeclarativepropertychanges.cpp \
    $$PWD/qdeclarativestategroup.cpp \
    $$PWD/qdeclarativetransition.cpp \
    $$PWD/qdeclarativelistmodel.cpp\
    $$PWD/qdeclarativelistaccessor.cpp \
    $$PWD/qdeclarativeopenmetaobject.cpp \
    $$PWD/qdeclarativetimeline.cpp \
    $$PWD/qdeclarativetimer.cpp \
    $$PWD/qdeclarativebind.cpp \
    $$PWD/qdeclarativepropertymap.cpp \
    $$PWD/qdeclarativepixmapcache.cpp \
    $$PWD/qdeclarativebehavior.cpp \
    $$PWD/qdeclarativefontloader.cpp \
    $$PWD/qdeclarativestyledtext.cpp \
    $$PWD/qdeclarativelistmodelworkeragent.cpp \
    $$PWD/qlistmodelinterface.cpp

HEADERS += \
    $$PWD/qdeclarativeapplication_p.h \
    $$PWD/qdeclarativeutilmodule_p.h\
    $$PWD/qdeclarativeview.h \
    $$PWD/qdeclarativeconnections_p.h \
    $$PWD/qdeclarativepackage_p.h \
    $$PWD/qdeclarativeanimation_p.h \
    $$PWD/qdeclarativeanimation_p_p.h \
    $$PWD/qdeclarativesystempalette_p.h \
    $$PWD/qdeclarativespringanimation_p.h \
    $$PWD/qdeclarativesmoothedanimation_p.h \
    $$PWD/qdeclarativesmoothedanimation_p_p.h \
    $$PWD/qdeclarativestate_p.h\
    $$PWD/qdeclarativestateoperations_p.h \
    $$PWD/qdeclarativepropertychanges_p.h \
    $$PWD/qdeclarativestate_p_p.h\
    $$PWD/qdeclarativetransitionmanager_p_p.h \
    $$PWD/qdeclarativestategroup_p.h \
    $$PWD/qdeclarativetransition_p.h \
    $$PWD/qdeclarativelistmodel_p.h\
    $$PWD/qdeclarativelistmodel_p_p.h\
    $$PWD/qdeclarativelistaccessor_p.h \
    $$PWD/qdeclarativeopenmetaobject_p.h \
    $$PWD/qdeclarativenullablevalue_p_p.h \
    $$PWD/qdeclarativetimeline_p_p.h \
    $$PWD/qdeclarativetimer_p.h \
    $$PWD/qdeclarativebind_p.h \
    $$PWD/qdeclarativepropertymap.h \
    $$PWD/qdeclarativepixmapcache_p.h \
    $$PWD/qdeclarativebehavior_p.h \
    $$PWD/qdeclarativefontloader_p.h \
    $$PWD/qdeclarativestyledtext_p.h \
    $$PWD/qdeclarativelistmodelworkeragent_p.h \
    $$PWD/qlistmodelinterface_p.h

contains(QT_CONFIG, xmlpatterns) {
    QT+=xmlpatterns
    SOURCES += $$PWD/qdeclarativexmllistmodel.cpp
    HEADERS += $$PWD/qdeclarativexmllistmodel_p.h
} else {
    DEFINES += QT_NO_XMLPATTERNS
}