11# If Lua is installed in a non-standard location, please set the LUA_DIR
22# environment variable to point to prefix for the install. Eg:
33# Unix: export LUA_DIR=/home/user/pkg
4- # Windows: set LUA_DIR=c:\lua51
4+ # Windows: set LUA_DIR=c:\lua54
55
66cmake_minimum_required (VERSION 2.6)
77
@@ -16,7 +16,7 @@ if(NOT CMAKE_BUILD_TYPE)
1616 FORCE)
1717endif ()
1818
19- find_package (Lua51 REQUIRED)
19+ find_package (Lua 5.4 REQUIRED)
2020include_directories (${LUA_INCLUDE_DIR} )
2121
2222if (NOT USE_INTERNAL_FPCONV)
@@ -66,7 +66,7 @@ if(WIN32)
6666 # Windows sprintf()/strtod() handle NaN/inf differently. Not supported.
6767 add_definitions (-DDISABLE_INVALID_NUMBERS)
6868else ()
69- set (_lua_module_dir "${_lua_lib_dir} /lua/5.1 " )
69+ set (_lua_module_dir "${_lua_lib_dir} /lua/5.4 " )
7070endif ()
7171
7272if (MSVC )
@@ -76,7 +76,7 @@ if(MSVC)
7676 add_definitions (-Dstrncasecmp=_strnicmp)
7777endif ()
7878
79- add_library (cjson MODULE lua_cjson.c strbuf.c ${FPCONV_SOURCES} )
79+ add_library (cjson STATIC lua_cjson.c strbuf.c ${FPCONV_SOURCES} )
8080set_target_properties (cjson PROPERTIES PREFIX "" )
8181target_link_libraries (cjson ${_MODULE_LINK} )
8282install (TARGETS cjson DESTINATION "${_lua_module_dir} " )
0 commit comments