Add Nokia plugins in the path for non Nokia provider.

Nokia plugins (like Core) are needed for any other plugin.
Automatically add them, even if the PROVIDER is not Nokia.

Change-Id: I2b32d27b34fc1043f5f4a1e1607b24dc01c9c631
Reviewed-by: Eike Ziller <c142da16c73a95a82d35191bcc55b22835617128@nokia.com>

include(../qtcreator.pri)

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

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

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

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

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

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

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

contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols

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

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

TARGET = $$qtLibraryName($$TARGET)

include(../qtcreator.pri)

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

isEmpty(PROVIDER) {
    PROVIDER = Nokia
}

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

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

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

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

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

contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols

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

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

TARGET = $$qtLibraryName($$TARGET)


remove duplicate define

remove duplicate define

# Common definitions
QDJANGO_VERSION=0.2.0

# Determine library type (lib or staticlib)
isEmpty(QDJANGO_LIBRARY_TYPE) {
    QDJANGO_LIBRARY_TYPE = lib
}
contains(QDJANGO_LIBRARY_TYPE,staticlib) {
    DEFINES += QDJANGO_STATIC
} else {
    DEFINES += QDJANGO_SHARED
}
DEFINES += QDJANGO_BUILD


use private linkage where possible

use private linkage where possible

Change-Id: I01d27f1c493cf8108a9ff6e488e036bea7bfca12
Reviewed-by: Tor Arne Vestbø <455e994b14f100bcf4496f5548752c1ff193cc50@digia.com>
Reviewed-by: Jake Petroules <2d627e1cecd5435752fa500bacbe05f7cc90c369@petroules.com>
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@digia.com>
Reviewed-by: Morten Johan Sørvig <84fe11dd8bf63b99760f9a020e6b4a145681baec@digia.com>

INCLUDEPATH += $$PWD

mac {
    PUBLIC_HEADERS += $$PWD/qmacfunctions.h
    PRIVATE_HEADERS += $$PWD/qmacfunctions_p.h
    OBJECTIVE_SOURCES += $$PWD/qmacfunctions.mm

    ios {
        OBJECTIVE_SOURCES += \
            $$PWD/qmacfunctions_ios.mm

        LIBS_PRIVATE += -framework UIKit
    } else {
        PRIVATE_HEADERS += \
            $$PWD/qmacnativetoolbar_p.h \
            $$PWD/qmactoolbutton_p.h \
            $$PWD/qmactoolbardelegate_p.h \
            $$PWD/qnstoolbar_p.h

        OBJECTIVE_SOURCES += \
            $$PWD/qmacfunctions_mac.mm \
            $$PWD/qmacnativetoolbar.mm \
            $$PWD/qmactoolbardelegate.mm \
            $$PWD/qmactoolbutton.mm \
            $$PWD/qnstoolbar.mm

        greaterThan(QT_MAJOR_VERSION, 4) {
            PUBLIC_HEADERS += $$PWD/qmacpasteboardmime.h
            OBJECTIVE_SOURCES += $$PWD/qmacpasteboardmime.mm
        }

        LIBS_PRIVATE += -framework AppKit
    }
}

HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS

INCLUDEPATH += $$PWD

mac {
    PUBLIC_HEADERS += $$PWD/qmacfunctions.h
    PRIVATE_HEADERS += $$PWD/qmacfunctions_p.h
    OBJECTIVE_SOURCES += $$PWD/qmacfunctions.mm

    ios {
        OBJECTIVE_SOURCES += \
            $$PWD/qmacfunctions_ios.mm

        LIBS *= -framework UIKit
    } else {
        PRIVATE_HEADERS += \
            $$PWD/qmacnativetoolbar_p.h \
            $$PWD/qmactoolbutton_p.h \
            $$PWD/qmactoolbardelegate_p.h \
            $$PWD/qnstoolbar_p.h

        OBJECTIVE_SOURCES += \
            $$PWD/qmacfunctions_mac.mm \
            $$PWD/qmacnativetoolbar.mm \
            $$PWD/qmactoolbardelegate.mm \
            $$PWD/qmactoolbutton.mm \
            $$PWD/qnstoolbar.mm

        greaterThan(QT_MAJOR_VERSION, 4) {
            PUBLIC_HEADERS += $$PWD/qmacpasteboardmime.h
            OBJECTIVE_SOURCES += $$PWD/qmacpasteboardmime.mm
        }

        LIBS *= -framework AppKit
    }
}

HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS


Version 0.72

Version 0.72


Version 2.12

Version 2.12


Fix wrong header file name in QMLJS

Fix wrong header file name in QMLJS

Fix a qmake warning introduced in e1b44e870f5c15 .

Change-Id: I8f7913ceabc411044785634d1708fbc035b0a5c4
Reviewed-by: Thomas Hartmann <588ee739c05aab7547907becfd1420d2b7316069@digia.com>
Reviewed-by: Fawzi Mohamed <7388270c57edd0fabd71d8eb0322d66e3c40e57e@digia.com>

contains(CONFIG, dll) {
    DEFINES += QMLJS_BUILD_DIR
} else {
    DEFINES += QML_BUILD_STATIC_LIB
}

include(parser/parser.pri)

HEADERS += \
    $$PWD/qmljs_global.h \
    $$PWD/qmljsbind.h \
    $$PWD/qmljsbundle.h \
    $$PWD/qmljsevaluate.h \
    $$PWD/qmljsdocument.h \
    $$PWD/qmljsscanner.h \
    $$PWD/qmljsinterpreter.h \
    $$PWD/qmljslink.h \
    $$PWD/qmljscheck.h \
    $$PWD/qmljsscopebuilder.h \
    $$PWD/qmljslineinfo.h \
    $$PWD/qmljscompletioncontextfinder.h \
    $$PWD/qmljsmodelmanagerinterface.h \
    $$PWD/qmljsicontextpane.h \
    $$PWD/qmljspropertyreader.h \
    $$PWD/qmljsrewriter.h \
    $$PWD/qmljsicons.h \
    $$PWD/qmljsdelta.h \
    $$PWD/qmljstypedescriptionreader.h \
    $$PWD/qmljsscopeastpath.h \
    $$PWD/qmljsvalueowner.h \
    $$PWD/qmljscontext.h \
    $$PWD/qmljsscopechain.h \
    $$PWD/qmljsutils.h \
    $$PWD/qmljsstaticanalysismessage.h \
    $$PWD/jsoncheck.h \
    $$PWD/consolemanagerinterface.h \
    $$PWD/consoleitem.h \
    $$PWD/iscriptevaluator.h \
    $$PWD/qmljssimplereader.h \
    $$PWD/persistenttrie.h \
    $$PWD/qmljsqrcparser.h \
    $$PWD/qmljsconstants.h \
    $$PWD/qmljsimportdependencies.h \
    $$PWD/qmljsviewercontext.h

SOURCES += \
    $$PWD/qmljsbind.cpp \
    $$PWD/qmljsbundle.cpp \
    $$PWD/qmljsevaluate.cpp \
    $$PWD/qmljsdocument.cpp \
    $$PWD/qmljsscanner.cpp \
    $$PWD/qmljsinterpreter.cpp \
    $$PWD/qmljslink.cpp \
    $$PWD/qmljscheck.cpp \
    $$PWD/qmljsscopebuilder.cpp \
    $$PWD/qmljslineinfo.cpp \
    $$PWD/qmljscompletioncontextfinder.cpp \
    $$PWD/qmljsmodelmanagerinterface.cpp \
    $$PWD/qmljspropertyreader.cpp \
    $$PWD/qmljsrewriter.cpp \
    $$PWD/qmljsicons.cpp \
    $$PWD/qmljsdelta.cpp \
    $$PWD/qmljstypedescriptionreader.cpp \
    $$PWD/qmljsscopeastpath.cpp \
    $$PWD/qmljsvalueowner.cpp \
    $$PWD/qmljscontext.cpp \
    $$PWD/qmljsscopechain.cpp \
    $$PWD/qmljsutils.cpp \
    $$PWD/qmljsstaticanalysismessage.cpp \
    $$PWD/jsoncheck.cpp \
    $$PWD/consolemanagerinterface.cpp \
    $$PWD/consoleitem.cpp \
    $$PWD/qmljssimplereader.cpp \
    $$PWD/persistenttrie.cpp \
    $$PWD/qmljsqrcparser.cpp \
    $$PWD/qmljsimportdependencies.cpp \
    $$PWD/qmljsviewercontext.cpp

RESOURCES += \
    $$PWD/qmljs.qrc

OTHER_FILES += \
    $$PWD/parser/qmljs.g

contains(QT, gui) {
    SOURCES += \
        $$PWD/qmljsindenter.cpp \
        $$PWD/qmljscodeformatter.cpp \
        $$PWD/qmljsreformatter.cpp

    HEADERS += \
        $$PWD/qmljsindenter.h \
        $$PWD/qmljscodeformatter.h \
        $$PWD/qmljsreformatter.h
}

contains(CONFIG, dll) {
    DEFINES += QMLJS_BUILD_DIR
} else {
    DEFINES += QML_BUILD_STATIC_LIB
}

include(parser/parser.pri)

HEADERS += \
    $$PWD/qmljs_global.h \
    $$PWD/qmljsbind.h \
    $$PWD/qmljsbundle.h \
    $$PWD/qmljsevaluate.h \
    $$PWD/qmljsdocument.h \
    $$PWD/qmljsscanner.h \
    $$PWD/qmljsinterpreter.h \
    $$PWD/qmljslink.h \
    $$PWD/qmljscheck.h \
    $$PWD/qmljsscopebuilder.h \
    $$PWD/qmljslineinfo.h \
    $$PWD/qmljscompletioncontextfinder.h \
    $$PWD/qmljsmodelmanagerinterface.h \
    $$PWD/qmljsicontextpane.h \
    $$PWD/qmljspropertyreader.h \
    $$PWD/qmljsrewriter.h \
    $$PWD/qmljsicons.h \
    $$PWD/qmljsdelta.h \
    $$PWD/qmljstypedescriptionreader.h \
    $$PWD/qmljsscopeastpath.h \
    $$PWD/qmljsvalueowner.h \
    $$PWD/qmljscontext.h \
    $$PWD/qmljsscopechain.h \
    $$PWD/qmljsutils.h \
    $$PWD/qmljsstaticanalysismessage.h \
    $$PWD/jsoncheck.h \
    $$PWD/consolemanagerinterface.h \
    $$PWD/consoleitem.h \
    $$PWD/iscriptevaluator.h \
    $$PWD/qmljssimplereader.h \
    $$PWD/persistenttrie.h \
    $$PWD/qmljsqrcparser.h \
    $$PWD/qmljsconstants.h \
    $$PWD/qmljsimportdependencies.h \
    $$PWD/viewercontext.h

