Update QGCExternalLibs.pri

Update QGCExternalLibs.pri

Fix bad push

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

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

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

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

# check for user defined settings in user_config.pri if not already set as qmake argument
isEmpty(MAVLINKPATH_REL) {
    exists(user_config.pri):infile(user_config.pri, MAVLINKPATH_REL) {
        MAVLINKPATH_REL = $$fromfile(user_config.pri, MAVLINKPATH_REL)
        message($$sprintf("Using user-supplied relativ mavlink path '%1' specified in user_config.pri", $$MAVLINKPATH_REL))
    } else {
        MAVLINKPATH_REL = libs/mavlink/include/mavlink/v2.0
    }
}

isEmpty(MAVLINKPATH) {
    exists(user_config.pri):infile(user_config.pri, MAVLINKPATH) {
        MAVLINKPATH     = $$fromfile(user_config.pri, MAVLINKPATH)
        message($$sprintf("Using user-supplied mavlink path '%1' specified in user_config.pri", $$MAVLINKPATH))
    } else {
        MAVLINKPATH     = $$BASEDIR/$$MAVLINKPATH_REL
    }
}

isEmpty(MAVLINK_CONF) {
    exists(user_config.pri):infile(user_config.pri, MAVLINK_CONF) {
        MAVLINK_CONF = $$fromfile(user_config.pri, MAVLINK_CONF)
        message($$sprintf("Using user-supplied mavlink dialect '%1' specified in user_config.pri", $$MAVLINK_CONF))
    } else {
        MAVLINK_CONF = ardupilotmega
    }
}

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

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

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

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

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

#
# [REQUIRED] shapelib library
INCLUDEPATH += libs/shapelib
SOURCES += \
    libs/shapelib/shpopen.c \
    libs/shapelib/safileio.c

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

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

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

AndroidBuild {
    contains(QT_ARCH, arm) {
        ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-armeabi-v7a/lib/libcrypto.so
        ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-armeabi-v7a/lib/libssl.so
    } else {
        ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-x86/lib/libcrypto.so
        ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-x86/lib/libssl.so
    }
}

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

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

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

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

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

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

# check for user defined settings in user_config.pri if not already set as qmake argument
isEmpty(MAVLINKPATH_REL) {
    exists(user_config.pri):infile(user_config.pri, MAVLINKPATH_REL) {
        MAVLINKPATH_REL = $$fromfile(user_config.pri, MAVLINKPATH_REL)
        message($$sprintf("Using user-supplied relativ mavlink path '%1' specified in user_config.pri", $$MAVLINKPATH_REL))
    } else {
        MAVLINKPATH_REL = libs/mavlink/include/mavlink/v2.0
    }
}

isEmpty(MAVLINKPATH) {
    exists(user_config.pri):infile(user_config.pri, MAVLINKPATH) {
        MAVLINKPATH     = $$fromfile(user_config.pri, MAVLINKPATH)
        message($$sprintf("Using user-supplied mavlink path '%1' specified in user_config.pri", $$MAVLINKPATH))
    } else {
        MAVLINKPATH     = $$BASEDIR/$$MAVLINKPATH_REL
    }
}

isEmpty(MAVLINK_CONF) {
    exists(user_config.pri):infile(user_config.pri, MAVLINK_CONF) {
        MAVLINK_CONF = $$fromfile(user_config.pri, MAVLINK_CONF)
        message($$sprintf("Using user-supplied mavlink dialect '%1' specified in user_config.pri", $$MAVLINK_CONF))
    } else {
        MAVLINK_CONF = ardupilotmega
    }
}

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

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

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

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

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

#
# [REQUIRED] shapelib library
INCLUDEPATH += libs/shapelib
SOURCES += \
    libs/shapelib/shpopen.c \
    libs/shapelib/safileio.c

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

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

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

AndroidBuild {
    contains(QT_ARCH, arm) {
        ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-armeabi-v7a/lib/libcrypto.so
        ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-armeabi-v7a/lib/libssl.so
    } else:contains(QT_ARCH, arm64) {
message("arm64")
    } else {
        ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-x86/lib/libcrypto.so
        ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-x86/lib/libssl.so
    }
}

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

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


Include confapp_<os>.pri only if it exists

unix:exists(confapp_unix.pri):include(confapp_unix.pri)
windows:exists(confapp_win.pri):include(confapp_win.pri)

include(common.pri)

mac:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9

unix:include(confapp_unix.pri)
windows:include(confapp_win.pri)

include(common.pri)

mac:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9


Remove non-existing header from pri file

Got added in 081fafe395d52.

INCLUDEPATH += $$PWD

SOURCES += \
    $$PWD/qdeclarativeutilmodule.cpp\
    $$PWD/qdeclarativeview.cpp \
    $$PWD/qdeclarativeconnections.cpp \
    $$PWD/qdeclarativepackage.cpp \
    $$PWD/qdeclarativeanimation.cpp \
    $$PWD/qdeclarativesystempalette.cpp \
    $$PWD/qdeclarativespringfollow.cpp \
    $$PWD/qdeclarativeeasefollow.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

HEADERS += \
    $$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/qdeclarativespringfollow_p.h \
    $$PWD/qdeclarativeeasefollow_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

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

INCLUDEPATH += $$PWD

SOURCES += \
    $$PWD/qdeclarativeutilmodule.cpp\
    $$PWD/qdeclarativeview.cpp \
    $$PWD/qdeclarativeconnections.cpp \
    $$PWD/qdeclarativepackage.cpp \
    $$PWD/qdeclarativeanimation.cpp \
    $$PWD/qdeclarativesystempalette.cpp \
    $$PWD/qdeclarativespringfollow.cpp \
    $$PWD/qdeclarativeeasefollow.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

HEADERS += \
    $$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/qdeclarativespringfollow_p.h \
    $$PWD/qdeclarativeeasefollow_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/qdeclarativelistmodelworkeragent_p_p.h

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


Doc: Explicitly reference qdocconf in the QMake pro file

Make "Jump to File" work

PROJECT=TelegramQt
QDOCCONF=TelegramQt.qdocconf

QDOC = $$[QT_INSTALL_BINS]/qdoc
QHELPGENERATOR = $$[QT_INSTALL_BINS]/qhelpgenerator

QDOC_OUTPUT = $${OUT_PWD}/html
QHELPFILE = $${QDOC_OUTPUT}/$${PROJECT}.qhp
QCHFILE = $${QDOC_OUTPUT}/$${PROJECT}.qch

DOC_ENV = QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS]

qch_docs.target = $${QCHFILE}
qch_docs.depends += FORCE
qch_docs.commands =  (env $$DOC_ENV $$QDOC $${PWD}/$${QDOCCONF} --outputdir=$${QDOC_OUTPUT}) && \
    ($${QHELPGENERATOR} $${QHELPFILE} -o $${QCHFILE})

docs.depends = $${QCHFILE}
docs.path = $${INSTALL_DOC_DIR}
docs.commands = $$QMAKE_INSTALL_FILE $${QCHFILE} $(INSTALL_ROOT)$${docs.path}

QMAKE_EXTRA_TARGETS += qch_docs docs
INSTALLS += docs

OTHER_FILES += $${QDOCCONF}

PROJECT=TelegramQt
QDOCCONF=$${PROJECT}.qdocconf

QDOC = $$[QT_INSTALL_BINS]/qdoc
QHELPGENERATOR = $$[QT_INSTALL_BINS]/qhelpgenerator

