Skip to content

Commit 0fda465

Browse files
committed
Build static library and for Lua 5.4
1 parent 3404ba1 commit 0fda465

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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

66
cmake_minimum_required(VERSION 2.6)
77

@@ -16,7 +16,7 @@ if(NOT CMAKE_BUILD_TYPE)
1616
FORCE)
1717
endif()
1818

19-
find_package(Lua51 REQUIRED)
19+
find_package(Lua 5.4 REQUIRED)
2020
include_directories(${LUA_INCLUDE_DIR})
2121

2222
if(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)
6868
else()
69-
set(_lua_module_dir "${_lua_lib_dir}/lua/5.1")
69+
set(_lua_module_dir "${_lua_lib_dir}/lua/5.4")
7070
endif()
7171

7272
if(MSVC)
@@ -76,7 +76,7 @@ if(MSVC)
7676
add_definitions(-Dstrncasecmp=_strnicmp)
7777
endif()
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})
8080
set_target_properties(cjson PROPERTIES PREFIX "")
8181
target_link_libraries(cjson ${_MODULE_LINK})
8282
install(TARGETS cjson DESTINATION "${_lua_module_dir}")

0 commit comments

Comments
 (0)