SOURCES += \
    $$PWD/qmljsbind.cpp \
    $$PWD/qmljsbundle.cpp \
    $$PWD/qmljsevaluate.cpp \
    $$PWD/qmljsdocument.cpp \
    $$PWD/qmljsscanner.cpp \
    $$PWD/qmljsinterpreter.cpp \
    $$PWD/qmljslink.cpp \
    $$PWD/qmljscheck.cpp \
    $$PWD/qmljsscopebuilder.cpp \
    $$PWD/qmljslineinfo.cpp \
    $$PWD/qmljscompletioncontextfinder.cpp \
    $$PWD/qmljsmodelmanagerinterface.cpp \
    $$PWD/qmljspropertyreader.cpp \
    $$PWD/qmljsrewriter.cpp \
    $$PWD/qmljsicons.cpp \
    $$PWD/qmljsdelta.cpp \
    $$PWD/qmljstypedescriptionreader.cpp \
    $$PWD/qmljsscopeastpath.cpp \
    $$PWD/qmljsvalueowner.cpp \
    $$PWD/qmljscontext.cpp \
    $$PWD/qmljsscopechain.cpp \
    $$PWD/qmljsutils.cpp \
    $$PWD/qmljsstaticanalysismessage.cpp \
    $$PWD/jsoncheck.cpp \
    $$PWD/consolemanagerinterface.cpp \
    $$PWD/consoleitem.cpp \
    $$PWD/qmljssimplereader.cpp \
    $$PWD/persistenttrie.cpp \
    $$PWD/qmljsqrcparser.cpp \
    $$PWD/qmljsimportdependencies.cpp \
    $$PWD/qmljsviewercontext.cpp

RESOURCES += \
    $$PWD/qmljs.qrc

OTHER_FILES += \
    $$PWD/parser/qmljs.g

contains(QT, gui) {
    SOURCES += \
        $$PWD/qmljsindenter.cpp \
        $$PWD/qmljscodeformatter.cpp \
        $$PWD/qmljsreformatter.cpp

    HEADERS += \
        $$PWD/qmljsindenter.h \
        $$PWD/qmljscodeformatter.h \
        $$PWD/qmljsreformatter.h
}


Workaround for qmake problem

Workaround for qmake problem

INCLUDEPATH += $$PWD
use_pkgconfig {
    QMAKE_CXXFLAGS += $$system(pkg-config --cflags wayland-server)
    #for some reason this is not included in the cflags line
    INCLUDEPATH += $$system(pkg-config --variable=includedir wayland-server)
    LIBS += $$system(pkg-config --libs wayland-server)
} else {
    INCLUDEPATH += $$PWD/../3rdparty/wayland
    LIBS += -L$$PWD/../../lib
    LIBS += -lwayland-server -lffi
}

wayland_gl {
    system(echo "Qt-Compositor configured with openGL")
    QT += opengl
    DEFINES += QT_COMPOSITOR_WAYLAND_GL
    use_pkgconfig {
        QMAKE_CXXFLAGS += $$system(pkg-config --cflags glesv2)
        #for some reason this is not included in the cflags line
        INCLUDEPATH += $$system(pkg-config --variable=includedir glesv2)
        LIBS += $$system(pkg-config --libs glesv2)
    }
} else {
    system(echo "Qt-Compositor configured as raster only compositor")
}

include ($$PWD/util/util.pri)
include ($$PWD/wayland_wrapper/wayland_wrapper.pri)
include ($$PWD/hardware_integration/hardware_integration.pri)
include ($$PWD/compositor_api/compositor_api.pri)

INCLUDEPATH += $$PWD
use_pkgconfig {
    QMAKE_CXXFLAGS += $$system(pkg-config --cflags wayland-server)
    #for some reason this is not included in the cflags line
    INCLUDEPATH += $$system(pkg-config --variable=includedir wayland-server)
    LIBS += $$system(pkg-config --libs wayland-server)
} else {
    INCLUDEPATH += $$PWD/../3rdparty/wayland
    LIBS += -lwayland-server -lffi
    LIBS += -L ../../lib
}

wayland_gl {
    system(echo "Qt-Compositor configured with openGL")
    QT += opengl
    DEFINES += QT_COMPOSITOR_WAYLAND_GL
    use_pkgconfig {
        QMAKE_CXXFLAGS += $$system(pkg-config --cflags glesv2)
        #for some reason this is not included in the cflags line
        INCLUDEPATH += $$system(pkg-config --variable=includedir glesv2)
        LIBS += $$system(pkg-config --libs glesv2)
    }
} else {
    system(echo "Qt-Compositor configured as raster only compositor")
}

include ($$PWD/util/util.pri)
include ($$PWD/wayland_wrapper/wayland_wrapper.pri)
include ($$PWD/hardware_integration/hardware_integration.pri)
include ($$PWD/compositor_api/compositor_api.pri)


remove tunrnserver

remove tunrnserver

QT += network
CONFIG += c++14 warn_on rtti_off create_prl object_parallel_to_source

win32-msvc* {
    QMAKE_CXXFLAGS_WARN_ON += -wd4100
} else {
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
}

SRCPATH = $$PWD/lib
INCLUDEPATH += $$SRCPATH

