summaryrefslogtreecommitdiff
path: root/BUILD.txt
blob: da53ba2f12631c5dabb79dec6673d648ebae69fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Doxygen uses cmake (http://www.cmake.org/) to build executables for various platforms.
At least cmake version 3.3 is required.

The first step is to create a build directory where the output should be stored.
Doxygen can be fully built outside of the source tree.

The second step is to invoke cmake from within the build directory with the desired generator.

For Linux/Unix systems do the following:

    mkdir build
    cd build
    cmake -G "Unix Makefiles" path/to/root/of/doxygen/source/tree
    make
Note: "path/to/root/of/doxygen/source/tree" is not the "src" directory but its parent.

This also works for MacOS, but if XCode is installed you can also generate an XCode project file

    cmake -G XCode path/to/root/of/doxygen/source/tree

For Windows one can generate a Visual Studio project using

    cmake -G "Visual Studio 12 2013" path\to\root\of\doxygen\source\tree

(this is for Visual Studio 12, there are typically also generators for other versions of
Visual Studio or other compiler environments like MinGW)

Doxygen's cmake configuration provides a number of options:
- build_wizard    Build the GUI frontend for doxygen.
- build_app       Example showing how to embed doxygen in an application.
- build_parse     Parses source code and dumps the dependencies between the code elements.
- build_xmlparser Example showing how to parse doxygen's XML output.
- build_search    Build external search tools (doxysearch and doxyindexer).
- build_doc       Build user manual.
- use_libclang    Add support for libclang parsing.
- use_sys_spdlog  Use system spdlog instead of bundled.
- win_static      Link with /MT in stead of /MD on windows.
- force_qt=<vers> Forces doxywizard to build using the specified major version, this can be Qt5 or Qt6

An option can be turned on, by adding -D<option>=ON as a command line option, this can be
done when generating the initial build files, but also afterwards, i.e. to enable building
of the documentation after an initial cmake -G run, do

    cmake -Dbuild_doc=ON path/to/root/of/doxygen/source/tree

To turn the option off use

    cmake -Dbuild_doc=OFF path/to/root/of/doxygen/source/tree

To see the current value is of the various options, you can run

    cmake -L path/to/root/of/doxygen/source/tree

The build target for building the documentation is 'docs' and the build target for
the regression tests is 'tests'