]> git.ipfire.org Git - thirdparty/sarg.git/blame - README_cmake
Z files are uncompressed by zcat to avoid deleting the original log file.
[thirdparty/sarg.git] / README_cmake
CommitLineData
b3695c67
FM
1WHY SWITCH TO CMAKE
2
3cb25232
FM
3I (Frederic Marchal) could not make the autotools work with msys+mingw. The
4choices reduced to: fight some more time with the autotools; wait until the msys
5port evolved or switch to cmake. Despite not being familiar with cmake, I
6decided to give it a chance and was surprised to come up within a few hours
7with something capable of compiling sarg.
b3695c67 8
3cb25232
FM
9Now, that doesn't mean that the autotools are to be discarded on the spot. The
10two systems may coexist for some times especially since it is my first project
11with cmake and I'm sure it is done in an definitely autotoolistic way.
b3695c67 12
9632855c
FM
13Any comment about the usage of cmake is welcome.
14
b3695c67
FM
15
16CONFIGURING SARG
17
3cb25232
FM
18It is recommended to build sarg out of the source directory. It makes it easier
19to delete the build directory completely and restart the configuration from
b008f87f
FM
20scratch if the first attempt doesn't produce the expected result.
21
22If you intent to use both cmake and the autotools, then you MUST build sarg out
23of the source directory as it will overwrite the original stub config.h in the
24source directory and you won't be able to use the autotools afterward.
25
26To build sarg out of source, create a directory at the same level as the sources
27of sarg and cd into that directory.
b3695c67
FM
28
29Configure sarg with the command
30
31 ccmake ../sarg
32
3cb25232
FM
33On the first run, it will report that the cache is empty. Press 'c' to configure
34the cache. Then ccmake will display an interface to select some configuration
35options. You should set the CMAKE_INSTALL_PREFIX to the root of the directory to
36install sarg, for instance: /usr. You may also need to change SYSCONFDIR to
37/etc/sarg to install the configuration files at that location.
b3695c67 38
3cb25232
FM
39Then press 'c' again to reconfigure sarg. Four more configuration variables
40appear. They are build from the paths you provided for the installation
41directories of the components. These are the absolute paths sarg will use to
42find the corresponding files. You then have the opportunity to adjust them if
43the final location of the files it not what is resolved with the installed
44configuration.
b3695c67
FM
45
46Finally, press 'g' to generate the final configuration.
47
48Compile with
49
50 make
51
52Install with
53
54 make install
55
56
57CONFIGURATION VARIABLES
58
59These configuration variables are available on the first configuration run.
60
61 CMAKE_INSTALL_PREFIX - The root of the installation.
9632855c 62 default: /usr/local
b3695c67 63
3cb25232
FM
64 SYSCONFDIR - The directory with the configuration files relative to the
65 installation prefix.
b3695c67
FM
66 default: etc/sarg
67
68 BINDIR - The directory to copy sarg executable to.
69 default: bin
70
71 MANDIR - The directory to install the man page.
72 default: share/man
73
74 LANGDIR - The directory to copy the languages files to.
75 default: share/sarg/languages
76
77 FONTDIR - The directory where the fonts for the reports are located.
78 default: share/sarg/fonts
79
80 IMAGEDIR - The directory containing the images to use in the reports.
81 default: share/sarg/images
82
3cb25232
FM
83These variables are initialized with the values of the above variables and are
84available on the second run.
b3695c67 85
3cb25232
FM
86 SYSCONFDIR_SOURCE - The full path to the configuration files to compile in
87 sarg.
b3695c67
FM
88 default: CMAKE_INSTALL_PREFIX/SYSCONFDIR
89
90 LANGDIR_SOURCE - The full path to the languages files to compile in sarg.
91 default: CMAKE_INSTALL_PREFIX/LANGDIR
92
93 FONTDIR_SOURCE - The full path to the fonts to compile in sarg.
94 default: CMAKE_INSTALL_PREFIX/FONTDIR
95
96 IMAGEDIR_SOURCE - The full path to the images to compile in sarg.
97 default: CMAKE_INSTALL_PREFIX/IMAGEDIR
98
3cb25232
FM
99They are other configuration variables whose documentation is visible during the
100configuration with ccmake.
b3695c67 101