How can i use relative path names in Doxygen configuration
Asked Answered
A

4

9

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

Arnettaarnette answered 22/10, 2015 at 8:13 Comment(1)
i fixed it in the .bat file. i navigated to the root map, then i run doxygen from there while i add some configurations to the doxygen_config with the %cd% command. then it looks like this: "( type utils\config_doxygen.txt & echo INPUT=%cd%\code\code_with_doxygen\ ) | doxygen.exe -"Arnettaarnette
F
4

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.

Foss answered 26/10, 2015 at 13:47 Comment(0)
D
1

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.

Dynamiter answered 29/10, 2015 at 12:49 Comment(0)
T
0

@gmug was right. Don't forget to add comment blocks in your code as specified by doxygen For python I needed to add this: """@package docstring""" at the beginning of the file.

Tandem answered 25/5, 2017 at 12:26 Comment(0)
V
0

I have been able to use relative paths in my doxygen.cfg file by setting INPUT to a string or set of strings. For example:

INPUT                  = "." "src"

will tell doxygen to look in both the current directory and its subdirectory, $HERE/src.

Venison answered 5/7, 2021 at 18:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.