[QBS] How to check minimal supported Qt version?

dismine dismine at gmail.com
Thu Mar 17 15:11:47 CET 2016


Hello,

Yesterday i finally decided to start porting my project to qbs. I really
like ideas behind qbs and feel that it worth time i'll spend on porting.

Can someone help me with my first problem? In qmake i write:

!minQtVersion(5, 0, 0) {

    message("Cannot build Valentina with Qt version $${QT_VERSION}.")

    error("Use at least Qt 5.0.0.")

}


Code for the function:

defineTest(minQtVersion) {

    maj = $$1

    min = $$2

    patch = $$3

    isEqual(QT_MAJOR_VERSION, $$maj) {

        isEqual(QT_MINOR_VERSION, $$min) {

            isEqual(QT_PATCH_VERSION, $$patch) {

                return(true)

            }

            greaterThan(QT_PATCH_VERSION, $$patch) {

                return(true)

            }

        }

        greaterThan(QT_MINOR_VERSION, $$min) {

            return(true)

        }

    }

    greaterThan(QT_MAJOR_VERSION, $$maj) {

        return(true)

    }

    return(false)

}


How can i repeat the same with qbs?

Of course, i can skip this part and go further, but i rather not if i can.

Best regards,
Roman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20160317/01e62d5d/attachment.html>


More information about the Qbs mailing list