PDA

View Full Version : QMake how to add extra_compiler works like ui compiler?



rolandsun
24th October 2011, 09:11
I want to preprocess some slice files with the preprocess compiler slice2cpp,it will compile slice file and generate cpp and header file.
I add the extra compiler as following , it works,but it only add cpp file dependency to makefile,while I want add both cpp and header file ,just like what qmake process UI file.
anyone can help me ?


slice_cpp.output = ${QMAKE_FILE_BASE}.cpp
slice_cpp.input = SLICE_FILES
slice_cpp.commands=slice2cpp --underscore ${QMAKE_FILE_IN} -I ../slice -I $$ICE_SLICE_PATH
slice_cpp.name= "ice preprocesor"
slice_cpp.variable_out= SOURCES
QMAKE_EXTRA_COMPILERS += slice_cpp

fullmetalcoder
24th October 2011, 13:07
Check the yacc.prf (http://qt.gitorious.org/qt/qt/blobs/4.7/mkspecs/features/yacc.prf) file.