| 1 | cmake is used to generate the initial "Makefile" |
|---|
| 2 | (or whatever other build system you wish to use) |
|---|
| 3 | and to package files. It is advised to do the build |
|---|
| 4 | in an "out of source" directory such as a "build" |
|---|
| 5 | directory. For example, on unix you could type |
|---|
| 6 | from the top source directory: |
|---|
| 7 | |
|---|
| 8 | mkdir build |
|---|
| 9 | cd build |
|---|
| 10 | cmake .. |
|---|
| 11 | make |
|---|
| 12 | make install # or make install DESTDIR=/some/where for testing |
|---|
| 13 | make package # build install kit |
|---|
| 14 | |
|---|
| 15 | To see a list of makefile targets, type: |
|---|
| 16 | |
|---|
| 17 | make help |
|---|
| 18 | |
|---|
| 19 | If you get an error saying something like: |
|---|
| 20 | |
|---|
| 21 | > CMake Error at CMakeLists.txt:29 (cmake_minimum_required): |
|---|
| 22 | > CMake 2.8.4 or higher is required. You are running version 2.8.3 |
|---|
| 23 | |
|---|
| 24 | Then you either need to install a later version of cmake or |
|---|
| 25 | could try changing the cmake_minimum_required() line in CMakeLists.txt |
|---|
| 26 | to a lower number; however it possible that necessary |
|---|
| 27 | features/behaviour is missing in the lower version |
|---|
| 28 | |
|---|
| 29 | cmake can be used for "out of source" building, and |
|---|
| 30 | this is recommended as it keeps source and generated |
|---|
| 31 | files separate, so e.g.: |
|---|
| 32 | |
|---|
| 33 | mkdir /some/where/else |
|---|
| 34 | cd /some/where/else |
|---|
| 35 | cmake /path/to/nexus/definitions/source |
|---|
| 36 | make |
|---|
| 37 | |
|---|
| 38 | To see what options can be configured, or to use another builder, type: |
|---|
| 39 | |
|---|
| 40 | cmake-gui |
|---|
| 41 | |
|---|
| 42 | then choose the source and build directories, |
|---|
| 43 | press "configure" and then "generate" |
|---|
| 44 | |
|---|
| 45 | To see options etc. from the command line, type: |
|---|
| 46 | |
|---|
| 47 | cmake -L # or cmake -LH to see help too |
|---|
| 48 | |
|---|
| 49 | These values can be set in the gui or from the command line. |
|---|
| 50 | For example, in the top of the build directory run: |
|---|
| 51 | |
|---|
| 52 | cmake -DBUILD_SPHINX=ON . # set BUILD_SPHINX option for subsequent "make" |
|---|
| 53 | |
|---|
| 54 | But this is just an example. |
|---|
| 55 | The sphinx version of the manual is not ready to use cmake. |
|---|
| 56 | |
|---|
| 57 | If you are building a distribution kit on Windows using NSIS, see http://nsis.sourceforge.net/ZipDLL_plug-in if you get a ZipDLL error |
|---|
| 58 | |
|---|
| 59 | Windows |
|---|
| 60 | ------- |
|---|
| 61 | |
|---|
| 62 | To build PDF documentation on windows cygwin is required - it is called from the windows build to run DBLATEX. |
|---|
| 63 | Check the definition of CYGPATH_EXECUTABLE in the CMake cache |
|---|