QDOC_OUTPUT = $${OUT_PWD}/html
QHELPFILE = $${QDOC_OUTPUT}/$${PROJECT}.qhp
QCHFILE = $${QDOC_OUTPUT}/$${PROJECT}.qch

DOC_ENV = QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS]

qch_docs.target = $${QCHFILE}
qch_docs.depends += FORCE
qch_docs.commands =  (env $$DOC_ENV $$QDOC $${PWD}/$${QDOCCONF} --outputdir=$${QDOC_OUTPUT}) && \
    ($${QHELPGENERATOR} $${QHELPFILE} -o $${QCHFILE})

docs.depends = $${QCHFILE}
docs.path = $${INSTALL_DOC_DIR}
docs.commands = $$QMAKE_INSTALL_FILE $${QCHFILE} $(INSTALL_ROOT)$${docs.path}

QMAKE_EXTRA_TARGETS += qch_docs docs
INSTALLS += docs

OTHER_FILES += $${QDOCCONF}


Fix `make check` build target

Fix `make check` build target

# Copyright 2014 CyberTech Labs Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#     http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
TEMPLATE = app
include($$PWD/../global.pri)
CONFIG += testcase testcase_no_bundle no_testcase_installs

QT += widgets

INCLUDEPATH += \
	$$_PRO_FILE_PWD_/ \

QMAKE_CXXFLAGS += \
	-isystem $$PWD/thirdparty/googletest/googlemock/include \
	-isystem $$PWD/thirdparty/googletest/googletest/include \

LIBS += -L$$DESTDIR

LIBS += -lgoogletest$$CONFIGURATION_SUFFIX

SOURCES = $$PWD/mainTest.cpp

include(thirdparty/googletest.pri)

CONFIG(clang) {
	QMAKE_CXXFLAGS += -Wno-unused-local-typedef -Wno-error=gnu-zero-variadic-macro-arguments
} else {
	QMAKE_CXXFLAGS += -Wno-unused-local-typedefs -Wno-error=variadic-macros
}

QMAKE_CXXFLAGS += -Wno-error=pedantic
#DEFINES += GTEST_USE_OWN_TR1_TUPLE

OTHER_FILES += \
	$$PWD/test-system-config.xml \
	$$PWD/test-model-config.xml \

copyToDestdir($$PWD/test-system-config.xml, now)
copyToDestdir($$PWD/test-model-config.xml, now)

# Copyright 2014 CyberTech Labs Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#     http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

include($$PWD/../global.pri)

TEMPLATE = app

CONFIG -= app_bundle

QT += widgets

INCLUDEPATH += \
	$$_PRO_FILE_PWD_/ \

QMAKE_CXXFLAGS += \
	-isystem $$PWD/thirdparty/googletest/googlemock/include \
	-isystem $$PWD/thirdparty/googletest/googletest/include \

LIBS += -L$$DESTDIR

LIBS += -lgoogletest$$CONFIGURATION_SUFFIX

SOURCES = $$PWD/mainTest.cpp

include(thirdparty/googletest.pri)

CONFIG(clang) {
	QMAKE_CXXFLAGS += -Wno-unused-local-typedef -Wno-error=gnu-zero-variadic-macro-arguments
} else {
	QMAKE_CXXFLAGS += -Wno-unused-local-typedefs -Wno-error=variadic-macros
}

QMAKE_CXXFLAGS += -Wno-error=pedantic
#DEFINES += GTEST_USE_OWN_TR1_TUPLE

OTHER_FILES += \
	$$PWD/test-system-config.xml \
	$$PWD/test-model-config.xml \

copyToDestdir($$PWD/test-system-config.xml, now)
copyToDestdir($$PWD/test-model-config.xml, now)


Remove custom add of ttx

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2014 QGroundControl Developers
# License terms set in COPYING.md
# -------------------------------------------------

installer {
    DEFINES += QGC_INSTALL_RELEASE
    MacBuild {
        VideoEnabled {
            # Install the gstreamer framework
            # This will:
            # Copy from the original distibution into DESTDIR/gstwork (if not already there)
            # Prune the framework, removing stuff we don't need
            # Relocate all dylibs so they can work under @executable_path/...
            # Copy the result into the app bundle
            # Make sure qgroundcontrol can find them
            message("Preparing GStreamer Framework")
            QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET}
        } else {
            message("Skipping GStreamer Framework")
        }

        # We cd to release directory so we can run macdeployqt without a path to the
        # qgroundcontrol.app file. If you specify a path to the .app file the symbolic
        # links to plugins will not be created correctly.
        QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt $${TARGET}.app -appstore-compliant -verbose=2 -qmldir=$${BASEDIR}/src

        # macdeployqt is missing some relocations once in a while. "Fix" it:
        QMAKE_POST_LINK += && python $$BASEDIR/tools/osxrelocator.py $${TARGET}.app/Contents @rpath @executable_path/../Frameworks -r > /dev/null 2>&1

        # Create package
        QMAKE_POST_LINK += && hdiutil create /tmp/tmp.dmg -ov -volname "$${TARGET}-$${MAC_VERSION}" -fs HFS+ -srcfolder "$${DESTDIR}/"
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
        QMAKE_POST_LINK += && hdiutil convert /tmp/tmp.dmg -format UDBZ -o $${DESTDIR}/package/$${TARGET}.dmg
        QMAKE_POST_LINK += && rm /tmp/tmp.dmg
    }
    WindowsBuild {
        QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" $$(QGC_NSIS_INSTALLER_PARAMETERS) /DINSTALLER_ICON="\"$${QGC_INSTALLER_ICON}\"" /DHEADER_BITMAP="\"$${QGC_INSTALLER_HEADER_BITMAP}\"" /DAPPNAME="\"$${QGC_APP_NAME}\"" /DEXENAME="\"$${TARGET}\"" /DORGNAME="\"$${QGC_ORG_NAME}\"" /DDESTDIR=$${DESTDIR} /NOCD "\"/XOutFile $${DESTDIR_WIN}\\$${TARGET}-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
        OTHER_FILES += deploy/qgroundcontrol_installer.nsi
    }
    LinuxBuild {
        #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
        QMAKE_POST_LINK += && mkdir -p release/package
        QMAKE_POST_LINK += && tar --warning=no-file-changed -cjf release/package/QGroundControl.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/'
    }
    AndroidBuild {
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
        QMAKE_POST_LINK += && make install INSTALL_ROOT=$${DESTDIR}/android-build/
        QMAKE_POST_LINK += && androiddeployqt --input android-libQGroundControl.so-deployment-settings.json --output $${DESTDIR}/android-build --deployment bundled --gradle --sign $${BASEDIR}/android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS)
        contains(QT_ARCH, arm) {
            QGC_APK_BITNESS = "32"
        } else:contains(QT_ARCH, arm64) {
            QGC_APK_BITNESS = "64"
        } else {
            QGC_APK_BITNESS = ""
        }
        QMAKE_POST_LINK += && cp $${DESTDIR}/android-build/build/outputs/apk/android-build-release-signed.apk $${DESTDIR}/package/QGroundControl$${QGC_APK_BITNESS}.apk
    }
}

# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2014 QGroundControl Developers
# License terms set in COPYING.md
# -------------------------------------------------

