Skip to content

Commit 16cb189

Browse files
committed
Add luasocket library for managing an internal server
1 parent 84b9685 commit 16cb189

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
[submodule "libs/luautf8"]
1414
path = libs/luautf8
1515
url = https://github.com/starwing/luautf8.git
16+
[submodule "libs/luasocket"]
17+
path = libs/luasocket
18+
url = https://github.com/lunarmodules/luasocket.git

CMakeLists.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,39 @@ target_link_libraries(lua-utf8
292292
install(TARGETS lua-utf8 RUNTIME DESTINATION ".")
293293
install(FILES $<TARGET_RUNTIME_DLLS:lua-utf8> DESTINATION ".")
294294

295+
# luasocket module
296+
297+
add_library(luasocket SHARED
298+
"libs/luasocket/src/auxiliar.c"
299+
"libs/luasocket/src/buffer.c"
300+
"libs/luasocket/src/compat.c"
301+
"libs/luasocket/src/except.c"
302+
"libs/luasocket/src/inet.c"
303+
"libs/luasocket/src/io.c"
304+
"libs/luasocket/src/luasocket.c"
305+
"libs/luasocket/src/options.c"
306+
"libs/luasocket/src/select.c"
307+
"libs/luasocket/src/tcp.c"
308+
"libs/luasocket/src/timeout.c"
309+
"libs/luasocket/src/udp.c"
310+
"libs/luasocket/src/wsocket.c"
311+
)
312+
313+
target_include_directories(luasocket
314+
PRIVATE
315+
${LSOCKET_SOURCE_DIR}/src
316+
)
317+
318+
target_link_libraries(luasocket
319+
PRIVATE
320+
LuaJIT::LuaJIT
321+
wsock32
322+
ws2_32
323+
)
324+
325+
install(TARGETS luasocket RUNTIME DESTINATION ".")
326+
install(FILES $<TARGET_RUNTIME_DLLS:luasocket> DESTINATION ".")
327+
295328
# lzip module
296329

297330
add_library(lzip SHARED libs/LZip/lzip.cpp)

libs/luasocket

Submodule luasocket added at 66cdeca

0 commit comments

Comments
 (0)