How to add specific flags to moc in a qmake project?

前端 未结 7 1182
春和景丽
春和景丽 2020-12-19 03:09

I compile a Qt executable using qmake && make on the following project.pro file:

INCLUDEPATH *= ../../dependencies/boost
QT         


        
7条回答
  •  情深已故
    2020-12-19 03:22

    A bit hackish, but what about if you overwrite the moc compiler so that it includes the flag. In the .pro:

    QMAKE_MOC = $$QMAKE_MOC -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
    

提交回复
热议问题