Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i use relative path names in Doxygen configuration

I have my doxygen in my /utils directory, and my source is in another directory in the root(/code_with_doxygen), how could i make a relative path name for that since it's in a repository that will be on different places on other computers. I can't document the whole root because i don't want the directory /code_without_doxygen build too.

the project tree looks like this:

root
    utils
    code
        code_with_doxygen
        code_without_doxygen
    documentation

right now i have the settings, but that doesn't seem to work:

FULL_PATH_NAMES        = YES
STRIP_FROM_PATH        = ../

i can't seem to figure it out with: Relative files paths in doxygen-generated documentation

like image 872
Weffel Avatar asked Oct 22 '15 08:10

Weffel


2 Answers

The relative paths depend on the directory from which directory you are executing doxygen. For example if you have the following project tree:

+ project_root
     + documentation
         + config
             - doxyfile
         + pictures
         + output
         - run_doxygen.bat
     + code
         + code_with_doxygen
         + code_without_doxygen

In this case all relative paths have they root in the folder "documentation" because you are running the script "run_doxygen.bat" from this folder. So you would set the INPUT tag in the "doxyfile" to

INPUT = ./../code

and the OUTPUT_DIRECTORY tag in the doxyfile to

OUTPUT_DIRECTORY = ./output

The misleading thing is that even if the doxyfile is in the subfolder "config" the paths are NOT relative to the location of the doxyfile because the paths are relative to the location from where doxygen is called. In this case it is the folder "documentation" because this is the location of the script which is calling doxygen.

like image 88
gmug Avatar answered Oct 21 '22 14:10

gmug


Doxygen allows for including files into doxyfile. You can generate a file using a script before actually calling doxygen. The content of this file has to look like this:

INPUT += path1
INPUT += path2
...

You seem to to run Linux, I don't know the correct bash-commands.

The file has to be integrated into your doxyfile:

INPUT = (project path)
@INCLUDE = generated filename

This will lead to doxygen using the content of your generated file.

like image 1
DaSchmock Avatar answered Oct 21 '22 14:10

DaSchmock