installer {
    DEFINES += QGC_INSTALL_RELEASE
    MacBuild {
        VideoEnabled {
            # Install the gstreamer framework
            # This will:
            # Copy from the original distibution into DESTDIR/gstwork (if not already there)
            # Prune the framework, removing stuff we don't need
            # Relocate all dylibs so they can work under @executable_path/...
            # Copy the result into the app bundle
            # Make sure qgroundcontrol can find them
            message("Preparing GStreamer Framework")
            QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET}
        } else {
            message("Skipping GStreamer Framework")
        }

        # We cd to release directory so we can run macdeployqt without a path to the
        # qgroundcontrol.app file. If you specify a path to the .app file the symbolic
        # links to plugins will not be created correctly.
        QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt $${TARGET}.app -appstore-compliant -verbose=2 -qmldir=$${BASEDIR}/src

        # macdeployqt does not deploy texttospeech plugin
        QMAKE_POST_LINK += && mkdir $${TARGET}.app/Contents/PlugIns/texttospeech
        QMAKE_POST_LINK += && cp $$[QT_INSTALL_PLUGINS]/texttospeech/libqtexttospeech_speechosx.dylib $${TARGET}.app/Contents/PlugIns/texttospeech

        # macdeployqt is missing some relocations once in a while. "Fix" it:
        QMAKE_POST_LINK += && python $$BASEDIR/tools/osxrelocator.py $${TARGET}.app/Contents @rpath @executable_path/../Frameworks -r > /dev/null 2>&1

        # Create package
        QMAKE_POST_LINK += && hdiutil create /tmp/tmp.dmg -ov -volname "$${TARGET}-$${MAC_VERSION}" -fs HFS+ -srcfolder "$${DESTDIR}/"
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
        QMAKE_POST_LINK += && hdiutil convert /tmp/tmp.dmg -format UDBZ -o $${DESTDIR}/package/$${TARGET}.dmg
        QMAKE_POST_LINK += && rm /tmp/tmp.dmg
    }
    WindowsBuild {
        QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" $$(QGC_NSIS_INSTALLER_PARAMETERS) /DINSTALLER_ICON="\"$${QGC_INSTALLER_ICON}\"" /DHEADER_BITMAP="\"$${QGC_INSTALLER_HEADER_BITMAP}\"" /DAPPNAME="\"$${QGC_APP_NAME}\"" /DEXENAME="\"$${TARGET}\"" /DORGNAME="\"$${QGC_ORG_NAME}\"" /DDESTDIR=$${DESTDIR} /NOCD "\"/XOutFile $${DESTDIR_WIN}\\$${TARGET}-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
        OTHER_FILES += deploy/qgroundcontrol_installer.nsi
    }
    LinuxBuild {
        #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
        QMAKE_POST_LINK += && mkdir -p release/package
        QMAKE_POST_LINK += && tar --warning=no-file-changed -cjf release/package/QGroundControl.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/'
    }
    AndroidBuild {
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
        QMAKE_POST_LINK += && make install INSTALL_ROOT=$${DESTDIR}/android-build/
        QMAKE_POST_LINK += && androiddeployqt --input android-libQGroundControl.so-deployment-settings.json --output $${DESTDIR}/android-build --deployment bundled --gradle --sign $${BASEDIR}/android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS)
        contains(QT_ARCH, arm) {
            QGC_APK_BITNESS = "32"
        } else:contains(QT_ARCH, arm64) {
            QGC_APK_BITNESS = "64"
        } else {
            QGC_APK_BITNESS = ""
        }
        QMAKE_POST_LINK += && cp $${DESTDIR}/android-build/build/outputs/apk/android-build-release-signed.apk $${DESTDIR}/package/QGroundControl$${QGC_APK_BITNESS}.apk
    }
}


Version 0.21

Version 0.21


Win32: Remove dependency to DbgHelp DLL

Win32: Remove dependency to DbgHelp DLL

This was used for natice stack trace determination, which is done
differently now.

Change-Id: Id983f2bf6805aaf3f7081a16196268be88c98951
Reviewed-by: Friedemann Kleint <1b9f2592239daaec4856ccc1cfb4d2d55b35fb71@digia.com>

CONFIG += exceptions

CONFIG += warn_off

INCLUDEPATH += $$PWD
INCLUDEPATH += $$OUT_PWD

SOURCES += \
    $$PWD/qv4engine.cpp \
    $$PWD/qv4context.cpp \
    $$PWD/qv4runtime.cpp \
    $$PWD/qv4value.cpp \
    $$PWD/qv4debugging.cpp \
    $$PWD/qv4lookup.cpp \
    $$PWD/qv4identifier.cpp \
    $$PWD/qv4identifiertable.cpp \
    $$PWD/qv4mm.cpp \
    $$PWD/qv4managed.cpp \
    $$PWD/qv4internalclass.cpp \
    $$PWD/qv4sparsearray.cpp \
    $$PWD/qv4arrayobject.cpp \
    $$PWD/qv4argumentsobject.cpp \
    $$PWD/qv4booleanobject.cpp \
    $$PWD/qv4dateobject.cpp \
    $$PWD/qv4errorobject.cpp \
    $$PWD/qv4function.cpp \
    $$PWD/qv4functionobject.cpp \
    $$PWD/qv4globalobject.cpp \
    $$PWD/qv4jsonobject.cpp \
    $$PWD/qv4mathobject.cpp \
    $$PWD/qv4numberobject.cpp \
    $$PWD/qv4object.cpp \
    $$PWD/qv4objectproto.cpp \
    $$PWD/qv4regexpobject.cpp \
    $$PWD/qv4stringobject.cpp \
    $$PWD/qv4variantobject.cpp \
    $$PWD/qv4string.cpp \
    $$PWD/qv4objectiterator.cpp \
    $$PWD/qv4regexp.cpp \
    $$PWD/qv4unwindhelper.cpp \
    $$PWD/qv4serialize.cpp \
    $$PWD/qv4script.cpp \
    $$PWD/qv4executableallocator.cpp \
    $$PWD/qv4sequenceobject.cpp \
    $$PWD/qv4include.cpp \
    $$PWD/qv4qobjectwrapper.cpp \
    $$PWD/qv4qmlextensions.cpp \
    $$PWD/qv4vme_moth.cpp

HEADERS += \
    $$PWD/qv4global_p.h \
    $$PWD/qv4engine_p.h \
    $$PWD/qv4context_p.h \
    $$PWD/qv4runtime_p.h \
    $$PWD/qv4math_p.h \
    $$PWD/qv4value_p.h \
    $$PWD/qv4value_def_p.h \
    $$PWD/qv4debugging_p.h \
    $$PWD/qv4lookup_p.h \
    $$PWD/qv4identifier_p.h \
    $$PWD/qv4identifiertable_p.h \
    $$PWD/qv4mm_p.h \
    $$PWD/qv4managed_p.h \
    $$PWD/qv4internalclass_p.h \
    $$PWD/qv4sparsearray_p.h \
    $$PWD/qv4arrayobject_p.h \
    $$PWD/qv4argumentsobject_p.h \
    $$PWD/qv4booleanobject_p.h \
    $$PWD/qv4dateobject_p.h \
    $$PWD/qv4errorobject_p.h \
    $$PWD/qv4function_p.h \
    $$PWD/qv4functionobject_p.h \
    $$PWD/qv4globalobject_p.h \
    $$PWD/qv4jsonobject_p.h \
    $$PWD/qv4mathobject_p.h \
    $$PWD/qv4numberobject_p.h \
    $$PWD/qv4object_p.h \
    $$PWD/qv4objectproto_p.h \
    $$PWD/qv4regexpobject_p.h \
    $$PWD/qv4stringobject_p.h \
    $$PWD/qv4variantobject_p.h \
    $$PWD/qv4string_p.h \
    $$PWD/qv4property_p.h \
    $$PWD/qv4objectiterator_p.h \
    $$PWD/qv4regexp_p.h \
    $$PWD/qv4unwindhelper_p.h \
    $$PWD/qv4unwindhelper_dw2_p.h \
    $$PWD/qv4unwindhelper_arm_p.h \
    $$PWD/qv4serialize_p.h \
    $$PWD/qv4script_p.h \
    $$PWD/qv4scopedvalue_p.h \
    $$PWD/qv4util_p.h \
    $$PWD/qv4executableallocator_p.h \
    $$PWD/qv4sequenceobject_p.h \
    $$PWD/qv4include_p.h \
    $$PWD/qv4qobjectwrapper_p.h \
    $$PWD/qv4qmlextensions_p.h \
    $$PWD/qv4vme_moth_p.h

