In my qmake-based project, I want to run 'xxd' on some files before compilation. Following the documentation, the relevant part in my pro file looks as following:
SHADERS = shader/tone.frag \
shader/trans.frag \
shader/hue.frag
# xxd
xxd.output = ${QMAKE_FILE_NAME}.xxd
xxd.commands = xxd -i ${QMAKE_FILE_NAME} > ${QMAKE_FILE_OUT}
xxd.depends = SHADERS
xxd.input = $$SHADERS
xxd.variable_out = HEADERS
QMAKE_EXTRA_COMPILERS += xxd
Qmake doesn't complain, but it also doesn't run xxd at all. Do I have to create special targets for each file I want to have pre-processed? (The resulting *.xxd files will not be compiled afterwards by me, only included in other cpp files)
Edit: With smokris's help, this is how I fixed the part in my pro file:
# xxd
xxd.output = ${QMAKE_FILE_NAME}.xxd
xxd.commands = xxd -i ${QMAKE_FILE_NAME} > ${QMAKE_FILE_OUT}
xxd.depends = $$SHADERS
xxd.input = SHADERS
xxd.variable_out = HEADERS