Good day. There is a QT 5.4 bundle with static linking libraries. Separately collected qtserialport. Tell me how to add this library to the project now in a standard way - through the .pro file?

QT += core serialport 

You can of course connect manually via LIBS + = & INCLUDEPATH + =, but this is not an option, since in debug mode, one version of the library is needed, and in release mode, another is needed.

    2 answers 2

    I did so

     CONFIG(debug, debug|release) { SUFFIX_STR = _g } else { SUFFIX_STR = } LIBS += -lserialport$${SUFFIX_STR} 

    You can accordingly use a similar design.

     CONFIG(debug, debug|release) { LIBS += -lserialport1 INCLUDEPATH += serialport1.h } else { LIBS += -lserialport2 INCLUDEPATH += serialport2.h } 
    • Thank you, it will probably come in handy for me. It turned out that I forgot to copy qt_lib_serialport.pri to the folder with the kit, as a result, qmake could not find the serialport module. - Evgeniy

    Build it statically with all Qt.