# Use SSE2 floating point math on 32 bit instead of the default
# 387 to make test results pass on 32 and on 64 bit builds.
linux-g++*:isEqual(QT_ARCH,i386) {
    QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse
    QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse
}

linux*|mac {
    LIBS += -ldl
}

!win32:!ios:!mac {
    *g++*:equals(QT_ARCH, "arm") {
        static_libgcc = $$system($$QMAKE_CXX -print-file-name=libgcc.a)
        LIBS += $$static_libgcc
    }
    SOURCES += $$PWD/qv4engine_cxxabi.cpp
    DEFINES += V4_CXX_ABI_EXCEPTION
}

debug-with-libunwind {
    UW_INC=$$(LIBUNWIND_INCLUDES)
    isEmpty(UW_INC): error("Please set LIBUNWIND_INCLUDES")
    INCLUDEPATH += $$UW_INC
    UW_LIBS=$$(LIBUNWIND_LIBS)
    isEmpty(UW_LIBS): error("Please set LIBUNWIND_LIBS")
    LIBS += -L$$UW_LIBS
    equals(QT_ARCH, arm): LIBS += -lunwind-arm
    LIBS += -lunwind-dwarf-common -lunwind-dwarf-local -lunwind-elf32 -lunwind
    DEFINES += WTF_USE_LIBUNWIND_DEBUG=1
}

valgrind {
    DEFINES += V4_USE_VALGRIND
}

ios: DEFINES += ENABLE_ASSEMBLER_WX_EXCLUSIVE=1

include(../../3rdparty/double-conversion/double-conversion.pri)

CONFIG += exceptions

CONFIG += warn_off

INCLUDEPATH += $$PWD
INCLUDEPATH += $$OUT_PWD

SOURCES += \
    $$PWD/qv4engine.cpp \
    $$PWD/qv4context.cpp \
    $$PWD/qv4runtime.cpp \
    $$PWD/qv4value.cpp \
    $$PWD/qv4debugging.cpp \
    $$PWD/qv4lookup.cpp \
    $$PWD/qv4identifier.cpp \
    $$PWD/qv4identifiertable.cpp \
    $$PWD/qv4mm.cpp \
    $$PWD/qv4managed.cpp \
    $$PWD/qv4internalclass.cpp \
    $$PWD/qv4sparsearray.cpp \
    $$PWD/qv4arrayobject.cpp \
    $$PWD/qv4argumentsobject.cpp \
    $$PWD/qv4booleanobject.cpp \
    $$PWD/qv4dateobject.cpp \
    $$PWD/qv4errorobject.cpp \
    $$PWD/qv4function.cpp \
    $$PWD/qv4functionobject.cpp \
    $$PWD/qv4globalobject.cpp \
    $$PWD/qv4jsonobject.cpp \
    $$PWD/qv4mathobject.cpp \
    $$PWD/qv4numberobject.cpp \
    $$PWD/qv4object.cpp \
    $$PWD/qv4objectproto.cpp \
    $$PWD/qv4regexpobject.cpp \
    $$PWD/qv4stringobject.cpp \
    $$PWD/qv4variantobject.cpp \
    $$PWD/qv4string.cpp \
    $$PWD/qv4objectiterator.cpp \
    $$PWD/qv4regexp.cpp \
    $$PWD/qv4unwindhelper.cpp \
    $$PWD/qv4serialize.cpp \
    $$PWD/qv4script.cpp \
    $$PWD/qv4executableallocator.cpp \
    $$PWD/qv4sequenceobject.cpp \
    $$PWD/qv4include.cpp \
    $$PWD/qv4qobjectwrapper.cpp \
    $$PWD/qv4qmlextensions.cpp \
    $$PWD/qv4vme_moth.cpp

HEADERS += \
    $$PWD/qv4global_p.h \
    $$PWD/qv4engine_p.h \
    $$PWD/qv4context_p.h \
    $$PWD/qv4runtime_p.h \
    $$PWD/qv4math_p.h \
    $$PWD/qv4value_p.h \
    $$PWD/qv4value_def_p.h \
    $$PWD/qv4debugging_p.h \
    $$PWD/qv4lookup_p.h \
    $$PWD/qv4identifier_p.h \
    $$PWD/qv4identifiertable_p.h \
    $$PWD/qv4mm_p.h \
    $$PWD/qv4managed_p.h \
    $$PWD/qv4internalclass_p.h \
    $$PWD/qv4sparsearray_p.h \
    $$PWD/qv4arrayobject_p.h \
    $$PWD/qv4argumentsobject_p.h \
    $$PWD/qv4booleanobject_p.h \
    $$PWD/qv4dateobject_p.h \
    $$PWD/qv4errorobject_p.h \
    $$PWD/qv4function_p.h \
    $$PWD/qv4functionobject_p.h \
    $$PWD/qv4globalobject_p.h \
    $$PWD/qv4jsonobject_p.h \
    $$PWD/qv4mathobject_p.h \
    $$PWD/qv4numberobject_p.h \
    $$PWD/qv4object_p.h \
    $$PWD/qv4objectproto_p.h \
    $$PWD/qv4regexpobject_p.h \
    $$PWD/qv4stringobject_p.h \
    $$PWD/qv4variantobject_p.h \
    $$PWD/qv4string_p.h \
    $$PWD/qv4property_p.h \
    $$PWD/qv4objectiterator_p.h \
    $$PWD/qv4regexp_p.h \
    $$PWD/qv4unwindhelper_p.h \
    $$PWD/qv4unwindhelper_dw2_p.h \
    $$PWD/qv4unwindhelper_arm_p.h \
    $$PWD/qv4serialize_p.h \
    $$PWD/qv4script_p.h \
    $$PWD/qv4scopedvalue_p.h \
    $$PWD/qv4util_p.h \
    $$PWD/qv4executableallocator_p.h \
    $$PWD/qv4sequenceobject_p.h \
    $$PWD/qv4include_p.h \
    $$PWD/qv4qobjectwrapper_p.h \
    $$PWD/qv4qmlextensions_p.h \
    $$PWD/qv4vme_moth_p.h

# Use SSE2 floating point math on 32 bit instead of the default
# 387 to make test results pass on 32 and on 64 bit builds.
linux-g++*:isEqual(QT_ARCH,i386) {
    QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse
    QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse
}

linux*|mac {
    LIBS += -ldl
}

!win32:!ios:!mac {
    *g++*:equals(QT_ARCH, "arm") {
        static_libgcc = $$system($$QMAKE_CXX -print-file-name=libgcc.a)
        LIBS += $$static_libgcc
    }
    SOURCES += $$PWD/qv4engine_cxxabi.cpp
    DEFINES += V4_CXX_ABI_EXCEPTION
}

