From 3871cb71c858b8e542b78677f782b88ddd820cb3 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Wed, 4 Jan 2012 08:34:13 +1030 Subject: Use DISABLE_INVALID_NUMBERS on WIN32 CMake builds --- CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f3e970..18d6b97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,24 +51,24 @@ if(NOT HAVE_ISINF) add_definitions(-DUSE_INTERNAL_ISINF) endif() +set(_MODULE_LINK "${CMAKE_THREAD_LIBS_INIT}") +get_filename_component(_lua_lib_dir ${LUA_LIBRARY} PATH) + if(APPLE) set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -undefined dynamic_lookup") endif() -get_filename_component(_lua_lib_dir ${LUA_LIBRARY} PATH) if(WIN32) + # Win32 modules need to be linked to the Lua library. + set(_MODULE_LINK ${LUA_LIBRARY} ${_MODULE_LINK}) set(_lua_module_dir "${_lua_lib_dir}") + # Windows sprintf()/strtod() handle NaN/inf differently. Not supported. + add_definitions(-DDISABLE_INVALID_NUMBERS) else() set(_lua_module_dir "${_lua_lib_dir}/lua/5.1") endif() -set(_MODULE_LINK "${CMAKE_THREAD_LIBS_INIT}") -if(WIN32) - # Win32 modules need to be linked to the Lua library. - set(_MODULE_LINK ${LUA_LIBRARY} ${_MODULE_LINK}) -endif() - add_library(cjson MODULE lua_cjson.c strbuf.c ${FPCONV_SOURCES}) set_target_properties(cjson PROPERTIES PREFIX "") target_link_libraries(cjson ${_MODULE_LINK}) -- cgit v1.2.3-55-g6feb