File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,17 @@ else()
28
28
set (_lua_module_dir "${_lua_lib_dir} /lua/5.1" )
29
29
endif ()
30
30
31
+ option (Build32Bit "Build 32-bit Library" OFF )
32
+
31
33
set (CMAKE_C_FLAGS "-O2 -g -ggdb -Wall -pedantic -std=c99" )
32
34
add_library (cmsgpack MODULE lua_cmsgpack.c)
33
35
set_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
+
34
42
target_link_libraries (cmsgpack ${_MODULE_LINK} )
35
43
install (TARGETS cmsgpack DESTINATION "${_lua_module_dir} " )
36
44
Original file line number Diff line number Diff line change @@ -83,6 +83,13 @@ Build and test:
83
83
make
84
84
lua ../test.lua
85
85
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
+
86
93
NESTED TABLES
87
94
---
88
95
Nested tables are handled correctly up to ` LUACMSGPACK_MAX_NESTING ` levels of
You can’t perform that action at this time.
0 commit comments