HEADERS += \
    $$SRCPATH/connectiondata.h \
    $$SRCPATH/connection.h \
    $$SRCPATH/eventitem.h \
    $$SRCPATH/room.h \
    $$SRCPATH/user.h \
    $$SRCPATH/avatar.h \
    $$SRCPATH/util.h \
    $$SRCPATH/events/event.h \
    $$SRCPATH/events/roomevent.h \
    $$SRCPATH/events/stateevent.h \
    $$SRCPATH/events/eventcontent.h \
    $$SRCPATH/events/roommessageevent.h \
    $$SRCPATH/events/simplestateevents.h \
    $$SRCPATH/events/roommemberevent.h \
    $$SRCPATH/events/roomavatarevent.h \
    $$SRCPATH/events/typingevent.h \
    $$SRCPATH/events/receiptevent.h \
    $$SRCPATH/events/callanswerevent.h \
    $$SRCPATH/events/callcandidatesevent.h \
    $$SRCPATH/events/callhangupevent.h \
    $$SRCPATH/events/callinviteevent.h \
    $$SRCPATH/events/accountdataevents.h \
    $$SRCPATH/events/directchatevent.h \
    $$SRCPATH/events/redactionevent.h \
    $$SRCPATH/events/eventloader.h \
    $$SRCPATH/jobs/requestdata.h \
    $$SRCPATH/jobs/basejob.h \
    $$SRCPATH/jobs/syncjob.h \
    $$SRCPATH/jobs/mediathumbnailjob.h \
    $$SRCPATH/jobs/downloadfilejob.h \
    $$SRCPATH/jobs/postreadmarkersjob.h \
    $$files($$SRCPATH/csapi/*.h, false) \
    $$files($$SRCPATH/csapi/definitions/*.h, false) \
    $$files($$SRCPATH/application-service/definitions/*.h, false) \
    $$SRCPATH/logging.h \
    $$SRCPATH/converters.h \
    $$SRCPATH/settings.h \
    $$SRCPATH/networksettings.h \
    $$SRCPATH/networkaccessmanager.h

SOURCES += \
    $$SRCPATH/connectiondata.cpp \
    $$SRCPATH/connection.cpp \
    $$SRCPATH/eventitem.cpp \
    $$SRCPATH/room.cpp \
    $$SRCPATH/user.cpp \
    $$SRCPATH/avatar.cpp \
    $$SRCPATH/util.cpp \
    $$SRCPATH/events/event.cpp \
    $$SRCPATH/events/roomevent.cpp \
    $$SRCPATH/events/stateevent.cpp \
    $$SRCPATH/events/eventcontent.cpp \
    $$SRCPATH/events/roommessageevent.cpp \
    $$SRCPATH/events/roommemberevent.cpp \
    $$SRCPATH/events/typingevent.cpp \
    $$SRCPATH/events/callanswerevent.cpp \
    $$SRCPATH/events/callcandidatesevent.cpp \
    $$SRCPATH/events/callhangupevent.cpp \
    $$SRCPATH/events/callinviteevent.cpp \
    $$SRCPATH/events/receiptevent.cpp \
    $$SRCPATH/events/directchatevent.cpp \
    $$SRCPATH/jobs/requestdata.cpp \
    $$SRCPATH/jobs/basejob.cpp \
    $$SRCPATH/jobs/syncjob.cpp \
    $$SRCPATH/jobs/mediathumbnailjob.cpp \
    $$SRCPATH/jobs/downloadfilejob.cpp \
    $$files($$SRCPATH/csapi/*.cpp, false) \
    $$files($$SRCPATH/csapi/definitions/*.cpp, false) \
    $$files($$SRCPATH/application-service/definitions/*.cpp, false) \
    $$SRCPATH/logging.cpp \
    $$SRCPATH/converters.cpp \
    $$SRCPATH/settings.cpp \
    $$SRCPATH/networksettings.cpp \
    $$SRCPATH/networkaccessmanager.cpp

QT += network
CONFIG += c++14 warn_on rtti_off create_prl object_parallel_to_source

win32-msvc* {
    QMAKE_CXXFLAGS_WARN_ON += -wd4100
} else {
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
}

SRCPATH = $$PWD/lib
INCLUDEPATH += $$SRCPATH

HEADERS += \
    $$SRCPATH/connectiondata.h \
    $$SRCPATH/connection.h \
    $$SRCPATH/eventitem.h \
    $$SRCPATH/room.h \
    $$SRCPATH/user.h \
    $$SRCPATH/avatar.h \
    $$SRCPATH/util.h \
    $$SRCPATH/events/event.h \
    $$SRCPATH/events/roomevent.h \
    $$SRCPATH/events/stateevent.h \
    $$SRCPATH/events/eventcontent.h \
    $$SRCPATH/events/roommessageevent.h \
    $$SRCPATH/events/simplestateevents.h \
    $$SRCPATH/events/roommemberevent.h \
    $$SRCPATH/events/roomavatarevent.h \
    $$SRCPATH/events/typingevent.h \
    $$SRCPATH/events/receiptevent.h \
    $$SRCPATH/events/callanswerevent.h \
    $$SRCPATH/events/callcandidatesevent.h \
    $$SRCPATH/events/callhangupevent.h \
    $$SRCPATH/events/callinviteevent.h \
    $$SRCPATH/events/accountdataevents.h \
    $$SRCPATH/events/directchatevent.h \
    $$SRCPATH/events/redactionevent.h \
    $$SRCPATH/events/eventloader.h \
    $$SRCPATH/jobs/requestdata.h \
    $$SRCPATH/jobs/basejob.h \
    $$SRCPATH/jobs/syncjob.h \
    $$SRCPATH/jobs/mediathumbnailjob.h \
    $$SRCPATH/jobs/turnserverjob.h \
    $$SRCPATH/jobs/downloadfilejob.h \
    $$SRCPATH/jobs/postreadmarkersjob.h \
    $$files($$SRCPATH/csapi/*.h, false) \
    $$files($$SRCPATH/csapi/definitions/*.h, false) \
    $$files($$SRCPATH/application-service/definitions/*.h, false) \
    $$SRCPATH/logging.h \
    $$SRCPATH/converters.h \
    $$SRCPATH/settings.h \
    $$SRCPATH/networksettings.h \
    $$SRCPATH/networkaccessmanager.h

SOURCES += \
    $$SRCPATH/connectiondata.cpp \
    $$SRCPATH/connection.cpp \
    $$SRCPATH/eventitem.cpp \
    $$SRCPATH/room.cpp \
    $$SRCPATH/user.cpp \
    $$SRCPATH/avatar.cpp \
    $$SRCPATH/util.cpp \
    $$SRCPATH/events/event.cpp \
    $$SRCPATH/events/roomevent.cpp \
    $$SRCPATH/events/stateevent.cpp \
    $$SRCPATH/events/eventcontent.cpp \
    $$SRCPATH/events/roommessageevent.cpp \
    $$SRCPATH/events/roommemberevent.cpp \
    $$SRCPATH/events/typingevent.cpp \
    $$SRCPATH/events/callanswerevent.cpp \
    $$SRCPATH/events/callcandidatesevent.cpp \
    $$SRCPATH/events/callhangupevent.cpp \
    $$SRCPATH/events/callinviteevent.cpp \
    $$SRCPATH/events/receiptevent.cpp \
    $$SRCPATH/events/directchatevent.cpp \
    $$SRCPATH/jobs/requestdata.cpp \
    $$SRCPATH/jobs/basejob.cpp \
    $$SRCPATH/jobs/syncjob.cpp \
    $$SRCPATH/jobs/mediathumbnailjob.cpp \
    $$SRCPATH/jobs/turnserverjob.cpp \
    $$SRCPATH/jobs/downloadfilejob.cpp \
    $$files($$SRCPATH/csapi/*.cpp, false) \
    $$files($$SRCPATH/csapi/definitions/*.cpp, false) \
    $$files($$SRCPATH/application-service/definitions/*.cpp, false) \
    $$SRCPATH/logging.cpp \
    $$SRCPATH/converters.cpp \
    $$SRCPATH/settings.cpp \
    $$SRCPATH/networksettings.cpp \
    $$SRCPATH/networkaccessmanager.cpp


deployment: fixed missing force option in rm call

include(../paths.pri)
TARGETPATH = $$replace(uri, \\., /)
DESTDIR = $$OUT_PWD/../../imports/$$TARGETPATH

isEmpty(PLUGIN_VERSION): PLUGIN_VERSION = 1.0

# ========== copy additional files ==========
copyqmlinfra.input = QML_INFRA_FILES
copyqmlinfra.output = $$OUT_PWD/../../imports/$$TARGETPATH/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
!win32: copyqmlinfra.commands = $$QMAKE_MKDIR $$shell_path($$dirname(copyqmlinfra.output)) $$escape_expand(\n\t)
copyqmlinfra.commands +=  $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copyqmlinfra.CONFIG += no_link no_clean
copyqmlinfra.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlinfra

copyqmldesigner.input = QML_DESIGNER_FILES
copyqmldesigner.output = $$OUT_PWD/../../imports/$$TARGETPATH/designer/
copyqmldesigner.commands = $(COPY_DIR) ${QMAKE_FILE_IN} $$shell_path($$OUT_PWD/../../imports/$$TARGETPATH/designer/)
copyqmldesigner.CONFIG += no_link no_clean
copyqmldesigner.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmldesigner

copyqmlpropertyeditor.input = QML_PROPERTY_EDITOR_FILES
copyqmlpropertyeditor.output = $$OUT_PWD/../../imports/$$TARGETPATH/propertyEditorQmlSources/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
!win32: copyqmlpropertyeditor.commands = $$QMAKE_MKDIR $$shell_path($$dirname(copyqmlpropertyeditor.output)) $$escape_expand(\n\t)
copyqmlpropertyeditor.commands += $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copyqmlpropertyeditor.CONFIG += no_link no_clean
copyqmlpropertyeditor.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlpropertyeditor

win32: QMAKE_DEL_FILE = del /q
!win32:QMAKE_DEL_FILE = rm -r -f
QMAKE_CLEAN += $$OUT_PWD/../../imports/$$TARGETPATH/

# ========== install additional files ==========
!android: !ios: {
    dumppluginqmltypes.CONFIG = no_files no_path
    dumppluginqmltypes.commands = $$dirname(QMAKE_QMAKE)/qmlplugindump "$$uri $$PLUGIN_VERSION $$shell_path($$OUT_PWD/../../imports/) > $$shell_path($$OUT_PWD/../../imports/$$TARGETPATH/plugins.qmltypes)"
    INSTALLS += dumppluginqmltypes

    copypluginqmltypes.CONFIG = no_files no_path
    !win32: copypluginqmltypes.commands = $$QMAKE_MKDIR $$shell_path($$[QT_INSTALL_QML]/$$TARGETPATH/) $$escape_expand(\n\t)
    copypluginqmltypes.commands += $$QMAKE_COPY $$shell_path($$OUT_PWD/../../imports/$$TARGETPATH/plugins.qmltypes) $$shell_path($$[QT_INSTALL_QML]/$$TARGETPATH/plugins.qmltypes)
    INSTALLS += copypluginqmltypes
}

copyqmlinfra_install.files = $$QML_INFRA_FILES
copyqmlinfra_install.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += copyqmlinfra_install

copyqmldesigner_install.files = $$QML_DESIGNER_FILES
copyqmldesigner_install.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += copyqmldesigner_install

copyqmlpropertyeditor_install.files = $$QML_PROPERTY_EDITOR_FILES
copyqmlpropertyeditor_install.path = $$QTCREATOR_INSTALL_DIR/share/qtcreator/qmldesigner/propertyEditorQmlSources/$$TARGETPATH
INSTALLS += copyqmlpropertyeditor_install

target.path = $$[QT_INSTALL_QML]/$$TARGETPATH

INSTALLS += target

OTHER_FILES += $$QML_INFRA_FILES $$QML_DESIGNER_FILES $$QML_PROPERTY_EDITOR_FILES

include(../paths.pri)
TARGETPATH = $$replace(uri, \\., /)
DESTDIR = $$OUT_PWD/../../imports/$$TARGETPATH

isEmpty(PLUGIN_VERSION): PLUGIN_VERSION = 1.0

# ========== copy additional files ==========
copyqmlinfra.input = QML_INFRA_FILES
copyqmlinfra.output = $$OUT_PWD/../../imports/$$TARGETPATH/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
!win32: copyqmlinfra.commands = $$QMAKE_MKDIR $$shell_path($$dirname(copyqmlinfra.output)) $$escape_expand(\n\t)
copyqmlinfra.commands +=  $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copyqmlinfra.CONFIG += no_link no_clean
copyqmlinfra.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlinfra

copyqmldesigner.input = QML_DESIGNER_FILES
copyqmldesigner.output = $$OUT_PWD/../../imports/$$TARGETPATH/designer/
copyqmldesigner.commands = $(COPY_DIR) ${QMAKE_FILE_IN} $$shell_path($$OUT_PWD/../../imports/$$TARGETPATH/designer/)
copyqmldesigner.CONFIG += no_link no_clean
copyqmldesigner.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmldesigner

copyqmlpropertyeditor.input = QML_PROPERTY_EDITOR_FILES
copyqmlpropertyeditor.output = $$OUT_PWD/../../imports/$$TARGETPATH/propertyEditorQmlSources/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
!win32: copyqmlpropertyeditor.commands = $$QMAKE_MKDIR $$shell_path($$dirname(copyqmlpropertyeditor.output)) $$escape_expand(\n\t)
copyqmlpropertyeditor.commands += $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copyqmlpropertyeditor.CONFIG += no_link no_clean
copyqmlpropertyeditor.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlpropertyeditor

win32: QMAKE_DEL_FILE = del /q
!win32:QMAKE_DEL_FILE = rm -r
QMAKE_CLEAN += $$OUT_PWD/../../imports/$$TARGETPATH/

# ========== install additional files ==========
!android: !ios: {
    dumppluginqmltypes.CONFIG = no_files no_path
    dumppluginqmltypes.commands = $$dirname(QMAKE_QMAKE)/qmlplugindump "$$uri $$PLUGIN_VERSION $$shell_path($$OUT_PWD/../../imports/) > $$shell_path($$OUT_PWD/../../imports/$$TARGETPATH/plugins.qmltypes)"
    INSTALLS += dumppluginqmltypes

    copypluginqmltypes.CONFIG = no_files no_path
    !win32: copypluginqmltypes.commands = $$QMAKE_MKDIR $$shell_path($$[QT_INSTALL_QML]/$$TARGETPATH/) $$escape_expand(\n\t)
    copypluginqmltypes.commands += $$QMAKE_COPY $$shell_path($$OUT_PWD/../../imports/$$TARGETPATH/plugins.qmltypes) $$shell_path($$[QT_INSTALL_QML]/$$TARGETPATH/plugins.qmltypes)
    INSTALLS += copypluginqmltypes
}

copyqmlinfra_install.files = $$QML_INFRA_FILES
copyqmlinfra_install.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += copyqmlinfra_install

copyqmldesigner_install.files = $$QML_DESIGNER_FILES
copyqmldesigner_install.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += copyqmldesigner_install

copyqmlpropertyeditor_install.files = $$QML_PROPERTY_EDITOR_FILES
copyqmlpropertyeditor_install.path = $$QTCREATOR_INSTALL_DIR/share/qtcreator/qmldesigner/propertyEditorQmlSources/$$TARGETPATH
INSTALLS += copyqmlpropertyeditor_install

target.path = $$[QT_INSTALL_QML]/$$TARGETPATH

INSTALLS += target

OTHER_FILES += $$QML_INFRA_FILES $$QML_DESIGNER_FILES $$QML_PROPERTY_EDITOR_FILES


qmake build: Mark plugins as plugins

qmake build: Mark plugins as plugins

It's unclear why this was only done for Unix targets.

Fixes: QBS-1529
Change-Id: Id853871af68eeaa1104c8124e6a3e7bfd3f9883d
Reviewed-by: Alessandro Portale <c4179e69990f13917ee3505a5fdf6c5eb1b74ff4@qt.io>

include(qbs_plugin_common.pri)

TARGET = $$qbsPluginTarget
DESTDIR = $$qbsPluginDestDir

isEmpty(QBSLIBDIR): QBSLIBDIR = $$OUT_PWD/../../../../$${QBS_LIBRARY_DIRNAME}
isEmpty(QBS_RPATH): QBS_RPATH = ../..
include($${PWD}/../lib/corelib/use_corelib.pri)

TEMPLATE = lib

CONFIG += c++14
CONFIG(static, static|shared): CONFIG += create_prl
CONFIG += plugin

!isEmpty(QBS_PLUGINS_INSTALL_DIR): \
    installPrefix = $${QBS_PLUGINS_INSTALL_DIR}
else: \
    installPrefix = $${QBS_INSTALL_PREFIX}/$${QBS_LIBRARY_DIRNAME}
target.path = $${installPrefix}/qbs/plugins
INSTALLS += target

include(qbs_plugin_common.pri)

TARGET = $$qbsPluginTarget
DESTDIR = $$qbsPluginDestDir

isEmpty(QBSLIBDIR): QBSLIBDIR = $$OUT_PWD/../../../../$${QBS_LIBRARY_DIRNAME}
isEmpty(QBS_RPATH): QBS_RPATH = ../..
include($${PWD}/../lib/corelib/use_corelib.pri)

TEMPLATE = lib

CONFIG += c++14
CONFIG(static, static|shared): CONFIG += create_prl
unix: CONFIG += plugin

!isEmpty(QBS_PLUGINS_INSTALL_DIR): \
    installPrefix = $${QBS_PLUGINS_INSTALL_DIR}
else: \
    installPrefix = $${QBS_INSTALL_PREFIX}/$${QBS_LIBRARY_DIRNAME}
target.path = $${installPrefix}/qbs/plugins
INSTALLS += target


Premature switch to R 4

Premature switch to R 4

#Used for common JASP qmake build settings

#Jasp-R-Interface
JASP_R_INTERFACE_TARGET = R-Interface

JASP_R_INTERFACE_MAJOR_VERSION =  10  # Interface changes or whenever you feel majorlike
JASP_R_INTERFACE_MINOR_VERSION =  9   # Code changes

JASP_R_INTERFACE_NAME = $$JASP_R_INTERFACE_TARGET$$JASP_R_INTERFACE_MAJOR_VERSION'.'$$JASP_R_INTERFACE_MINOR_VERSION

#R settings
CURRENT_R_VERSION = 3.6
DEFINES += "CURRENT_R_VERSION=\"$$CURRENT_R_VERSION\""

#JASP Version
JASP_VERSION_MAJOR      = 0
JASP_VERSION_MINOR      = 15
JASP_VERSION_REVISION   = 0
JASP_VERSION_BUILD      = 0 #Should be ignored because the code handling it is buggy as hell (aka https://www.youtube.com/watch?v=otCpCn0l4Wo )

DEFINES +=    "JASP_VERSION_MAJOR=$$JASP_VERSION_MAJOR"
DEFINES +=    "JASP_VERSION_MINOR=$$JASP_VERSION_MINOR"
DEFINES +=    "JASP_VERSION_BUILD=$$JASP_VERSION_BUILD"
DEFINES += "JASP_VERSION_REVISION=$$JASP_VERSION_REVISION"

GIT_EXEC=git #Unix knows where to find things
windows { #Windows is not so sure
	_GIT_LOCATION = $$(GIT_LOCATION)
	isEmpty(_GIT_LOCATION): _GIT_LOCATION="C:\Program Files\Git" #default assumption, if you want to change it then set the GIT_LOCATION environment variable (For instance under Projects->Run)

	GIT_EXEC = $${_GIT_LOCATION}\bin\git.exe

        DEFINES += WIN32_LEAN_AND_MEAN
}

GIT_BRANCH=$$system(\"$$GIT_EXEC\" rev-parse --abbrev-ref HEAD)
GIT_COMMIT=$$system(\"$$GIT_EXEC\" rev-parse --verify HEAD)

DEFINES += GIT_CURRENT_BRANCH=\"$$GIT_BRANCH\"
DEFINES += GIT_CURRENT_COMMIT=\"$$GIT_COMMIT\"

JASP_REQUIRED_FILES = $$PWD/../jasp-required-files

#message(using JASP_REQUIRED_FILES of $$JASP_REQUIRED_FILES)

INCLUDEPATH += $$JASP_REQUIRED_FILES/boost_1_71_0/

BUILDING_JASP_ENGINE=false
DEFINES += PRINT_ENGINE_MESSAGES

#macx | windows | exists(/app/lib/*) {
#	message(using libjson static)
  DEFINES += JASP_LIBJSON_STATIC # lets just always use libjson-static, they keep moving the include files...
#} else {
#    linux {
#        message(using libjson from distro and pkgconfig)
#        QT_CONFIG -= no-pkg-config
#        CONFIG += link_pkgconfig
#        PKGCONFIG += jsoncpp
#        LIBS += -ljsoncpp
#
#        CONFIG(debug, debug|release) {  DEFINES+=JASP_DEBUG }
#    }
#}

exists(/app/lib/*) {
  linux:  DEFINES += FLATPAK_USED
} else {
  linux:	CONFIG(debug, debug|release)  {
    DEFINES += JASP_DEBUG
    DEFINES += LINUX_NOT_FLATPAK
  }
}
macx | windows { CONFIG(debug, debug|release) {  DEFINES += JASP_DEBUG } }

windows {
	#message(QT_ARCH $$QT_ARCH)
	contains(QT_ARCH, i386) {
		ARCH = i386
		BOOST_ARCH = x32
	} else {
		ARCH = x64
		BOOST_ARCH = x64
	}

        CONFIG(ReleaseBuild)    { BOOST_POSTFIX = -vc142-mt-$${BOOST_ARCH}-1_71 }
        CONFIG(DebugBuild)      { BOOST_POSTFIX = -vc142-mt-gd-$${BOOST_ARCH}-1_71 }

	QMAKE_CXXFLAGS	+= -DBOOST_USE_WINDOWS_H -DNOMINMAX -DBOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
}

unix: QMAKE_CXXFLAGS += -Werror=return-type

#want to use JASPTIMER_* ? set JASPTIMER_USED to true, run qmake and rebuild the objects that use these macros (or just rebuild everything to be sure)
JASPTIMER_USED = false

$$JASPTIMER_USED {
    DEFINES += PROFILE_JASP
}

exists(/app/lib/*)	{
  INSTALLPATH = /app/bin
 } else	{
  INSTALLPATH = /usr/bin
}

DEFINES += QT_NO_FOREACH #Come on Qt we can just use the nice new ranged for from c++11 and higher, we dont need your help!

macx {
  QMAKE_CXXFLAGS_WARN_ON  += -Wno-unused-parameter -Wno-unused-local-typedef
  QMAKE_CXXFLAGS          += -Wno-c++11-extensions -Wno-c++11-long-long -Wno-c++11-extra-semi -stdlib=libc++ -Wno-deprecated-declarations

  CONFIG(debug): QMAKE_CXXFLAGS +=  -fstandalone-debug
}

#uncomment the following line to enable automatic encoding and decoding of columnNames. Be sure to recompile all necessary objects
DEFINES += JASP_COLUMN_ENCODE_ALL

#Used for common JASP qmake build settings

#Jasp-R-Interface
JASP_R_INTERFACE_TARGET = R-Interface

JASP_R_INTERFACE_MAJOR_VERSION =  10  # Interface changes or whenever you feel majorlike
JASP_R_INTERFACE_MINOR_VERSION =  9   # Code changes

JASP_R_INTERFACE_NAME = $$JASP_R_INTERFACE_TARGET$$JASP_R_INTERFACE_MAJOR_VERSION'.'$$JASP_R_INTERFACE_MINOR_VERSION

#R settings
CURRENT_R_VERSION = 4.0
DEFINES += "CURRENT_R_VERSION=\"$$CURRENT_R_VERSION\""

#JASP Version
JASP_VERSION_MAJOR      = 0
JASP_VERSION_MINOR      = 15
JASP_VERSION_REVISION   = 0
JASP_VERSION_BUILD      = 0 #Should be ignored because the code handling it is buggy as hell (aka https://www.youtube.com/watch?v=otCpCn0l4Wo )

DEFINES +=    "JASP_VERSION_MAJOR=$$JASP_VERSION_MAJOR"
DEFINES +=    "JASP_VERSION_MINOR=$$JASP_VERSION_MINOR"
DEFINES +=    "JASP_VERSION_BUILD=$$JASP_VERSION_BUILD"
DEFINES += "JASP_VERSION_REVISION=$$JASP_VERSION_REVISION"

GIT_EXEC=git #Unix knows where to find things
windows { #Windows is not so sure
	_GIT_LOCATION = $$(GIT_LOCATION)
	isEmpty(_GIT_LOCATION): _GIT_LOCATION="C:\Program Files\Git" #default assumption, if you want to change it then set the GIT_LOCATION environment variable (For instance under Projects->Run)

	GIT_EXEC = $${_GIT_LOCATION}\bin\git.exe

        DEFINES += WIN32_LEAN_AND_MEAN
}

GIT_BRANCH=$$system(\"$$GIT_EXEC\" rev-parse --abbrev-ref HEAD)
GIT_COMMIT=$$system(\"$$GIT_EXEC\" rev-parse --verify HEAD)

DEFINES += GIT_CURRENT_BRANCH=\"$$GIT_BRANCH\"
DEFINES += GIT_CURRENT_COMMIT=\"$$GIT_COMMIT\"

JASP_REQUIRED_FILES = $$PWD/../jasp-required-files

#message(using JASP_REQUIRED_FILES of $$JASP_REQUIRED_FILES)

INCLUDEPATH += $$JASP_REQUIRED_FILES/boost_1_71_0/

BUILDING_JASP_ENGINE=false
DEFINES += PRINT_ENGINE_MESSAGES

#macx | windows | exists(/app/lib/*) {
#	message(using libjson static)
  DEFINES += JASP_LIBJSON_STATIC # lets just always use libjson-static, they keep moving the include files...
#} else {
#    linux {
#        message(using libjson from distro and pkgconfig)
#        QT_CONFIG -= no-pkg-config
#        CONFIG += link_pkgconfig
#        PKGCONFIG += jsoncpp
#        LIBS += -ljsoncpp
#
#        CONFIG(debug, debug|release) {  DEFINES+=JASP_DEBUG }
#    }
#}

exists(/app/lib/*) {
  linux:  DEFINES += FLATPAK_USED
} else {
  linux:	CONFIG(debug, debug|release)  {
    DEFINES += JASP_DEBUG
    DEFINES += LINUX_NOT_FLATPAK
  }
}
macx | windows { CONFIG(debug, debug|release) {  DEFINES += JASP_DEBUG } }

windows {
	#message(QT_ARCH $$QT_ARCH)
	contains(QT_ARCH, i386) {
		ARCH = i386
		BOOST_ARCH = x32
	} else {
		ARCH = x64
		BOOST_ARCH = x64
	}

        CONFIG(ReleaseBuild)    { BOOST_POSTFIX = -vc142-mt-$${BOOST_ARCH}-1_71 }
        CONFIG(DebugBuild)      { BOOST_POSTFIX = -vc142-mt-gd-$${BOOST_ARCH}-1_71 }

	QMAKE_CXXFLAGS	+= -DBOOST_USE_WINDOWS_H -DNOMINMAX -DBOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
}

unix: QMAKE_CXXFLAGS += -Werror=return-type

#want to use JASPTIMER_* ? set JASPTIMER_USED to true, run qmake and rebuild the objects that use these macros (or just rebuild everything to be sure)
JASPTIMER_USED = false

$$JASPTIMER_USED {
    DEFINES += PROFILE_JASP
}

exists(/app/lib/*)	{
  INSTALLPATH = /app/bin
 } else	{
  INSTALLPATH = /usr/bin
}

DEFINES += QT_NO_FOREACH #Come on Qt we can just use the nice new ranged for from c++11 and higher, we dont need your help!

macx {
  QMAKE_CXXFLAGS_WARN_ON  += -Wno-unused-parameter -Wno-unused-local-typedef
  QMAKE_CXXFLAGS          += -Wno-c++11-extensions -Wno-c++11-long-long -Wno-c++11-extra-semi -stdlib=libc++ -Wno-deprecated-declarations

  CONFIG(debug): QMAKE_CXXFLAGS +=  -fstandalone-debug
}

#uncomment the following line to enable automatic encoding and decoding of columnNames. Be sure to recompile all necessary objects
DEFINES += JASP_COLUMN_ENCODE_ALL


Changes: Bump version to 0.80.3

Changes: Bump version to 0.80.3

Full, original commit at cf36d0129dc3cf0bd00b46dbe9e15ce951616428 in maliit-framework

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

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

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

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

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

isEmpty(M_IM_VERSION) {
    M_IM_VERSION=$$MALIIT_VERSION
}

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

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

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

isEmpty(M_IM_ENABLE_MULTITOUCH) {

    M_IM_ENABLE_MULTITOUCH=true
}

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

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

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

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

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

DEFINES += MALIIT_FRAMEWORK_USE_INTERNAL_API

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

!nomeegotouch {
    DEFINES += HAVE_MEEGOTOUCH
}

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

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

    MALIIT_IN_DIR = $$IN_PWD
    MALIIT_OUT_DIR = $$OUT_PWD

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

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

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

    return(true)
}

defineTest(outputFiles) {
    files = $$ARGS

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

    return(true)
}

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

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

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

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

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

isEmpty(M_IM_VERSION) {
    M_IM_VERSION=$$MALIIT_VERSION
}

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

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

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

isEmpty(M_IM_ENABLE_MULTITOUCH) {

    M_IM_ENABLE_MULTITOUCH=true
}

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

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

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

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

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

DEFINES += MALIIT_FRAMEWORK_USE_INTERNAL_API

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

!nomeegotouch {
    DEFINES += HAVE_MEEGOTOUCH
}

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

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

    MALIIT_IN_DIR = $$IN_PWD
    MALIIT_OUT_DIR = $$OUT_PWD

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

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

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

    return(true)
}

defineTest(outputFiles) {
    files = $$ARGS

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

    return(true)
}


Removed config.pri

Removed config.pri


fixed error on plugin path in tests

fixed error on plugin path in tests

TEMPLATE = app
QT += testlib
CONFIG += testcase c++11

INCLUDEPATH += $$PWD/../../modules/Qnite/plugin/

isEmpty(DESTDIR) {
    DESTDIR = ../bin
    LIBS += -L$$OUT_PWD/../../../modules/Qnite/ -lqnite
    QMAKE_RPATHDIR += $$OUT_PWD/../bin

    plugin_testdeps.target = qnite_plugin_testdeps
    plugin_testdeps.commands = $(COPY_FILE) $$OUT_PWD/../../../modules/Qnite/libqnite.so $$OUT_PWD/../bin
    QMAKE_EXTRA_TARGETS += plugin_testdeps
    PRE_TARGETDEPS += $$plugin_testdeps.target

} else {
    LIBS += -L$$DESTDIR/Qnite -lqnite
    QMAKE_RPATHDIR += $$DESTDIR/Qnite
    DESTDIR = $$DESTDIR/tests
}

TEMPLATE = app
QT += testlib
CONFIG += testcase c++11

INCLUDEPATH += $$PWD/../../modules/Qnite/plugin/

isEmpty(DESTDIR) {
    DESTDIR = ../bin
    LIBS += -L$$OUT_PWD/../../../modules/Qnite/ -lqnite
    QMAKE_RPATHDIR += $$OUT_PWD/../bin/

    plugin_testdeps.target = qnite_plugin_testdeps
    plugin_testdeps.commands = $(COPY_FILE) $$OUT_PWD/../../modules/Qnite/libqnite.so $$OUT_PWD/../plugin/bin
    QMAKE_EXTRA_TARGETS += plugin_testdeps
    PRE_TARGETDEPS += $$plugin_testdeps.target

} else {
    LIBS += -L$$DESTDIR/Qnite -lqnite
    QMAKE_RPATHDIR += $$DESTDIR/Qnite
    DESTDIR = $$DESTDIR/tests
}


Rmoved QTFIREBASE_BUILD_AUTHENTICATE, this is not done yet

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

DEFINES += QTFIREBASE_FAKE_BUILD

QTFIREBASE_FAKE_PATH = $$PWD/fake
INCLUDEPATH += $$QTFIREBASE_FAKE_PATH

QML_IMPORT_PATH += $$PWD

HEADERS += \
    #$$QTFIREBASE_FAKE_PATH/qtfirebase.h \
    $$QTFIREBASE_FAKE_PATH/src/qtfirebase.h \
    \

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

# Analytics
contains(DEFINES,QTFIREBASE_BUILD_ANALYTICS) {
    HEADERS += $$QTFIREBASE_FAKE_PATH/src/qtfirebaseanalytics.h
}

# Messaging
contains(DEFINES,QTFIREBASE_BUILD_MESSAGING) {
    HEADERS += $$QTFIREBASE_FAKE_PATH/src/qtfirebasemessaging.h
}

# AdMob
contains(DEFINES,QTFIREBASE_BUILD_ADMOB) {
    HEADERS += $$QTFIREBASE_FAKE_PATH/src/qtfirebaseadmob.h
}

# Remote Config
contains(DEFINES,QTFIREBASE_BUILD_REMOTE_CONFIG) {
    HEADERS += $$QTFIREBASE_FAKE_PATH/src/qtfirebaseremoteconfig.h
}

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

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

DEFINES += QTFIREBASE_FAKE_BUILD

QTFIREBASE_FAKE_PATH = $$PWD/fake
INCLUDEPATH += $$QTFIREBASE_FAKE_PATH

QML_IMPORT_PATH += $$PWD

HEADERS += \
    #$$QTFIREBASE_FAKE_PATH/qtfirebase.h \
    $$QTFIREBASE_FAKE_PATH/src/qtfirebase.h \
    \

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

# Analytics
contains(DEFINES,QTFIREBASE_BUILD_ANALYTICS) {
    HEADERS += $$QTFIREBASE_FAKE_PATH/src/qtfirebaseanalytics.h
}

# Messaging
contains(DEFINES,QTFIREBASE_BUILD_MESSAGING) {
    HEADERS += $$QTFIREBASE_FAKE_PATH/src/qtfirebasemessaging.h
}

# AdMob
contains(DEFINES,QTFIREBASE_BUILD_ADMOB) {
    HEADERS += $$QTFIREBASE_FAKE_PATH/src/qtfirebaseadmob.h
}

# Remote Config
contains(DEFINES,QTFIREBASE_BUILD_REMOTE_CONFIG) {
    HEADERS += $$QTFIREBASE_FAKE_PATH/src/qtfirebaseremoteconfig.h
}

# Remote Config
contains(DEFINES,QTFIREBASE_BUILD_AUTHENTICATE) {
    HEADERS += $$QTFIREBASE_FAKE_PATH/src/qtfirebaseauthenticate.h
}

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


Updating for recent qt-pods.

Updating for recent qt-pods.

INCLUDEPATH += \
    $$PWD

LIBS += \
    -L../qton -lqton


Add mechanism to avoid double inclusion

Add mechanism to avoid double inclusion

!contains( INCLUDEPATH, $$PWD ) {
    INCLUDEPATH += $$PWD

    HEADERS += \
        $$PWD/include/fiol.h

    SOURCES += \
        $$PWD/src/fiolBReadBE.c \
        $$PWD/src/fiolBReadLE.c \
        $$PWD/src/fiolBReadUBE.c \
        $$PWD/src/fiolBReadULE.c \
        $$PWD/src/fiolSReadChar.c \
        $$PWD/src/fiolSReadInt.c \
        $$PWD/src/fiolSReadFloat.c \
        $$PWD/src/fiolSReadDouble.c \
        $$PWD/src/fiolSReadUInt.c \
        $$PWD/src/fiolSWriteChar.c \
        $$PWD/src/fiolSWriteInt.c \
        $$PWD/src/fiolSWriteFloat.c \
        $$PWD/src/fiolSWriteDouble.c \
        $$PWD/src/fiolSWriteUInt.c
}


install step remastered

install step remastered

ADMOB_PATH = $$PWD/3rd/QtAdMob
GOOGLE_ANALITICS_PATH = $$PWD/3rd/qt-google-analytics

include($$ADMOB_PATH/QtAdMob.pri)
include($$GOOGLE_ANALITICS_PATH/qt-google-analytics.pri)

QT += qml quick widgets

HEADERS += $$PWD/adctl.h $$PWD/platform/AdCtl_platform_interface.h
SOURCES += $$PWD/adctl.cpp $$PWD/platform/AdCtl_platform_interface.cpp
RESOURCES += $$PWD/adctl.qrc

INCLUDEPATH += $$ADMOB_PATH
INCLUDEPATH += $$GOOGLE_ANALITICS_PATH

OTHER_FILES += README.md

!ios {
    !android {
        INCLUDEPATH += $$PWD/platform/other
        HEADERS += $$PWD/platform/other/AdCtl_platform.h
    }
}

ios {
    INCLUDEPATH += $$PWD/platform/ios
    HEADERS += $$PWD/platform/ios/AdCtl_platform.h
    OBJECTIVE_SOURCES += $$PWD/platform/ios/AdCtl_platform.mm
    DIRS = $$IOS_PACKAGE_DIR/libs
}

android {
    INCLUDEPATH += $$PWD/platform/android
    HEADERS += $$PWD/platform/android/AdCtl_platform.h
    SOURCES += $$PWD/platform/android/AdCtl_platform.cpp
    android:QT += androidextras gui-private
    android:FILES += $$ANDROID_PACKAGE_SOURCE_DIR/src/org/dreamdev/QtAdMob/QtAdMobActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/BaseGameUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelper.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelperUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk/AdCtl/AdCtlActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/res/values/strings.xml \
                         $$ANDROID_PACKAGE_SOURCE_DIR/project.properties \
                         $$ANDROID_PACKAGE_SOURCE_DIR/libs/*

    # copy dependencies

    #AdMob
    admob1.files = $$PWD/3rd/QtAdMob/platform/android/google-play-services_lib/*
    admob1.path = /google-play-services_lib

    admob2.files = $$PWD/3rd/QtAdMob/platform/android/src/*
    admob2.path = /src

    #StartAd
    startad1.files = $$PWD/3rd/SDK-Android/lib/StartADLib-1.0.1.jar
    startad1.path = /libs

    #PlayServices
    playservice1.files = $$PWD/3rd/android-support-library-archive/v4/android-support-v4.jar
    playservice1.path = /libs

    #AdCtl
    adctl1.files = $$PWD/platform/android/project.properties
    adctl1.path = /

    adctl2.files = $$PWD/platform/android/src/*
    adctl2.path = /src

    INSTALLS += admob1 admob2 startad1 playservice1 adctl1 adctl2
}

ADMOB_PATH = $$PWD/3rd/QtAdMob
GOOGLE_ANALITICS_PATH = $$PWD/3rd/qt-google-analytics

include($$ADMOB_PATH/QtAdMob.pri)
include($$GOOGLE_ANALITICS_PATH/qt-google-analytics.pri)

QT += qml quick widgets

HEADERS += $$PWD/adctl.h $$PWD/platform/AdCtl_platform_interface.h
SOURCES += $$PWD/adctl.cpp $$PWD/platform/AdCtl_platform_interface.cpp
RESOURCES += $$PWD/adctl.qrc

INCLUDEPATH += $$ADMOB_PATH
INCLUDEPATH += $$GOOGLE_ANALITICS_PATH

OTHER_FILES += README.md

system(ver){
#windows build environment
    COMMAND_SEPARATOR = ' &'
} else {
    COMMAND_SEPARATOR = ';'
}

!ios {
    !android {
        INCLUDEPATH += $$PWD/platform/other
        HEADERS += $$PWD/platform/other/AdCtl_platform.h
    }
}

ios {
    INCLUDEPATH += $$PWD/platform/ios
    HEADERS += $$PWD/platform/ios/AdCtl_platform.h
    OBJECTIVE_SOURCES += $$PWD/platform/ios/AdCtl_platform.mm
    DIRS = $$IOS_PACKAGE_DIR/libs
}

android {
    INCLUDEPATH += $$PWD/platform/android
    HEADERS += $$PWD/platform/android/AdCtl_platform.h
    SOURCES += $$PWD/platform/android/AdCtl_platform.cpp
    android:QT += androidextras gui-private
    android:FILES += $$ANDROID_PACKAGE_SOURCE_DIR/src/org/dreamdev/QtAdMob/QtAdMobActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/BaseGameUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelper.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelperUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk/AdCtl/AdCtlActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/res/values/strings.xml \
                         $$ANDROID_PACKAGE_SOURCE_DIR/project.properties \
                         $$ANDROID_PACKAGE_SOURCE_DIR/libs/*

    DIRS = $$ANDROID_PACKAGE_SOURCE_DIR/libs

    COPYDIR_SUFFIX =

    # make required directories
    !exists ($$DIRS) {
        copydata.commands = $(MKDIR) $$shell_path($$DIRS);
    }

    #AdMob
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/google-play-services_lib) {
        system(ver) {
            COPYDIR_SUFFIX = google-play-services_lib
        }
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/3rd/QtAdMob/platform/android/google-play-services_lib) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/$$COPYDIR_SUFFIX);
        system(ver) {
            COPYDIR_SUFFIX = src
        }
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/3rd/QtAdMob/platform/android/src) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/$$COPYDIR_SUFFIX);
    }

    #StartAd
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/StartADLib-1.0.1.jar) {
        copydata.commands += $(COPY) $$shell_path($$PWD/3rd/SDK-Android/lib/StartADLib-1.0.1.jar) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/libs/StartADLib-1.0.1.jar);
    }

    #PlayServices
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/android-support-v4.jar) {
        copydata.commands += $(COPY) $$shell_path($$PWD/3rd/android-support-library-archive/v4/android-support-v4.jar) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/libs/android-support-v4.jar);
    }

    #AdCtl
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/project.properties) {
        copydata.commands += $(COPY) $$shell_path($$PWD/platform/android/project.properties) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/project.properties);
    }
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk) {
        system(ver) {
            COPYDIR_SUFFIX = src
        }
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/platform/android/src) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/$$COPYDIR_SUFFIX);
    }
}

android|ios {
    copydata.CONFIG += no_link target_predeps
    copydata.commands = $$replace(copydata.commands,;,$$COMMAND_SEPARATOR)

    #Run data copy and dirs creation
    first.depends += $(first) copydata
    first.CONFIG += no_link target_predeps
    export(first.depends)
    export(copydata.commands)
    QMAKE_EXTRA_TARGETS += first copydata
}


win shell commands syntax fix

win shell commands syntax fix

ADMOB_PATH = $$PWD/3rd/QtAdMob
GOOGLE_ANALITICS_PATH = $$PWD/3rd/qt-google-analytics

include($$ADMOB_PATH/QtAdMob.pri)
include($$GOOGLE_ANALITICS_PATH/qt-google-analytics.pri)

QT += qml quick widgets

HEADERS += $$PWD/adctl.h $$PWD/AdCtl_platform_interface.h
SOURCES += $$PWD/adctl.cpp $$PWD/AdCtl_platform_interface.cpp
RESOURCES += $$PWD/adctl.qrc

INCLUDEPATH += $$ADMOB_PATH
INCLUDEPATH += $$GOOGLE_ANALITICS_PATH

OTHER_FILES += README.md

system(ver){
#windows build environment
    COMMAND_SEPARATOR = ' &'
}else{
    COMMAND_SEPARATOR = ';'
}

!ios{
    !android{
        INCLUDEPATH += $$PWD/platform/other
        HEADERS += $$PWD/platform/other/AdCtl_platform.h
    }
}

ios{
    INCLUDEPATH += $$PWD/platform/ios
    HEADERS += $$PWD/platform/ios/AdCtl_platform.h
    OBJECTIVE_SOURCES += $$PWD/platform/ios/AdCtl_platform.mm
    DIRS = $$IOS_PACKAGE_DIR/libs
}

android{
    INCLUDEPATH += $$PWD/platform/android
    HEADERS += $$PWD/platform/android/AdCtl_platform.h
    SOURCES += $$PWD/platform/android/AdCtl_platform.cpp
    android:QT += androidextras gui-private
    android:FILES += $$ANDROID_PACKAGE_SOURCE_DIR/src/org/dreamdev/QtAdMob/QtAdMobActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/BaseGameUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelper.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelperUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk/AdCtl/AdCtlActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/res/values/strings.xml \
                         $$ANDROID_PACKAGE_SOURCE_DIR/project.properties \
                         $$ANDROID_PACKAGE_SOURCE_DIR/libs/*

    DIRS = $$ANDROID_PACKAGE_SOURCE_DIR/libs

    COPYDIR_SUFFIX =

    # make required directories
    !exists ($$DIRS){
        copydata.commands = $(MKDIR) $$shell_path($$DIRS);
    }

    #AdMob
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/google-play-services_lib) {
        system(ver){
            COPYDIR_SUFFIX = google-play-services_lib
        }
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/3rd/QtAdMob/platform/android/google-play-services_lib) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/$$COPYDIR_SUFFIX);
        system(ver){
            COPYDIR_SUFFIX = src
        }
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/3rd/QtAdMob/platform/android/src) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/$$COPYDIR_SUFFIX);
    }

    #StartAd
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/StartADLib-1.0.1.jar) {
        copydata.commands += $(COPY) $$shell_path($$PWD/3rd/SDK-Android/lib/StartADLib-1.0.1.jar) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/libs/StartADLib-1.0.1.jar);
    }

    #PlayServices
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/android-support-v4.jar) {
        copydata.commands += $(COPY) $$shell_path($$PWD/3rd/android-support-library-archive/v4/android-support-v4.jar) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/libs/android-support-v4.jar);
    }

    #AdCtl
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/project.properties) {
        copydata.commands += $(COPY) $$shell_path($$PWD/platform/android/project.properties) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/project.properties);
    }
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk) {
        system(ver){
            COPYDIR_SUFFIX = src
        }
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/platform/android/src) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/$$COPYDIR_SUFFIX);
    }
}

android|ios{
    copydata.CONFIG += no_link target_predeps
    copydata.commands = $$replace(copydata.commands,;,$$COMMAND_SEPARATOR)

    #Run data copy and dirs creation
    first.depends += $(first) copydata
    first.CONFIG += no_link target_predeps
    export(first.depends)
    export(copydata.commands)
    QMAKE_EXTRA_TARGETS += first copydata
}

ADMOB_PATH = $$PWD/3rd/QtAdMob
GOOGLE_ANALITICS_PATH = $$PWD/3rd/qt-google-analytics

include($$ADMOB_PATH/QtAdMob.pri)
include($$GOOGLE_ANALITICS_PATH/qt-google-analytics.pri)

QT += qml quick widgets

HEADERS += $$PWD/adctl.h $$PWD/AdCtl_platform_interface.h
SOURCES += $$PWD/adctl.cpp $$PWD/AdCtl_platform_interface.cpp
RESOURCES += $$PWD/adctl.qrc

INCLUDEPATH += $$ADMOB_PATH
INCLUDEPATH += $$GOOGLE_ANALITICS_PATH

OTHER_FILES += README.md

system(ver){
#windows build environment
    COMMAND_SEPARATOR = ' &'
}else{
    COMMAND_SEPARATOR = ';'
}

!ios{
    !android{
        INCLUDEPATH += $$PWD/platform/other
        HEADERS += $$PWD/platform/other/AdCtl_platform.h
    }
}

ios{
    INCLUDEPATH += $$PWD/platform/ios
    HEADERS += $$PWD/platform/ios/AdCtl_platform.h
    OBJECTIVE_SOURCES += $$PWD/platform/ios/AdCtl_platform.mm
    DIRS = $$IOS_PACKAGE_DIR/libs
}

android{
    INCLUDEPATH += $$PWD/platform/android
    HEADERS += $$PWD/platform/android/AdCtl_platform.h
    SOURCES += $$PWD/platform/android/AdCtl_platform.cpp
    android:QT += androidextras gui-private
    android:DISTFILES += $$ANDROID_PACKAGE_SOURCE_DIR/src/org/dreamdev/QtAdMob/QtAdMobActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/BaseGameUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelper.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelperUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk/AdCtl/AdCtlActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/res/values/strings.xml \
                         $$ANDROID_PACKAGE_SOURCE_DIR/project.properties \
                         $$ANDROID_PACKAGE_SOURCE_DIR/libs/*

    DIRS = $$ANDROID_PACKAGE_SOURCE_DIR/libs

    #AdMob
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/google-play-services_lib) {
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/3rd/QtAdMob/platform/android/google-play-services_lib) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR);
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/3rd/QtAdMob/platform/android/src) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR);
    }

    #StartAd
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/StartADLib-1.0.1.jar) {
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/3rd/SDK-Android/lib/StartADLib-1.0.1.jar) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/libs/);
    }

    #PlayServices
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/android-support-v4.jar) {
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/3rd/android-support-library-archive/v4/android-support-v4.jar) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR/libs/);
    }

    #AdCtl
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/project.properties) {
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/platform/android/project.properties) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR);
    }
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk) {
        copydata.commands += $(COPY_DIR) $$shell_path($$PWD/platform/android/src) $$shell_path($$ANDROID_PACKAGE_SOURCE_DIR);
    }
}

android|ios{
    # make required directories
    createDirs.commands = $(MKDIR) $$shell_path($$DIRS)
    first.depends += createDirs
    QMAKE_EXTRA_TARGETS += createDirs
    copydata.CONFIG += no_link target_predeps
    copydata.commands = $$replace(copydata.commands,;,' &')

    #Run data copy and dirs creation
    first.depends += $(first) copydata
    first.CONFIG += no_link target_predeps
    export(first.depends)
    export(copydata.commands)
    QMAKE_EXTRA_TARGETS += first copydata
}


Added boost libraries

Added boost libraries

KLAMPTDIR = ../../
KLAMPTDEPS = ../../Library

LIBS += -L/usr/lib \
     	-L$${KLAMPTDIR}/lib \
	-L$${KLAMPTDEPS}/KrisLibrary/lib \
	-L/usr/X11R6/lib \
	-L/usr/X11R6/lib/modules/extensions \
	-L/src \
	-L$${KLAMPTDEPS}/ode-0.11.1/ode/src/.libs \
	-L$${KLAMPTDEPS}/tinyxml \
	-L$${KLAMPTDEPS}/glui-2.36/src/lib \
	-L$${KLAMPTDEPS}/assimp--3.0.1270-sdk/lib

INCLUDEPATH += $${KLAMPTDIR} \
               /usr/include \
               .. \
	       $${KLAMPTDEPS}/KrisLibrary \
	       $${KLAMPTDEPS}/ode-0.11.1/ode/src

LIBS += -lKlampt -lKrisLibrary -lode -ltinyxml -lglpk -lglui -lglut -lGLU -lboost_thread-mt -lboost_system-mt
LIBS += -lassimp
DEFINES += dDOUBLE

KLAMPTDIR = ../../
KLAMPTDEPS = ../../Library

LIBS += -L/usr/lib \
     	-L$${KLAMPTDIR}/lib \
	-L$${KLAMPTDEPS}/KrisLibrary/lib \
	-L/usr/X11R6/lib \
	-L/usr/X11R6/lib/modules/extensions \
	-L/src \
	-L$${KLAMPTDEPS}/ode-0.11.1/ode/src/.libs \
	-L$${KLAMPTDEPS}/tinyxml \
	-L$${KLAMPTDEPS}/glui-2.36/src/lib \
	-L$${KLAMPTDEPS}/assimp--3.0.1270-sdk/lib

INCLUDEPATH += $${KLAMPTDIR} \
               /usr/include \
               .. \
	       $${KLAMPTDEPS}/KrisLibrary \
	       $${KLAMPTDEPS}/ode-0.11.1/ode/src

LIBS += -lKlampt -lKrisLibrary -lode -ltinyxml -lglpk -lglui -lglut -lGLU
LIBS += -lassimp
DEFINES += dDOUBLE


add path variable

add path variable

!defined(PUTPATH, var) {
PUTPATH = $$_PRO_FILE_PWD_/put
}

HEADERS += \
    $$PUTPATH/application.h \
    $$PUTPATH/childprocess.h \
    $$PUTPATH/object.h \
    $$PUTPATH/socket.h \
    $$PUTPATH/cxxutils/configmanip.h \
    $$PUTPATH/cxxutils/cstringarray.h \
    $$PUTPATH/cxxutils/error_helpers.h \
    $$PUTPATH/cxxutils/hashing.h \
    $$PUTPATH/cxxutils/pipedspawn.h \
    $$PUTPATH/cxxutils/misc_helpers.h \
    $$PUTPATH/cxxutils/posix_helpers.h \
    $$PUTPATH/cxxutils/socket_helpers.h \
    $$PUTPATH/cxxutils/syslogstream.h \
    $$PUTPATH/cxxutils/nullable.h \
    $$PUTPATH/cxxutils/sharedmem.h \
    $$PUTPATH/cxxutils/pipedfork.h \
    $$PUTPATH/cxxutils/signal_helpers.h \
    $$PUTPATH/cxxutils/stringtoken.h \
    $$PUTPATH/cxxutils/translate.h \
    $$PUTPATH/cxxutils/vfifo.h \
    $$PUTPATH/cxxutils/vterm.h \
    $$PUTPATH/specialized/blockdevices.h \
    $$PUTPATH/specialized/blockinfo.h \
    $$PUTPATH/specialized/capabilities.h \
    $$PUTPATH/specialized/fileevent.h \
    $$PUTPATH/specialized/module.h \
    $$PUTPATH/specialized/mountevent.h \
    $$PUTPATH/specialized/mutex.h \
    $$PUTPATH/specialized/osdetect.h \
    $$PUTPATH/specialized/pollevent.h \
    $$PUTPATH/specialized/proclist.h \
    $$PUTPATH/specialized/eventbackend.h \
    $$PUTPATH/specialized/fstable.h \
    $$PUTPATH/specialized/mount.h \
    $$PUTPATH/specialized/mountpoints.h \
    $$PUTPATH/specialized/peercred.h \
    $$PUTPATH/specialized/processevent.h \
    $$PUTPATH/specialized/procstat.h \
    $$PUTPATH/specialized/timerevent.h

tui:HEADERS += \
    $$PUTPATH/tui/event.h \
    $$PUTPATH/tui/keyboard.h \
    $$PUTPATH/tui/layout.h \
    $$PUTPATH/tui/screen.h \
    $$PUTPATH/tui/tuiutils.h \
    $$PUTPATH/tui/sizepolicy.h \
    $$PUTPATH/tui/layoutitem.h \
    $$PUTPATH/tui/tuitypes.h \
    $$PUTPATH/tui/widget.h \
    $$PUTPATH/tui/window.h

SOURCES += \
    $$PUTPATH/application.cpp \
    $$PUTPATH/childprocess.cpp \
    $$PUTPATH/socket.cpp \
    $$PUTPATH/cxxutils/configmanip.cpp \
    $$PUTPATH/cxxutils/stringtoken.cpp \
    $$PUTPATH/cxxutils/translate.cpp \
    $$PUTPATH/cxxutils/syslogstream.cpp \
    $$PUTPATH/cxxutils/vfifo.cpp \
    $$PUTPATH/specialized/blockdevices.cpp \
    $$PUTPATH/specialized/blockinfo.cpp \
    $$PUTPATH/specialized/eventbackend.cpp \
    $$PUTPATH/specialized/fstable.cpp \
    $$PUTPATH/specialized/mount.cpp \
    $$PUTPATH/specialized/mountpoints.cpp \
    $$PUTPATH/specialized/pollevent.cpp \
    $$PUTPATH/specialized/proclist.cpp \
    $$PUTPATH/specialized/fileevent.cpp \
    $$PUTPATH/specialized/module.cpp \
    $$PUTPATH/specialized/mountevent.cpp \
    $$PUTPATH/specialized/mutex.cpp \
    $$PUTPATH/specialized/peercred.cpp \
    $$PUTPATH/specialized/processevent.cpp \
    $$PUTPATH/specialized/procstat.cpp \
    $$PUTPATH/specialized/timerevent.cpp

tui:SOURCES += \
    $$PUTPATH/tui/event.cpp \
    $$PUTPATH/tui/keyboard.cpp \
    $$PUTPATH/tui/layout.cpp \
    $$PUTPATH/tui/screen.cpp \
    $$PUTPATH/tui/tuiutils.cpp \
    $$PUTPATH/tui/layoutitem.cpp \
    $$PUTPATH/tui/widget.cpp \
    $$PUTPATH/tui/window.cpp

HEADERS += \
    application.h \
    childprocess.h \
    object.h \
    socket.h \
    cxxutils/configmanip.h \
    cxxutils/cstringarray.h \
    cxxutils/error_helpers.h \
    cxxutils/hashing.h \
    cxxutils/pipedspawn.h \
    cxxutils/misc_helpers.h \
    cxxutils/posix_helpers.h \
    cxxutils/socket_helpers.h \
    cxxutils/syslogstream.h \
    cxxutils/nullable.h \
    cxxutils/sharedmem.h \
    cxxutils/pipedfork.h \
    cxxutils/signal_helpers.h \
    cxxutils/stringtoken.h \
    cxxutils/translate.h \
    cxxutils/vfifo.h \
    cxxutils/vterm.h \
    specialized/blockdevices.h \
    specialized/blockinfo.h \
    specialized/capabilities.h \
    specialized/fileevent.h \
    specialized/module.h \
    specialized/mountevent.h \
    specialized/mutex.h \
    specialized/osdetect.h \
    specialized/pollevent.h \
    specialized/proclist.h \
    specialized/eventbackend.h \
    specialized/fstable.h \
    specialized/mount.h \
    specialized/mountpoints.h \
    specialized/peercred.h \
    specialized/processevent.h \
    specialized/procstat.h \
    specialized/timerevent.h

tui:HEADERS += \
    tui/event.h \
    tui/keyboard.h \
    tui/layout.h \
    tui/screen.h \
    tui/tuiutils.h \
    tui/sizepolicy.h \
    tui/layoutitem.h \
    tui/tuitypes.h \
    tui/widget.h \
    tui/window.h

SOURCES += \
    application.cpp \
    childprocess.cpp \
    socket.cpp \
    cxxutils/configmanip.cpp \
    cxxutils/stringtoken.cpp \
    cxxutils/translate.cpp \
    cxxutils/syslogstream.cpp \
    cxxutils/vfifo.cpp \
    specialized/blockdevices.cpp \
    specialized/blockinfo.cpp \
    specialized/eventbackend.cpp \
    specialized/fstable.cpp \
    specialized/mount.cpp \
    specialized/mountpoints.cpp \
    specialized/pollevent.cpp \
    specialized/proclist.cpp \
    specialized/fileevent.cpp \
    specialized/module.cpp \
    specialized/mountevent.cpp \
    specialized/mutex.cpp \
    specialized/peercred.cpp \
    specialized/processevent.cpp \
    specialized/procstat.cpp \
    specialized/timerevent.cpp

tui:SOURCES += \
    tui/event.cpp \
    tui/keyboard.cpp \
    tui/layout.cpp \
    tui/screen.cpp \
    tui/tuiutils.cpp \
    tui/layoutitem.cpp \
    tui/widget.cpp \
    tui/window.cpp


Added the qwtplot3d library if  needed.

Added the qwtplot3d library if  needed.

# Begin CVS Header
#   $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/common.pri,v $
#   $Revision: 1.84 $
#   $Name:  $
#   $Author: shoops $
#   $Date: 2008/09/16 15:46:54 $
# End CVS Header

# 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.84 $ $Author: shoops $ $Date: 2008/09/16 15:46:54 $
######################################################################

# In the case the BUILD_OS is not specified we make a guess.
isEmpty(BUILD_OS) {
  win32 {
    BUILD_OS = WIN32
  } else {
    BUILD_OS = $$system(uname)
  }
}
DEFINES += $$BUILD_OS
message("Configuring for $${BUILD_OS} with QTDIR=$(QTDIR).")

TARGETDEPS += Makefile

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

#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)

debug {
  DEFINES += COPASI_DEBUG

  isEmpty(COPASI_SRC_PACKAGE) {
    # DEFINES += COPASI_TSS
    # DEFINES += COPASI_TSSA
    # DEFINES += WITH_LAYOUT

    #  stoichiometric stability analysis:
    # DEFINES += COPASI_SSA
  }
}

isEmpty(COPASI_SRC_PACKAGE) {
  DEFINES += HAVE_MML
}

contains(STATIC_LINKAGE, yes) {
  DEFINES+=XML_STATIC
  DEFINES+=LIBSBML_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_QMAKE = $(QTDIR)/bin/qmake
  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")
  }

  myLex = \
          $(LEX) -t $< | \
          sed -e 's/class istream;/$${HASH}include "copasi.h"/' \
              -e 's/<FlexLexer.h>/"FlexLexer.h"/' \
              -e 's/$${HASH}include <unistd.h>/using namespace std;/' > $@
}

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

  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(QWT3D_PATH){
    LIBS +=  $${QWT3D_PATH}/lib/libqwtplot3d.a
    INCLUDEPATH += $${QWT3D_PATH}/include
    DEFINES += WITH_QWT3D
  }

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

  contains(CONFIG, qt) {

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

    LIBS += $(QTDIR)/lib/libqt-mt.a

    contains(DEFINES, WITH_QWT3D) {
      LIBS += $(QTDIR)/lib/libqwtplot3d.a
    }

    QMAKE_LIBS_QT =
    QMAKE_LIBS_QT_THREAD =
  }

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

contains(BUILD_OS, WIN32) {
  QMAKE_QMAKE = $(QTDIR)\bin\qmake.exe
  QMAKE_LEX = C:\cygwin\bin\bash ../../admin/flex.sh
  QMAKE_YACC = C:\cygwin\bin\bash ../../admin/yacc.sh

  DEFINES -= UNICODE

  debug {
    !win32-msvc2005 {
      QMAKE_LFLAGS += /NODEFAULTLIB:"libcmt.lib"
    }

    QMAKE_LFLAGS += /NODEFAULTLIB:"msvcrt.lib"
  }

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

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE += -O2

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    QMAKE_CXXFLAGS += -I"$${MKL_PATH}\include"
    QMAKE_LFLAGS += /LIBPATH:"$${MKL_PATH}\ia32\lib"
    QMAKE_LFLAGS += /LIBPATH:"$${MKL_PATH}\..\Compiler\C++\9.0\IA32\Lib"
    LIBS += mkl_c.lib
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      QMAKE_CXXFLAGS   += -I"$${CLAPACK_PATH}\include"
      QMAKE_LFLAGS += /LIBPATH:"$${CLAPACK_PATH}\lib"
      LIBS += clapack.lib
    } else {
      error( "Either MKL_PATH or CLAPACK_PATH must be specified" )
    }
  }

  !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"
    contains(STATIC_LINKAGE, yes) {
      LIBS += libexpatMT.lib
    } else {
      LIBS += libexpat.lib
    }
  } else {
    error( "EXPAT_PATH must be specified" )
  }

  # Add libsbml
  win32-msvc2005 {
    release {
      LIBS += libsbml.lib
    }
    debug {
      LIBS += libsbmlD.lib
    }
  } else {
    LIBS += libsbml.lib
  }

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

# The raptor library
  release {
    LIBS += raptor.lib
  }
  debug {
    LIBS += raptorD.lib
  }

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

  contains(CONFIG, qt) {
    LIBS += -lqwt
    contains(DEFINES, WITH_QWT3D) {
      LIBS += -lqwtplot3d
    }
  }
}

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(QWT_PATH){
       LIBS+=  -L$${QWT_PATH}/lib
       INCLUDEPATH += $${QWT_PATH}/include
    }
    LIBS += -lqwt
    contains(DEFINES, WITH_QWT3D) {
      LIBS += -lqwtplot3d
    }
    LIBS += -lSM
  } else {
    QMAKE_LIBS_THREAD -= -lpthread
    QMAKE_LIBS_THREAD -= -lrt
  }
}

contains(BUILD_OS, Linux) {
  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
#    LIBS += -lmkl_lapack -lmkl_ia32 -lg2c -lpthread
    LIBS += -lmkl_lapack -lmkl_ia32 -lguide -lpthread
    LIBS  +=  -L$${MKL_PATH}/lib/32
  } 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
          LIBS += -lg2c
        }
      } else {
        error( "Either MKL_PATH, CLAPACK_PATH, or LAPACK_PATH must be specified" )
      }
    }
  }

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

    contains(DEFINES, WITH_QWT3D) {
      LIBS += -lqwtplot3d
    }
  }

}

DEP1.target   = depend
DEP1.depends  = qmake

QMAKE_EXTRA_UNIX_TARGETS += DEP1

!equals(TEMPLATE, subdirs) {
  # Copy the sources for the tar ball
  src_distribution.depends = Makefile
  src_distribution.commands =   \
    $(CHK_DIR_EXISTS) ../../copasi_src || $(MKDIR) ../../copasi_src; \
    $(CHK_DIR_EXISTS) ../../copasi_src/copasi || \
      $(MKDIR) ../../copasi_src/copasi; \
    $(CHK_DIR_EXISTS) ../../copasi_src/copasi/$$SRC_TARGET || \
      $(MKDIR) ../../copasi_src/copasi/$$SRC_TARGET; \
    $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) \
      ../../copasi_src/copasi/$$SRC_TARGET/

  QMAKE_EXTRA_UNIX_TARGETS += src_distribution
}

# Begin CVS Header
#   $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/common.pri,v $
#   $Revision: 1.83 $
#   $Name:  $
#   $Author: gauges $
#   $Date: 2008/07/09 09:39:01 $
# End CVS Header

# 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.83 $ $Author: gauges $ $Date: 2008/07/09 09:39:01 $
######################################################################

# In the case the BUILD_OS is not specified we make a guess.
isEmpty(BUILD_OS) {
  win32 {
    BUILD_OS = WIN32
  } else {
    BUILD_OS = $$system(uname)
  }
}
DEFINES += $$BUILD_OS
message("Configuring for $${BUILD_OS} with QTDIR=$(QTDIR).")

TARGETDEPS += Makefile

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

#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)

debug {
  DEFINES += COPASI_DEBUG

  isEmpty(COPASI_SRC_PACKAGE) {
    # DEFINES += COPASI_TSS
    # DEFINES += COPASI_TSSA
    # DEFINES += WITH_LAYOUT

    #  stoichiometric stability analysis:
    # DEFINES += COPASI_SSA
  }
}

isEmpty(COPASI_SRC_PACKAGE) {
  DEFINES += HAVE_MML
}

contains(STATIC_LINKAGE, yes) {
  DEFINES+=XML_STATIC
  DEFINES+=LIBSBML_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_QMAKE = $(QTDIR)/bin/qmake
  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")
  }

  myLex = \
          $(LEX) -t $< | \
          sed -e 's/class istream;/$${HASH}include "copasi.h"/' \
              -e 's/<FlexLexer.h>/"FlexLexer.h"/' \
              -e 's/$${HASH}include <unistd.h>/using namespace std;/' > $@
}

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

  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(QWT3D_PATH){
    LIBS +=  $${QWT3D_PATH}/lib/libqwtplot3d.a
    INCLUDEPATH += $${QWT3D_PATH}/include
    DEFINES += WITH_QWT3D
  }

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

  contains(CONFIG, qt) {

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

    LIBS += $(QTDIR)/lib/libqt-mt.a

    QMAKE_LIBS_QT =
    QMAKE_LIBS_QT_THREAD =
  }

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

contains(BUILD_OS, WIN32) {
  QMAKE_QMAKE = $(QTDIR)\bin\qmake.exe
  QMAKE_LEX = C:\cygwin\bin\bash ../../admin/flex.sh
  QMAKE_YACC = C:\cygwin\bin\bash ../../admin/yacc.sh

  DEFINES -= UNICODE

  debug {
    !win32-msvc2005 {
      QMAKE_LFLAGS += /NODEFAULTLIB:"libcmt.lib"
    }

    QMAKE_LFLAGS += /NODEFAULTLIB:"msvcrt.lib"
  }

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

  QMAKE_CXXFLAGS_RELEASE -= -O1
  QMAKE_CXXFLAGS_RELEASE += -O2

  !isEmpty(MKL_PATH) {
    DEFINES += USE_MKL
    QMAKE_CXXFLAGS += -I"$${MKL_PATH}\include"
    QMAKE_LFLAGS += /LIBPATH:"$${MKL_PATH}\ia32\lib"
    QMAKE_LFLAGS += /LIBPATH:"$${MKL_PATH}\..\Compiler\C++\9.0\IA32\Lib"
    LIBS += mkl_c.lib
  } else {
    !isEmpty(CLAPACK_PATH) {
      DEFINES += USE_CLAPACK
      QMAKE_CXXFLAGS   += -I"$${CLAPACK_PATH}\include"
      QMAKE_LFLAGS += /LIBPATH:"$${CLAPACK_PATH}\lib"
      LIBS += clapack.lib
    } else {
      error( "Either MKL_PATH or CLAPACK_PATH must be specified" )
    }
  }

  !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"
    contains(STATIC_LINKAGE, yes) {
      LIBS += libexpatMT.lib
    } else {
      LIBS += libexpat.lib
    }
  } else {
    error( "EXPAT_PATH must be specified" )
  }

  # Add libsbml
  win32-msvc2005 {
    release {
      LIBS += libsbml.lib
    }
    debug {
      LIBS += libsbmlD.lib
    }
  } else {
    LIBS += libsbml.lib
  }

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

# The raptor library
  release {
    LIBS += raptor.lib
  }
  debug {
    LIBS += raptorD.lib
  }

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

  contains(CONFIG, qt) {
    LIBS += -lqwt
  }
}

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(QWT_PATH){
       LIBS+=  -L$${QWT_PATH}/lib
       INCLUDEPATH += $${QWT_PATH}/include
    }
    LIBS += -lqwt
    LIBS += -lSM
  } else {
    QMAKE_LIBS_THREAD -= -lpthread
    QMAKE_LIBS_THREAD -= -lrt
  }
}

contains(BUILD_OS, Linux) {
  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
#    LIBS += -lmkl_lapack -lmkl_ia32 -lg2c -lpthread
    LIBS += -lmkl_lapack -lmkl_ia32 -lguide -lpthread
    LIBS  +=  -L$${MKL_PATH}/lib/32
  } 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
          LIBS += -lg2c
        }
      } else {
        error( "Either MKL_PATH, CLAPACK_PATH, or LAPACK_PATH must be specified" )
      }
    }
  }

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

}

DEP1.target   = depend
DEP1.depends  = qmake

QMAKE_EXTRA_UNIX_TARGETS += DEP1

!equals(TEMPLATE, subdirs) {
  # Copy the sources for the tar ball
  src_distribution.depends = Makefile
  src_distribution.commands =   \
    $(CHK_DIR_EXISTS) ../../copasi_src || $(MKDIR) ../../copasi_src; \
    $(CHK_DIR_EXISTS) ../../copasi_src/copasi || \
      $(MKDIR) ../../copasi_src/copasi; \
    $(CHK_DIR_EXISTS) ../../copasi_src/copasi/$$SRC_TARGET || \
      $(MKDIR) ../../copasi_src/copasi/$$SRC_TARGET; \
    $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) \
      ../../copasi_src/copasi/$$SRC_TARGET/

  QMAKE_EXTRA_UNIX_TARGETS += src_distribution
}