diff options
author | Mark Pulford <mark@kyne.com.au> | 2012-01-18 19:48:17 +1030 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2012-03-04 18:54:35 +1030 |
commit | 90e08aa69d23df8c2eb3e231d57a46281d330f03 (patch) | |
tree | df7a5b05d3371be6baf3a16394d263a61d68fd67 | |
parent | 0c6f2e488e17528ae42481d09879fd36551000e9 (diff) | |
download | lua-cjson-90e08aa69d23df8c2eb3e231d57a46281d330f03.tar.gz lua-cjson-90e08aa69d23df8c2eb3e231d57a46281d330f03.tar.bz2 lua-cjson-90e08aa69d23df8c2eb3e231d57a46281d330f03.zip |
Add CMake option to toggle DISABLE_CJSON_GLOBAL
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 18d6b97..3768fc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -6,6 +6,7 @@ | |||
6 | project(lua-cjson C) | 6 | project(lua-cjson C) |
7 | cmake_minimum_required(VERSION 2.6) | 7 | cmake_minimum_required(VERSION 2.6) |
8 | 8 | ||
9 | option(DISABLE_CJSON_GLOBAL "Disable global registration of the 'cjson' module table") | ||
9 | option(USE_INTERNAL_DTOA "Use internal strtod() / dtoa code for performance") | 10 | option(USE_INTERNAL_DTOA "Use internal strtod() / dtoa code for performance") |
10 | option(MULTIPLE_THREADS | 11 | option(MULTIPLE_THREADS |
11 | "Build internal dtoa with support for multi-threaded applications - recommended" ON) | 12 | "Build internal dtoa with support for multi-threaded applications - recommended" ON) |
@@ -19,6 +20,10 @@ endif() | |||
19 | find_package(Lua51 REQUIRED) | 20 | find_package(Lua51 REQUIRED) |
20 | include_directories(${LUA_INCLUDE_DIR}) | 21 | include_directories(${LUA_INCLUDE_DIR}) |
21 | 22 | ||
23 | if(DISABLE_CJSON_GLOBAL) | ||
24 | add_definitions(-DDISABLE_CJSON_GLOBAL) | ||
25 | endif() | ||
26 | |||
22 | if(NOT USE_INTERNAL_DTOA) | 27 | if(NOT USE_INTERNAL_DTOA) |
23 | # Use libc number conversion routines (strtod(), sprintf()) | 28 | # Use libc number conversion routines (strtod(), sprintf()) |
24 | set(FPCONV_SOURCES fpconv.c) | 29 | set(FPCONV_SOURCES fpconv.c) |