1#----------------------------------------------------------------------------- 2# doc.pri 3#----------------------------------------------------------------------------- 4 5# list of documentation folders to install 6DOC_FOLDERS = doc/html \ 7 doc/qch 8 9# files and folders listed in the installation target's .files section 10# must exist _before_ qmake generates the Makefile...so, make sure our 11# documentation target folders exist in the current build folder 12for( folder, DOC_FOLDERS ) { 13 system( mkdir -p $${TOP_BUILD_DIR}/$${folder} ) 14} 15 16 17#----------------------------------------------------------------------------- 18# extra build targets for generating and cleaning documentation 19#----------------------------------------------------------------------------- 20for( subdir, SUBDIRS) { 21 DOC_INPUT += $${_PRO_FILE_PWD_}/$${subdir} 22} 23DOC_INPUT += doc/src 24 25# target for generating documentation 26doctarget.target = docs 27doctarget.commands = OUTPUT_DIRECTORY=doc \ 28 PROJECT_NAME=\"$${PROJECT_NAME}\" \ 29 PROJECT_NUMBER=\"$${PROJECT_VERSION}\" \ 30 STRIP_FROM_PATH=\"$${_PRO_FILE_PWD_}\" \ 31 INPUT=\"$${DOC_INPUT}\" \ 32 QHP_NAMESPACE=\"com.nokia.example.$${TARGET}\" \ 33 QHP_VIRTUAL_FOLDER=\"$${TARGET}\" \ 34 TAGFILES=\"$$system(pwd)/qt.tags\" \ 35 TAGFILE=\"doc/$${TARGET}.tags\" \ 36 doxygen $$system(pwd)/doxy.conf 37doctarget.depends = FORCE 38QMAKE_EXTRA_TARGETS += doctarget 39 40 41# target for cleaning generated documentation 42doccleantarget.target = cleandocs 43for( folder, DOC_FOLDERS ) { 44 doccleantarget.commands += rm -r -f $${folder}; 45} 46doccleantarget.commands += rm -r -f doc/accounts.tags; 47doccleantarget.depends = FORCE 48QMAKE_EXTRA_TARGETS += doccleantarget 49 50 51#----------------------------------------------------------------------------- 52# installation setup 53# NOTE: remember to set headers.files before this include to have the headers 54# properly setup. 55#----------------------------------------------------------------------------- 56include( ../common-installs-config.pri ) 57 58 59#----------------------------------------------------------------------------- 60# Installation target setup for documentation 61#----------------------------------------------------------------------------- 62documentation.path = $${INSTALL_PREFIX}/share/doc/$${PROJECT_NAME} 63for( folder, DOC_FOLDERS ) { 64 documentation.files += $${TOP_BUILD_DIR}/$${folder} 65} 66# make sure docs are generated before trying to install anything 67documentation.depends = docs 68INSTALLS += documentation 69message("====") 70message("==== INSTALLS += documentation") 71 72 73# End of File 74 75