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

前端 未结 7 1179
春和景丽
春和景丽 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:17

    In my code in header files I just have:

    #ifndef Q_MOC_RUN
        //Here we include Boost or Ogre headers with Macro
    #endif
    

    It works perfectly in Qt5 x64 and need not recompiling anything.

提交回复
热议问题