pre: OpenCV 3.4.19 (version++)
[platform/upstream/opencv.git] / doc / tutorials / introduction / cross_referencing / tutorial_cross_referencing.markdown
1 Cross referencing OpenCV from other Doxygen projects {#tutorial_cross_referencing}
2 ====================================================
3
4 @prev_tutorial{tutorial_transition_guide}
5
6
7 Cross referencing OpenCV
8 ------------------------
9
10 [Doxygen](http://www.doxygen.nl) is a tool to generate
11 documentations like the OpenCV documentation you are reading right now.
12 It is used by a variety of software projects and if you happen to use it
13 to generate your own documentation, and you are using OpenCV inside your
14 project, this short tutorial is for you.
15
16 Imagine this warning inside your documentation code:
17
18 @code
19 /**
20  * @warning This functions returns a cv::Mat.
21  */
22 @endcode
23
24 Inside your generated documentation this warning will look roughly like this:
25
26 @warning This functions returns a %cv::Mat.
27
28 While inside the OpenCV documentation the `%cv::Mat` is rendered as a link:
29
30 @warning This functions returns a cv::Mat.
31
32 To generate links to the OpenCV documentation inside your project, you only
33 have to perform two small steps. First download the file
34 [opencv.tag](opencv.tag) (right-click and choose "save as...") and place it
35 somewhere in your project directory, for example as
36 `docs/doxygen-tags/opencv.tag`.
37
38 Open your Doxyfile using your favorite text editor and search for the key
39 `TAGFILES`. Change it as follows:
40
41 @code
42 TAGFILES = ./docs/doxygen-tags/opencv.tag=http://docs.opencv.org/3.4.19
43 @endcode
44
45 If you had other definitions already, you can append the line using a `\`:
46
47 @code
48 TAGFILES = ./docs/doxygen-tags/libstdc++.tag=https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen \
49            ./docs/doxygen-tags/opencv.tag=http://docs.opencv.org/3.4.19
50 @endcode
51
52 Doxygen can now use the information from the tag file to link to the OpenCV
53 documentation. Rebuild your documentation right now!
54
55 @note To allow others to also use a *.tag file to link to your documentation,
56 set `GENERATE_TAGFILE = html/your_project.tag`. Your documentation will now
57 contain a `your_project.tag` file in its root directory.
58
59
60 References
61 ----------
62
63 - [Doxygen: Linking to external documentation](http://www.doxygen.nl/manual/external.html)
64 - [opencv.tag](opencv.tag)