debug-with-libunwind {
    UW_INC=$$(LIBUNWIND_INCLUDES)
    isEmpty(UW_INC): error("Please set LIBUNWIND_INCLUDES")
    INCLUDEPATH += $$UW_INC
    UW_LIBS=$$(LIBUNWIND_LIBS)
    isEmpty(UW_LIBS): error("Please set LIBUNWIND_LIBS")
    LIBS += -L$$UW_LIBS
    equals(QT_ARCH, arm): LIBS += -lunwind-arm
    LIBS += -lunwind-dwarf-common -lunwind-dwarf-local -lunwind-elf32 -lunwind
    DEFINES += WTF_USE_LIBUNWIND_DEBUG=1
}

valgrind {
    DEFINES += V4_USE_VALGRIND
}

ios: DEFINES += ENABLE_ASSEMBLER_WX_EXCLUSIVE=1

win32:!wince* {
    LIBS_PRIVATE += -lDbgHelp
}

include(../../3rdparty/double-conversion/double-conversion.pri)


Update the qmake buildsystem source files

The listing was outdated.

Signed-off-by: Thiago Macieira <0ed1648d92ca0373297a182b1dba1b974ad10d88@intel.com>

SOURCES += \
    $$PWD/cborencoder.c \
    $$PWD/cborencoder_close_container_checked.c \
    $$PWD/cborencoder_float.c \
    $$PWD/cborerrorstrings.c \
    $$PWD/cborparser.c \
    $$PWD/cborparser_dup_string.c \
    $$PWD/cborparser_float.c \
    $$PWD/cborpretty.c \
    $$PWD/cborpretty_stdio.c \
    $$PWD/cbortojson.c \
    $$PWD/cborvalidation.c \

HEADERS += \
    $$PWD/cbor.h \
    $$PWD/cborinternal_p.h \
    $$PWD/cborjson.h \
    $$PWD/compilersupport_p.h \
    $$PWD/tinycbor-version.h \
    $$PWD/utf8_p.h \

QMAKE_CFLAGS *= $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_LFLAGS *= $$QMAKE_LFLAGS_GCSECTIONS
INCLUDEPATH += $$PWD
CONFIG(release, debug|release): DEFINES += NDEBUG

SOURCES += \
    $$PWD/cborencoder.c \
    $$PWD/cborencoder_close_container_checked.c \
    $$PWD/cborerrorstrings.c \
    $$PWD/cborparser.c \
    $$PWD/cborparser_dup_string.c \
    $$PWD/cborpretty.c \
    $$PWD/cbortojson.c \
    $$PWD/cborvalidation.c \

HEADERS += $$PWD/cbor.h $$PWD/tinycbor-version.h

QMAKE_CFLAGS *= $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_LFLAGS *= $$QMAKE_LFLAGS_GCSECTIONS
INCLUDEPATH += $$PWD
CONFIG(release, debug|release): DEFINES += NDEBUG


Allow list of plugin directories to be passed in QTC_PLUGIN_DIRS

Change-Id: Ied926ed78f24d06ff0ff693d768e12ecb505ccbf
Reviewed-by: Oswald Buddenhagen <6a8868beda3e139b5ac22b2534a23d3e6ba81819@digia.com>

!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
QTCREATOR_PRI_INCLUDED = 1

QTCREATOR_VERSION = 3.0.82
QTCREATOR_COMPAT_VERSION = 3.0.82
BINARY_ARTIFACTS_BRANCH = 3.1

# enable c++11 on everything but mac/release (breaks 10.6)
!macx|CONFIG(debug, debug|release): CONFIG += c++11

isEqual(QT_MAJOR_VERSION, 5) {

defineReplace(cleanPath) {
    return($$clean_path($$1))
}

defineReplace(targetPath) {
    return($$shell_path($$1))
}

} else { # qt5

defineReplace(cleanPath) {
    win32:1 ~= s|\\\\|/|g
    contains(1, ^/.*):pfx = /
    else:pfx =
    segs = $$split(1, /)
    out =
    for(seg, segs) {
        equals(seg, ..):out = $$member(out, 0, -2)
        else:!equals(seg, .):out += $$seg
    }
    return($$join(out, /, $$pfx))
}

defineReplace(targetPath) {
    return($$replace(1, /, $$QMAKE_DIR_SEP))
}

} # qt5

defineReplace(qtLibraryName) {
   unset(LIBRARY_NAME)
   LIBRARY_NAME = $$1
   CONFIG(debug, debug|release) {
      !debug_and_release|build_pass {
          mac:RET = $$member(LIBRARY_NAME, 0)_debug
              else:win32:RET = $$member(LIBRARY_NAME, 0)d
      }
   }
   isEmpty(RET):RET = $$LIBRARY_NAME
   return($$RET)
}

