]>
Commit | Line | Data |
---|---|---|
b3695c67 FM |
1 | WHY SWITCH TO CMAKE |
2 | ||
3cb25232 FM |
3 | I (Frederic Marchal) could not make the autotools work with msys+mingw. The |
4 | choices reduced to: fight some more time with the autotools; wait until the msys | |
5 | port evolved or switch to cmake. Despite not being familiar with cmake, I | |
6 | decided to give it a chance and was surprised to come up within a few hours | |
7 | with something capable of compiling sarg. | |
b3695c67 | 8 | |
3cb25232 FM |
9 | Now, that doesn't mean that the autotools are to be discarded on the spot. The |
10 | two systems may coexist for some times especially since it is my first project | |
11 | with cmake and I'm sure it is done in an definitely autotoolistic way. | |
b3695c67 | 12 | |
9632855c FM |
13 | Any comment about the usage of cmake is welcome. |
14 | ||
b3695c67 FM |
15 | |
16 | CONFIGURING SARG | |
17 | ||
3cb25232 FM |
18 | It is recommended to build sarg out of the source directory. It makes it easier |
19 | to delete the build directory completely and restart the configuration from | |
20 | scratch if the first attempt doesn't produce the expected result. To do so, | |
21 | create a directory at the same level as the sources of sarg and cd into that | |
22 | directory. | |
b3695c67 FM |
23 | |
24 | Configure sarg with the command | |
25 | ||
26 | ccmake ../sarg | |
27 | ||
3cb25232 FM |
28 | On the first run, it will report that the cache is empty. Press 'c' to configure |
29 | the cache. Then ccmake will display an interface to select some configuration | |
30 | options. You should set the CMAKE_INSTALL_PREFIX to the root of the directory to | |
31 | install 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 |
34 | Then press 'c' again to reconfigure sarg. Four more configuration variables |
35 | appear. They are build from the paths you provided for the installation | |
36 | directories of the components. These are the absolute paths sarg will use to | |
37 | find the corresponding files. You then have the opportunity to adjust them if | |
38 | the final location of the files it not what is resolved with the installed | |
39 | configuration. | |
b3695c67 FM |
40 | |
41 | Finally, press 'g' to generate the final configuration. | |
42 | ||
43 | Compile with | |
44 | ||
45 | make | |
46 | ||
47 | Install with | |
48 | ||
49 | make install | |
50 | ||
51 | ||
52 | CONFIGURATION VARIABLES | |
53 | ||
54 | These 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 |
78 | These variables are initialized with the values of the above variables and are |
79 | available 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 |
94 | They are other configuration variables whose documentation is visible during the |
95 | configuration with ccmake. | |
b3695c67 | 96 |