Hi All,
I cannot seem to find any mention of having qmake build compiled help files from a help project and source. Are these rules in qmake's repertoire and how can I use them?
Cheers,
Chris
Hi All,
I cannot seem to find any mention of having qmake build compiled help files from a help project and source. Are these rules in qmake's repertoire and how can I use them?
Cheers,
Chris
Of course, the question is HOW do you do this?
A .pro file can only have a single target, so I've created a subdir with my .qhp files. But the .pro file can only build apps, libs and subdirs. Here is my help.pro file.. what is needed to make it generate a target qch rather than assuming it is building a binary?
TARGET = GoldenCheetah.qch
qhelpgenerator.output = help.qch
qhelpgenerator.input = help.qhp
qhelpgenerator.commands = ghelpgenerator help.qhp
qhelpgenerator.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += qhelpgenerator
Two variations that do the job:Utimately they amount to much the same sort of thing. The first is more flexible with multiple help files to generate.Qt Code:
# the main target TEMPLATE = app SOURCES += ... HEADERS += ... # The help # Using a "custom compiler" QHP_FILES += help1.qhp help2.qhp qhp_qhc.input = QHP_FILES qhp_qhc.output = ${QMAKE_FILE_BASE}.qch qhp_qhc.commands = qhelpgenerator ${QMAKE_FILE_NAME} qhp_qhc.CONFIG = no_link target_predeps QMAKE_EXTRA_COMPILERS += qhp_qhc # Or for a single file using a custom target myhelp.target = test3.qhc myhelp.depends = test3.qhp myhelp.commands = qhelpgenerator $$myhelp.depends QMAKE_EXTRA_TARGETS += myhelp PRE_TARGETDEPS += test3.qhcTo copy to clipboard, switch view to plain text mode
liversedge (1st August 2011)
Bookmarks