From 88bb249473db4e4923e4c27a8e3ece7a77e738ce Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Thu, 19 Jan 2012 00:19:47 +1030 Subject: Disable registration of cjson global variable Disable registration of cjson module table global variable in the default build. Automatically creating a variable in the global namespace can cause issues for other software and is no longer recommended with Lua. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3768fc4..c18381f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ project(lua-cjson C) cmake_minimum_required(VERSION 2.6) -option(DISABLE_CJSON_GLOBAL "Disable global registration of the 'cjson' module table") +option(ENABLE_CJSON_GLOBAL "Register cjson module table as a global variable - not recommended") option(USE_INTERNAL_DTOA "Use internal strtod() / dtoa code for performance") option(MULTIPLE_THREADS "Build internal dtoa with support for multi-threaded applications - recommended" ON) @@ -20,8 +20,8 @@ endif() find_package(Lua51 REQUIRED) include_directories(${LUA_INCLUDE_DIR}) -if(DISABLE_CJSON_GLOBAL) - add_definitions(-DDISABLE_CJSON_GLOBAL) +if(ENABLE_CJSON_GLOBAL) + add_definitions(-DENABLE_CJSON_GLOBAL) endif() if(NOT USE_INTERNAL_DTOA) -- cgit v1.2.3-55-g6feb