diff options
| author | Mark Pulford <mark@kyne.com.au> | 2011-12-15 21:55:14 +1030 |
|---|---|---|
| committer | Mark Pulford <mark@kyne.com.au> | 2011-12-15 21:55:14 +1030 |
| commit | 9bb1f928e03a022e7382b1d9c7b14384fe348ffb (patch) | |
| tree | 0665bfe37410a878638f3d2a5dbd99580c3e5a23 | |
| parent | d9aafecde941ae85334462269e521f5a9e1c9d6c (diff) | |
| download | lua-cjson-9bb1f928e03a022e7382b1d9c7b14384fe348ffb.tar.gz lua-cjson-9bb1f928e03a022e7382b1d9c7b14384fe348ffb.tar.bz2 lua-cjson-9bb1f928e03a022e7382b1d9c7b14384fe348ffb.zip | |
Add CMake build documentation
Diffstat (limited to '')
| -rw-r--r-- | manual.txt | 33 |
1 files changed, 26 insertions, 7 deletions
| @@ -19,7 +19,7 @@ Lua CJSON provides fast JSON parsing and encoding support for Lua. | |||
| 19 | - Multi-threading within a single Lua state is not supported. | 19 | - Multi-threading within a single Lua state is not supported. |
| 20 | However, this is not a recommended configuration under Lua. | 20 | However, this is not a recommended configuration under Lua. |
| 21 | 21 | ||
| 22 | Lua CJSON is covered by the MIT license. See the file +LICENSE+ for | 22 | Lua CJSON is covered by the MIT license. Review the file +LICENSE+ for |
| 23 | details. | 23 | details. |
| 24 | 24 | ||
| 25 | The latest version of this software is available from the | 25 | The latest version of this software is available from the |
| @@ -35,14 +35,16 @@ Installation Methods | |||
| 35 | Lua CJSON requires either http://www.lua.org[Lua] or | 35 | Lua CJSON requires either http://www.lua.org[Lua] or |
| 36 | http://www.luajit.org[LuaJIT] to build. | 36 | http://www.luajit.org[LuaJIT] to build. |
| 37 | 37 | ||
| 38 | There are 3 build methods available: | 38 | There are 4 build methods available: |
| 39 | 39 | ||
| 40 | Make:: | 40 | Make:: |
| 41 | POSIX (including Linux, BSD, Mac OSX & Solaris) | 41 | Unix (including Linux, BSD, Mac OSX & Solaris) |
| 42 | CMake:: | ||
| 43 | Unix, Windows | ||
| 42 | RPM:: | 44 | RPM:: |
| 43 | Linux | 45 | Linux |
| 44 | LuaRocks:: | 46 | LuaRocks:: |
| 45 | POSIX (including Linux, BSD, Mac OSX & Solaris), Windows | 47 | Unix, Windows |
| 46 | 48 | ||
| 47 | 49 | ||
| 48 | Build options (#define) | 50 | Build options (#define) |
| @@ -52,7 +54,7 @@ Lua CJSON uses +strtod+(3) and +snprintf+(3) to perform numeric | |||
| 52 | conversion as they are usually well supported, fast and bug free. To | 54 | conversion as they are usually well supported, fast and bug free. To |
| 53 | ensure JSON encoding/decoding works correctly for locales using comma | 55 | ensure JSON encoding/decoding works correctly for locales using comma |
| 54 | decimal separators, Lua CJSON may optionally be compiled with one of | 56 | decimal separators, Lua CJSON may optionally be compiled with one of |
| 55 | the following (+#define+): | 57 | the following preprocessor macros: |
| 56 | 58 | ||
| 57 | USE_POSIX_USELOCALE:: | 59 | USE_POSIX_USELOCALE:: |
| 58 | Thread safe. Supported by Linux and Mac OSX. Recommended where available. | 60 | Thread safe. Supported by Linux and Mac OSX. Recommended where available. |
| @@ -81,6 +83,23 @@ make | |||
| 81 | cp cjson.so $your_lua_module_directory | 83 | cp cjson.so $your_lua_module_directory |
| 82 | 84 | ||
| 83 | 85 | ||
| 86 | CMake | ||
| 87 | ~~~~~ | ||
| 88 | |||
| 89 | http://www.cmake.org[CMake] can generate build configuration for many different | ||
| 90 | platforms (including Unix and Windows). | ||
| 91 | |||
| 92 | [source,sh] | ||
| 93 | mkdir build | ||
| 94 | cd build | ||
| 95 | cmake .. | ||
| 96 | make | ||
| 97 | cp cjson.so $your_lua_module_directory | ||
| 98 | |||
| 99 | Review the http://www.cmake.org/cmake/help/documentation.html[CMake documentation] | ||
| 100 | for further details. | ||
| 101 | |||
| 102 | |||
| 84 | RPM | 103 | RPM |
| 85 | ~~~ | 104 | ~~~ |
| 86 | 105 | ||
| @@ -110,8 +129,8 @@ LuaRocks does not support platform specific configuration for Solaris. | |||
| 110 | On Solaris, you may need to manually uncomment +USE_INTERNAL_ISINF+ in | 129 | On Solaris, you may need to manually uncomment +USE_INTERNAL_ISINF+ in |
| 111 | the rockspec before building this module. | 130 | the rockspec before building this module. |
| 112 | 131 | ||
| 113 | See the http://luarocks.org/en/Documentation[LuaRocks documentation] for | 132 | Review the http://luarocks.org/en/Documentation[LuaRocks documentation] |
| 114 | further details. | 133 | for further details. |
| 115 | 134 | ||
| 116 | 135 | ||
| 117 | API (Functions) | 136 | API (Functions) |
