I compile a Qt executable using qmake && make
on the following project.pro
file:
INCLUDEPATH *= ../../dependencies/boost
QT *= opengl xml
CONFIG *= qt opengl static
TARGET = myexe
HEADERS = Viewer.hpp MainWindow.hpp Inspector.hpp
SOURCES = main.cpp Viewer.cpp MainWindow.cpp Inspector.cpp
However, when compiling, moc
chokes on a boost macro which it cannot parse. To work around this bug, I need to pass the flag -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
to moc, but I cannot manage to do so.
How to I edit my .pro
file to pass a given flag to moc
? (but not to g++
, as QMAKE_CXXFLAGS
does)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…