Maybe you need to muck about with the QMAKE_LIBS_* variables then. Be creative