Skip to content

Commit 17df2c9

Browse files
authored
Merge pull request #72 from Wires77/add_luasocket
Add luasocket library for managing an internal server
2 parents 758d35a + 7bc43d3 commit 17df2c9

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
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
1619
[submodule "dep/compressonator"]
1720
path = dep/compressonator
1821
url = https://github.com/GPUOpen-Tools/compressonator

CMakeLists.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,40 @@ target_link_libraries(lua-utf8
308308
install(TARGETS lua-utf8 RUNTIME DESTINATION ".")
309309
install(FILES $<TARGET_RUNTIME_DLLS:lua-utf8> DESTINATION ".")
310310

311+
# luasocket module
312+
313+
add_library(luasocket SHARED
314+
"libs/luasocket/src/auxiliar.c"
315+
"libs/luasocket/src/buffer.c"
316+
"libs/luasocket/src/compat.c"
317+
"libs/luasocket/src/except.c"
318+
"libs/luasocket/src/inet.c"
319+
"libs/luasocket/src/io.c"
320+
"libs/luasocket/src/luasocket.c"
321+
"libs/luasocket/src/options.c"
322+
"libs/luasocket/src/select.c"
323+
"libs/luasocket/src/tcp.c"
324+
"libs/luasocket/src/timeout.c"
325+
"libs/luasocket/src/udp.c"
326+
"libs/luasocket/src/wsocket.c"
327+
)
328+
329+
target_include_directories(luasocket
330+
PRIVATE
331+
${LSOCKET_SOURCE_DIR}/src
332+
)
333+
334+
target_link_libraries(luasocket
335+
PRIVATE
336+
LuaJIT::LuaJIT
337+
wsock32
338+
ws2_32
339+
)
340+
341+
set_target_properties( luasocket PROPERTIES OUTPUT_NAME "socket" )
342+
install(TARGETS luasocket RUNTIME DESTINATION ".")
343+
install(FILES $<TARGET_RUNTIME_DLLS:luasocket> DESTINATION ".")
344+
311345
# lzip module
312346

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

libs/luasocket

Submodule luasocket added at 66cdeca

0 commit comments

Comments
 (0)