Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Project Dependencies



  • Hi,
    My project uses QtOpcUa. How to include all opcua Dependencies in conditional way ? , to be able to compile that project with another qt version that is not linked with qtopcua


  • Lifetime Qt Champion

    Hi
    You mean to conditionally have
    QT += opcua
    in the pro file and

    also be able to turn on/off
    #include <QtOpcUa>

    around in your app ?

    I use the following construct

    DEFINES += USEIT

    contains(DEFINES, USEIT) {
    QT += opcua
    }

    and you can conditioally use the include too. maybe with a define you set in .pro file so its
    all controled with one key in .pro file


  • Lifetime Qt Champion

    Hi
    You mean to conditionally have
    QT += opcua
    in the pro file and

    also be able to turn on/off
    #include <QtOpcUa>

    around in your app ?

    I use the following construct

    DEFINES += USEIT

    contains(DEFINES, USEIT) {
    QT += opcua
    }

    and you can conditioally use the include too. maybe with a define you set in .pro file so its
    all controled with one key in .pro file



  • @mrjj hi
    thank you very much, i will try right now.


Log in to reply