File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,17 @@ else()
2828 set (_lua_module_dir "${_lua_lib_dir} /lua/5.1" )
2929endif ()
3030
31+ option (Build32Bit "Build 32-bit Library" OFF )
32+
3133set (CMAKE_C_FLAGS "-O2 -g -ggdb -Wall -pedantic -std=c99" )
3234add_library (cmsgpack MODULE lua_cmsgpack.c )
3335set_target_properties (cmsgpack PROPERTIES PREFIX "" )
36+
37+ if (Build32Bit)
38+ set_target_properties (cmsgpack
39+ PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32" )
40+ endif ()
41+
3442target_link_libraries (cmsgpack ${_MODULE_LINK} )
3543install (TARGETS cmsgpack DESTINATION "${_lua_module_dir} " )
3644
Original file line number Diff line number Diff line change @@ -83,6 +83,13 @@ Build and test:
8383 make
8484 lua ../test.lua
8585
86+ You can build a 32-bit module on a 64-bit platform with:
87+
88+ mkdir build; cd build
89+ cmake -DBuild32Bit=ON ..
90+ make
91+ lua ../test.lua
92+
8693NESTED TABLES
8794---
8895Nested tables are handled correctly up to ` LUACMSGPACK_MAX_NESTING ` levels of
You can’t perform that action at this time.
0 commit comments