defineTest(minQtVersion) {
    maj = $$1
    min = $$2
    patch = $$3
    isEqual(QT_MAJOR_VERSION, $$maj) {
        isEqual(QT_MINOR_VERSION, $$min) {
            isEqual(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
            greaterThan(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
        }
        greaterThan(QT_MINOR_VERSION, $$min) {
            return(true)
        }
    }
    greaterThan(QT_MAJOR_VERSION, $$maj) {
        return(true)
    }
    return(false)
}

isEqual(QT_MAJOR_VERSION, 5) {

# For use in custom compilers which just copy files
defineReplace(stripSrcDir) {
    return($$relative_path($$absolute_path($$1, $$OUT_PWD), $$_PRO_FILE_PWD_))
}

} else { # qt5

# For use in custom compilers which just copy files
win32:i_flag = i
defineReplace(stripSrcDir) {
    win32 {
        !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
    } else {
        !contains(1, ^/.*):1 = $$OUT_PWD/$$1
    }
    out = $$cleanPath($$1)
    out ~= s|^$$re_escape($$_PRO_FILE_PWD_/)||$$i_flag
    return($$out)
}

} # qt5

!isEmpty(BUILD_TESTS):TEST = 1

isEmpty(TEST):CONFIG(debug, debug|release) {
    !debug_and_release|build_pass {
        TEST = 1
    }
}

isEmpty(IDE_LIBRARY_BASENAME) {
    IDE_LIBRARY_BASENAME = lib
}

equals(TEST, 1) {
    QT +=testlib
    DEFINES += WITH_TESTS
}

IDE_SOURCE_TREE = $$PWD
isEmpty(IDE_BUILD_TREE) {
    sub_dir = $$_PRO_FILE_PWD_
    sub_dir ~= s,^$$re_escape($$PWD),,
    IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
    IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
macx {
    IDE_APP_TARGET   = "Qt Creator"
    IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DATA_PATH    = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DOC_PATH     = $$IDE_DATA_PATH/doc
    IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
    copydata = 1
    !isEqual(QT_MAJOR_VERSION, 5) {
        # we use @rpath which is 10.5+
        # Qt5 doesn't support 10.5, and will set the minimum version to 10.6 or 10.7.
        QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
        QMAKE_LFLAGS *= -mmacosx-version-min=10.5
    }
} else {
    contains(TEMPLATE, vc.*):vcproj = 1
    IDE_APP_TARGET   = qtcreator
    IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH/plugins
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
    IDE_DATA_PATH    = $$IDE_BUILD_TREE/share/qtcreator
    IDE_DOC_PATH     = $$IDE_BUILD_TREE/share/doc/qtcreator
    IDE_BIN_PATH     = $$IDE_APP_PATH
    !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
}

INCLUDEPATH += \
    $$IDE_BUILD_TREE/src \ # for <app/app_version.h>
    $$IDE_SOURCE_TREE/src/libs \
    $$IDE_SOURCE_TREE/tools

QTC_PLUGIN_DIRS = $$(QTC_PLUGIN_DIRS)
QTC_PLUGIN_DIRS = $$split(QTC_PLUGIN_DIRS, $$QMAKE_DIRLIST_SEP)
QTC_PLUGIN_DIRS += $$IDE_SOURCE_TREE/src/plugins
for(dir, QTC_PLUGIN_DIRS) {
    INCLUDEPATH += $$dir
}

CONFIG += depend_includepath

LIBS += -L$$IDE_LIBRARY_PATH

!isEmpty(vcproj) {
    DEFINES += IDE_LIBRARY_BASENAME=\"$$IDE_LIBRARY_BASENAME\"
} else {
    DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
}

DEFINES += QT_CREATOR QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
!macx:DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION

unix {
    CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
    CONFIG(release, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared

    CONFIG(debug, debug|release):MOC_DIR = $${OUT_PWD}/.moc/debug-shared
    CONFIG(release, debug|release):MOC_DIR = $${OUT_PWD}/.moc/release-shared

    RCC_DIR = $${OUT_PWD}/.rcc
    UI_DIR = $${OUT_PWD}/.uic
}

win32-msvc* {
    #Don't warn about sprintf, fopen etc being 'unsafe'
    DEFINES += _CRT_SECURE_NO_WARNINGS
    # Speed up startup time when debugging with cdb
    QMAKE_LFLAGS_DEBUG += /INCREMENTAL:NO
}

qt:greaterThan(QT_MAJOR_VERSION, 4) {
    contains(QT, core): QT += concurrent
    contains(QT, gui): QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900
}

QBSFILE = $$replace(_PRO_FILE_, \\.pro$, .qbs)
exists($$QBSFILE):OTHER_FILES += $$QBSFILE

# recursively resolve plugin deps
done_plugins =
for(ever) {
    isEmpty(QTC_PLUGIN_DEPENDS): \
        break()
    done_plugins += $$QTC_PLUGIN_DEPENDS
    for(dep, QTC_PLUGIN_DEPENDS) {
        dependencies_file =
        for(dir, QTC_PLUGIN_DIRS) {
            exists($$dir/$$dep/$${dep}_dependencies.pri) {
                dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
                break()
            }
        }
        isEmpty(dependencies_file): \
            error("Plugin dependency $$dep not found")
        include($$dependencies_file)
        LIBS += -l$$qtLibraryName($$QTC_PLUGIN_NAME)
    }
    QTC_PLUGIN_DEPENDS = $$unique(QTC_PLUGIN_DEPENDS)
    QTC_PLUGIN_DEPENDS -= $$unique(done_plugins)
}

# recursively resolve library deps
done_libs =
for(ever) {
    isEmpty(QTC_LIB_DEPENDS): \
        break()
    done_libs += $$QTC_LIB_DEPENDS
    for(dep, QTC_LIB_DEPENDS) {
        include($$PWD/src/libs/$$dep/$${dep}_dependencies.pri)
        LIBS += -l$$qtLibraryName($$QTC_LIB_NAME)
    }
    QTC_LIB_DEPENDS = $$unique(QTC_LIB_DEPENDS)
    QTC_LIB_DEPENDS -= $$unique(done_libs)
}

!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
QTCREATOR_PRI_INCLUDED = 1

QTCREATOR_VERSION = 3.0.82
QTCREATOR_COMPAT_VERSION = 3.0.82
BINARY_ARTIFACTS_BRANCH = 3.1

# enable c++11 on everything but mac/release (breaks 10.6)
!macx|CONFIG(debug, debug|release): CONFIG += c++11

isEqual(QT_MAJOR_VERSION, 5) {

defineReplace(cleanPath) {
    return($$clean_path($$1))
}

defineReplace(targetPath) {
    return($$shell_path($$1))
}

} else { # qt5

defineReplace(cleanPath) {
    win32:1 ~= s|\\\\|/|g
    contains(1, ^/.*):pfx = /
    else:pfx =
    segs = $$split(1, /)
    out =
    for(seg, segs) {
        equals(seg, ..):out = $$member(out, 0, -2)
        else:!equals(seg, .):out += $$seg
    }
    return($$join(out, /, $$pfx))
}

defineReplace(targetPath) {
    return($$replace(1, /, $$QMAKE_DIR_SEP))
}

} # qt5

defineReplace(qtLibraryName) {
   unset(LIBRARY_NAME)
   LIBRARY_NAME = $$1
   CONFIG(debug, debug|release) {
      !debug_and_release|build_pass {
          mac:RET = $$member(LIBRARY_NAME, 0)_debug
              else:win32:RET = $$member(LIBRARY_NAME, 0)d
      }
   }
   isEmpty(RET):RET = $$LIBRARY_NAME
   return($$RET)
}

defineTest(minQtVersion) {
    maj = $$1
    min = $$2
    patch = $$3
    isEqual(QT_MAJOR_VERSION, $$maj) {
        isEqual(QT_MINOR_VERSION, $$min) {
            isEqual(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
            greaterThan(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
        }
        greaterThan(QT_MINOR_VERSION, $$min) {
            return(true)
        }
    }
    greaterThan(QT_MAJOR_VERSION, $$maj) {
        return(true)
    }
    return(false)
}

isEqual(QT_MAJOR_VERSION, 5) {

# For use in custom compilers which just copy files
defineReplace(stripSrcDir) {
    return($$relative_path($$absolute_path($$1, $$OUT_PWD), $$_PRO_FILE_PWD_))
}

} else { # qt5

# For use in custom compilers which just copy files
win32:i_flag = i
defineReplace(stripSrcDir) {
    win32 {
        !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
    } else {
        !contains(1, ^/.*):1 = $$OUT_PWD/$$1
    }
    out = $$cleanPath($$1)
    out ~= s|^$$re_escape($$_PRO_FILE_PWD_/)||$$i_flag
    return($$out)
}

} # qt5

!isEmpty(BUILD_TESTS):TEST = 1

isEmpty(TEST):CONFIG(debug, debug|release) {
    !debug_and_release|build_pass {
        TEST = 1
    }
}

isEmpty(IDE_LIBRARY_BASENAME) {
    IDE_LIBRARY_BASENAME = lib
}

equals(TEST, 1) {
    QT +=testlib
    DEFINES += WITH_TESTS
}

IDE_SOURCE_TREE = $$PWD
isEmpty(IDE_BUILD_TREE) {
    sub_dir = $$_PRO_FILE_PWD_
    sub_dir ~= s,^$$re_escape($$PWD),,
    IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
    IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
macx {
    IDE_APP_TARGET   = "Qt Creator"
    IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DATA_PATH    = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DOC_PATH     = $$IDE_DATA_PATH/doc
    IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
    copydata = 1
    !isEqual(QT_MAJOR_VERSION, 5) {
        # we use @rpath which is 10.5+
        # Qt5 doesn't support 10.5, and will set the minimum version to 10.6 or 10.7.
        QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
        QMAKE_LFLAGS *= -mmacosx-version-min=10.5
    }
} else {
    contains(TEMPLATE, vc.*):vcproj = 1
    IDE_APP_TARGET   = qtcreator
    IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH/plugins
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
    IDE_DATA_PATH    = $$IDE_BUILD_TREE/share/qtcreator
    IDE_DOC_PATH     = $$IDE_BUILD_TREE/share/doc/qtcreator
    IDE_BIN_PATH     = $$IDE_APP_PATH
    !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
}

INCLUDEPATH += \
    $$IDE_BUILD_TREE/src \ # for <app/app_version.h>
    $$IDE_SOURCE_TREE/src/libs \
    $$IDE_SOURCE_TREE/tools

QTC_PLUGIN_DIRS = $$(QTC_PLUGIN_DIRS)
QTC_PLUGIN_DIRS += $$IDE_SOURCE_TREE/src/plugins
for(dir, QTC_PLUGIN_DIRS) {
    INCLUDEPATH += $$dir
}

CONFIG += depend_includepath

LIBS += -L$$IDE_LIBRARY_PATH

!isEmpty(vcproj) {
    DEFINES += IDE_LIBRARY_BASENAME=\"$$IDE_LIBRARY_BASENAME\"
} else {
    DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
}

DEFINES += QT_CREATOR QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
!macx:DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION

unix {
    CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
    CONFIG(release, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared

    CONFIG(debug, debug|release):MOC_DIR = $${OUT_PWD}/.moc/debug-shared
    CONFIG(release, debug|release):MOC_DIR = $${OUT_PWD}/.moc/release-shared

    RCC_DIR = $${OUT_PWD}/.rcc
    UI_DIR = $${OUT_PWD}/.uic
}

win32-msvc* {
    #Don't warn about sprintf, fopen etc being 'unsafe'
    DEFINES += _CRT_SECURE_NO_WARNINGS
    # Speed up startup time when debugging with cdb
    QMAKE_LFLAGS_DEBUG += /INCREMENTAL:NO
}

qt:greaterThan(QT_MAJOR_VERSION, 4) {
    contains(QT, core): QT += concurrent
    contains(QT, gui): QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900
}

QBSFILE = $$replace(_PRO_FILE_, \\.pro$, .qbs)
exists($$QBSFILE):OTHER_FILES += $$QBSFILE

# recursively resolve plugin deps
done_plugins =
for(ever) {
    isEmpty(QTC_PLUGIN_DEPENDS): \
        break()
    done_plugins += $$QTC_PLUGIN_DEPENDS
    for(dep, QTC_PLUGIN_DEPENDS) {
        dependencies_file =
        for(dir, QTC_PLUGIN_DIRS) {
            exists($$dir/$$dep/$${dep}_dependencies.pri) {
                dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
                break()
            }
        }
        isEmpty(dependencies_file): \
            error("Plugin dependency $$dep not found")
        include($$dependencies_file)
        LIBS += -l$$qtLibraryName($$QTC_PLUGIN_NAME)
    }
    QTC_PLUGIN_DEPENDS = $$unique(QTC_PLUGIN_DEPENDS)
    QTC_PLUGIN_DEPENDS -= $$unique(done_plugins)
}

# recursively resolve library deps
done_libs =
for(ever) {
    isEmpty(QTC_LIB_DEPENDS): \
        break()
    done_libs += $$QTC_LIB_DEPENDS
    for(dep, QTC_LIB_DEPENDS) {
        include($$PWD/src/libs/$$dep/$${dep}_dependencies.pri)
        LIBS += -l$$qtLibraryName($$QTC_LIB_NAME)
    }
    QTC_LIB_DEPENDS = $$unique(QTC_LIB_DEPENDS)
    QTC_LIB_DEPENDS -= $$unique(done_libs)
}


Fix sources path.

Fix sources path.

QTX.hid.MAJOR_VERSION = 0
QTX.hid.MINOR_VERSION = 0
QTX.hid.PATCH_VERSION = 0
QTX.hid.VERSION = $${QTX.hid.MAJOR_VERSION}.$${QTX.hid.MINOR_VERSION}.$${QTX.hid.PATCH_VERSION}

QTX.hid.name = QtxHid
QTX.hid.bins = $$PWD/../bin
QTX.hid.includes = $$PWD/../include
QTX.hid.sources = $$PWD/../src/hid
QTX.hid.libs = $$PWD/../lib
QTX.hid.plugins = $$PWD/../plugins
QTX.hid.imports = $$PWD/../imports

QTX.hid.MAJOR_VERSION = 0
QTX.hid.MINOR_VERSION = 0
QTX.hid.PATCH_VERSION = 0
QTX.hid.VERSION = $${QTX.hid.MAJOR_VERSION}.$${QTX.hid.MINOR_VERSION}.$${QTX.hid.PATCH_VERSION}

QTX.hid.name = QtxHid
QTX.hid.bins = $$PWD/../bin
QTX.hid.includes = $$PWD/../include
QTX.hid.sources = $$PWD/../src/version
QTX.hid.libs = $$PWD/../lib
QTX.hid.plugins = $$PWD/../plugins
QTX.hid.imports = $$PWD/../imports


Enhanced to work without warning and Qt 4.7 and lapack.

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

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

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

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

######################################################################
# $Revision: 1.128 $ $Author: shoops $ $Date: 2011/08/01 17:43:47 $
######################################################################

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

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

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

POST_TARGETDEPS += Makefile

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

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

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

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

DEFINES += WITH_CSPMETHOD

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

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

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

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

!contains(COPASI_SRC_PACKAGE, true)  {
  DEFINES += HAVE_MML
}

win32: STATIC_LINKAGE = yes

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

contains(BUILD_OS, WIN32) {
  CONFIG += debug_and_release

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

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

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

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

  DEFINES -= UNICODE
  DEFINES += _CRT_SECURE_NO_WARNINGS

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

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE *= -O2

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

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

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

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

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

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

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

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

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

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

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

  LIBS += shell32.lib

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

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

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

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

  LIBS += libsbml$${RUNTIME}.lib

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

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

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

  contains(CONFIG, qt) {
    LIBS    += SBW$${RUNTIME}.lib ws2_32.lib

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

      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES *= WIN32
    }

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

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

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

#    DEFINES        += QWT3D_NODLL

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

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

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

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

  LIBS += -lsbml -lexpat

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

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

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

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

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

contains(BUILD_OS, Linux) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

DEP1.target   = depend
DEP1.depends  = qmake

QMAKE_EXTRA_TARGETS += DEP1

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

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

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

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

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

######################################################################
# $Revision: 1.127 $ $Author: shoops $ $Date: 2011/05/25 15:12:17 $
######################################################################

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

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

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

POST_TARGETDEPS += Makefile

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

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

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

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

DEFINES += WITH_CSPMETHOD

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

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

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

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

!contains(COPASI_SRC_PACKAGE, true)  {
  DEFINES += HAVE_MML
}

win32: STATIC_LINKAGE = yes

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

contains(BUILD_OS, WIN32) {
  CONFIG += debug_and_release

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

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

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

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

  DEFINES -= UNICODE
  DEFINES += _CRT_SECURE_NO_WARNINGS

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

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE *= -O2

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

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

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

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

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

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

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

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

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

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

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

  LIBS += shell32.lib

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

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

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

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

  LIBS += libsbml$${RUNTIME}.lib

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

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

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

  contains(CONFIG, qt) {
    LIBS    += SBW$${RUNTIME}.lib ws2_32.lib

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

      DEFINES += COPASI_SBW_INTEGRATION
      DEFINES *= WIN32
    }

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

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

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

#    DEFINES        += QWT3D_NODLL

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

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

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

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

  LIBS += -lsbml -lexpat

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

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

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

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

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

contains(BUILD_OS, Linux) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

DEP1.target   = depend
DEP1.depends  = qmake

QMAKE_EXTRA_TARGETS += DEP1

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


remove unnecessary Qt configs

remove unnecessary Qt configs

Change-Id: I2dc2f7f1132168974d47f64331eb72b1ce83bcc0
Reviewed-by: Thomas Hartmann <588ee739c05aab7547907becfd1420d2b7316069@digia.com>

QT += core gui widgets qml quick network
QT += core-private qml-private quick-private gui-private

CONFIG += c++11

DEFINES -= QT_CREATOR

include (../instances/instances.pri)
include (instances/instances.pri)
include (../commands/commands.pri)
include (../container/container.pri)
include (../interfaces/interfaces.pri)
include (../types/types.pri)
include (../qmlprivategate/qmlprivategate.pri)

QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
!isEmpty(QT_BREAKPAD_ROOT_PATH) {
    include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
}

SOURCES +=  $$PWD/qml2puppetmain.cpp
RESOURCES +=  $$PWD/../qmlpuppet.qrc
DEFINES -= QT_NO_CAST_FROM_ASCII

DISTFILES += Info.plist

unix:!osx:LIBS += -lrt # posix shared memory

osx {
    CONFIG -= app_bundle
    QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$system_quote($$PWD/Info.plist)
} else {
    target.path  = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE)
    INSTALLS    += target
}

QT += core gui widgets qml quick network
!isEmpty(QT.webkit.name) {
    QT += webkit
}

!isEmpty(QT.v8.name) {
    QT += v8
}

QT += core-private qml-private quick-private gui-private

!isEmpty(QT.v8.name) {
    QT += v8-private
}

CONFIG += c++11

DEFINES -= QT_CREATOR

include (../instances/instances.pri)
include (instances/instances.pri)
include (../commands/commands.pri)
include (../container/container.pri)
include (../interfaces/interfaces.pri)
include (../types/types.pri)
include (../qmlprivategate/qmlprivategate.pri)

QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
!isEmpty(QT_BREAKPAD_ROOT_PATH) {
    include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
}

SOURCES +=  $$PWD/qml2puppetmain.cpp
RESOURCES +=  $$PWD/../qmlpuppet.qrc
DEFINES -= QT_NO_CAST_FROM_ASCII

DISTFILES += Info.plist

unix:!osx:LIBS += -lrt # posix shared memory

osx {
    CONFIG -= app_bundle
    QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$system_quote($$PWD/Info.plist)
} else {
    target.path  = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE)
    INSTALLS    += target
}


Enabled Freestyle 1.2 on Symbian

Enabled Freestyle 1.2 on Symbian

Task-number: MOBILITY-3104
Reviewed-by: Juha Kukkonen

CONFIG += release
CONFIG_WIN32 += debug_and_release build_all release
build_unit_tests = no
build_public_unit_tests = no
build_examples = no
build_demos = no
build_docs = no
build_tools = no
qmf_enabled = no
!symbian:isEmpty($$QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include
isEmpty($$QT_MOBILITY_LIB):QT_MOBILITY_LIB=$$QT_MOBILITY_PREFIX/lib
isEmpty($$QT_MOBILITY_BIN):QT_MOBILITY_BIN=$$QT_MOBILITY_PREFIX/bin
isEmpty($$QT_MOBILITY_PLUGINS):QT_MOBILITY_PLUGINS=$$QT_MOBILITY_PREFIX/plugins
isEmpty($$QT_MOBILITY_EXAMPLES):QT_MOBILITY_EXAMPLES=$$QT_MOBILITY_PREFIX/bin
isEmpty($$QT_MOBILITY_DEMOS):QT_MOBILITY_DEMOS=$$QT_MOBILITY_PREFIX/bin
mobility_modules = bearer location contacts systeminfo publishsubscribe versit messaging sensors serviceframework multimedia gallery organizer feedback connectivity
contains(mobility_modules,versit): mobility_modules *= contacts
contains(mobility_modules,connectivity): mobility_modules *= serviceframework
lbt_enabled = yes
snap_enabled = yes
occ_enabled = yes
symbianenote_enabled = no
symbiancntsim_enabled = yes
symbiancntmodel_enabled = yes
symbiancntmodelv2_enabled = no
sensors_s60_31_enabled = no
sensors_symbian_enabled = yes
sensors_symbian_light_enabled = no
hb_symbian_enabled = no
audiorouting_s60_enabled = yes
tunerlib_s60_enabled = no
radioutility_s60_enabled = yes
openmaxal_symbian_enabled = no
surfaces_s60_enabled = yes
messaging_freestyle_enabled = yes
messaging_freestyle_mapi12_enabled = yes
callinformation_symbian_enabled = yes
immersion_enabled = no
symbian_camera_camautofocus_enabled = no
symbian_camera_ecamadvsettings_enabled = yes
symbian_camera_devvideorecord_enabled = yes
advancedtouchfeedback_enabled = yes
chwrmhaptics_enabled = yes
mds_enabled = yes
mds_25_enabled = yes
mds_25_92mcl_enabled = yes
nfc_enabled = yes
btengconnman_symbian_enabled = yes
btengdevman_symbian_enabled = yes
MOBILITY_SD_MCL_BUILD = yes

CONFIG += release
CONFIG_WIN32 += debug_and_release build_all release
build_unit_tests = no
build_public_unit_tests = no
build_examples = no
build_demos = no
build_docs = no
build_tools = no
qmf_enabled = no
!symbian:isEmpty($$QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include
isEmpty($$QT_MOBILITY_LIB):QT_MOBILITY_LIB=$$QT_MOBILITY_PREFIX/lib
isEmpty($$QT_MOBILITY_BIN):QT_MOBILITY_BIN=$$QT_MOBILITY_PREFIX/bin
isEmpty($$QT_MOBILITY_PLUGINS):QT_MOBILITY_PLUGINS=$$QT_MOBILITY_PREFIX/plugins
isEmpty($$QT_MOBILITY_EXAMPLES):QT_MOBILITY_EXAMPLES=$$QT_MOBILITY_PREFIX/bin
isEmpty($$QT_MOBILITY_DEMOS):QT_MOBILITY_DEMOS=$$QT_MOBILITY_PREFIX/bin
mobility_modules = bearer location contacts systeminfo publishsubscribe versit messaging sensors serviceframework multimedia gallery organizer feedback connectivity
contains(mobility_modules,versit): mobility_modules *= contacts
contains(mobility_modules,connectivity): mobility_modules *= serviceframework
lbt_enabled = yes
snap_enabled = yes
occ_enabled = yes
symbianenote_enabled = no
symbiancntsim_enabled = yes
symbiancntmodel_enabled = yes
symbiancntmodelv2_enabled = no
sensors_s60_31_enabled = no
sensors_symbian_enabled = yes
sensors_symbian_light_enabled = no
hb_symbian_enabled = no
audiorouting_s60_enabled = yes
tunerlib_s60_enabled = no
radioutility_s60_enabled = yes
openmaxal_symbian_enabled = no
surfaces_s60_enabled = yes
messaging_freestyle_enabled = yes
messaging_freestyle_mapi12_enabled = no
callinformation_symbian_enabled = yes
immersion_enabled = no
symbian_camera_camautofocus_enabled = no
symbian_camera_ecamadvsettings_enabled = yes
symbian_camera_devvideorecord_enabled = yes
advancedtouchfeedback_enabled = yes
chwrmhaptics_enabled = yes
mds_enabled = yes
mds_25_enabled = yes
mds_25_92mcl_enabled = yes
nfc_enabled = yes
btengconnman_symbian_enabled = yes
btengdevman_symbian_enabled = yes
MOBILITY_SD_MCL_BUILD = yes