]> git.ipfire.org Git - thirdparty/sarg.git/blame - README_cmake
Fix of the cmake configuration file.
[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
9632855c
FM
7Any comment about the usage of cmake is welcome.
8
b3695c67
FM
9
10CONFIGURING SARG
11
12It 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.
13
14Configure sarg with the command
15
16 ccmake ../sarg
17
18On 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.
19
20Then 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.
21
22Finally, press 'g' to generate the final configuration.
23
24Compile with
25
26 make
27
28Install with
29
30 make install
31
32
33CONFIGURATION VARIABLES
34
35These configuration variables are available on the first configuration run.
36
37 CMAKE_INSTALL_PREFIX - The root of the installation.
9632855c 38 default: /usr/local
b3695c67
FM
39
40 SYSCONFDIR - The directory with the configuration files relative to the installation prefix.
41 default: etc/sarg
42
43 BINDIR - The directory to copy sarg executable to.
44 default: bin
45
46 MANDIR - The directory to install the man page.
47 default: share/man
48
49 LANGDIR - The directory to copy the languages files to.
50 default: share/sarg/languages
51
52 FONTDIR - The directory where the fonts for the reports are located.
53 default: share/sarg/fonts
54
55 IMAGEDIR - The directory containing the images to use in the reports.
56 default: share/sarg/images
57
58These variables are initialized with the values of the above variables and are available on the second run.
59
60 SYSCONFDIR_SOURCE - The full path to the configuration files to compile in sarg.
61 default: CMAKE_INSTALL_PREFIX/SYSCONFDIR
62
63 LANGDIR_SOURCE - The full path to the languages files to compile in sarg.
64 default: CMAKE_INSTALL_PREFIX/LANGDIR
65
66 FONTDIR_SOURCE - The full path to the fonts to compile in sarg.
67 default: CMAKE_INSTALL_PREFIX/FONTDIR
68
69 IMAGEDIR_SOURCE - The full path to the images to compile in sarg.
70 default: CMAKE_INSTALL_PREFIX/IMAGEDIR
71
72They are other configuration variables whose documentation is visible during the configuration with ccmake.
73