Relative files paths in doxygen-generated documentation

我只是一个虾纸丫 提交于 2019-12-03 12:21:11

问题


I am using Doxygen 1.7.4 for Windows.

In the File List page of generated documentation I'd like to see relative paths. I have set FULL_PATH_NAMES = YES, to have something more, than just filename without path, but this gives full, absolute paths.

I want only paths relative to project directory. I know, that I can use STRIP_FROM_PATH but I have problem with wildcards. I need that kind of path-stripping, because this project is made on multiple PCs (as git repo), so paths can be different.

Is it possible to use wildcards for this setting, or do I have to set doxyfile for each workstation with part of absolute path to strip?


Edit:

I've found something like what I need on the doxygen website: STRIP_FROM_PATH = $(QTDIR)/

Maybe it is possible to use one of doxyfile's variables?


回答1:


I'm not sure about Windows, but on Linux and OS X I can produce outputs in the file list like

  • src/Utils.cpp [code]
  • src/Utils.h [code]
  • src/VectorMath.h [code]
  • test/src/test.cpp [code]

By setting FULL_PATH_NAMES to YES and STRIP_FROM_PATH to ../.. (i.e. the directory path of project's root which is two directories up from where I'm building the docs). You may need to swap the directory separator to the windows one.

You'll also need to watch out that you update the Doxyfile if you move the docs around.



来源:https://stackoverflow.com/questions/6261366/relative-files-paths-in-doxygen-generated-documentation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!