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