]> git.ipfire.org Git - thirdparty/sarg.git/blame - README_cmake
Removed missplaced off_t as suggested in bug #2864425.
[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
20scratch if the first attempt doesn't produce the expected result. To do so,
21create a directory at the same level as the sources of sarg and cd into that
22directory.
b3695c67
FM
23
24Configure sarg with the command
25
26 ccmake ../sarg
27
3cb25232
FM
28On the first run, it will report that the cache is empty. Press 'c' to configure
29the cache. Then ccmake will display an interface to select some configuration
30options. You should set the CMAKE_INSTALL_PREFIX to the root of the directory to
31install sarg, for instance: /usr. You may also need to change SYSCONFDIR to
32/etc/sarg to install the configuration files at that location.
b3695c67 33
3cb25232
FM
34Then press 'c' again to reconfigure sarg. Four more configuration variables
35appear. They are build from the paths you provided for the installation
36directories of the components. These are the absolute paths sarg will use to
37find the corresponding files. You then have the opportunity to adjust them if
38the final location of the files it not what is resolved with the installed
39configuration.
b3695c67
FM
40
41Finally, press 'g' to generate the final configuration.
42
43Compile with
44
45 make
46
47Install with
48
49 make install
50
51
52CONFIGURATION VARIABLES
53
54These configuration variables are available on the first configuration run.
55
56 CMAKE_INSTALL_PREFIX - The root of the installation.
9632855c 57 default: /usr/local
b3695c67 58
3cb25232
FM
59 SYSCONFDIR - The directory with the configuration files relative to the
60 installation prefix.
b3695c67
FM
61 default: etc/sarg
62
63 BINDIR - The directory to copy sarg executable to.
64 default: bin
65
66 MANDIR - The directory to install the man page.
67 default: share/man
68
69 LANGDIR - The directory to copy the languages files to.
70 default: share/sarg/languages
71
72 FONTDIR - The directory where the fonts for the reports are located.
73 default: share/sarg/fonts
74
75 IMAGEDIR - The directory containing the images to use in the reports.
76 default: share/sarg/images
77
3cb25232
FM
78These variables are initialized with the values of the above variables and are
79available on the second run.
b3695c67 80
3cb25232
FM
81 SYSCONFDIR_SOURCE - The full path to the configuration files to compile in
82 sarg.
b3695c67
FM
83 default: CMAKE_INSTALL_PREFIX/SYSCONFDIR
84
85 LANGDIR_SOURCE - The full path to the languages files to compile in sarg.
86 default: CMAKE_INSTALL_PREFIX/LANGDIR
87
88 FONTDIR_SOURCE - The full path to the fonts to compile in sarg.
89 default: CMAKE_INSTALL_PREFIX/FONTDIR
90
91 IMAGEDIR_SOURCE - The full path to the images to compile in sarg.
92 default: CMAKE_INSTALL_PREFIX/IMAGEDIR
93
3cb25232
FM
94They are other configuration variables whose documentation is visible during the
95configuration with ccmake.
b3695c67 96