Skip to content

Add luasocket library for managing an internal server #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "libs/luautf8"]
path = libs/luautf8
url = https://github.com/starwing/luautf8.git
[submodule "libs/luasocket"]
path = libs/luasocket
url = https://github.com/lunarmodules/luasocket.git
34 changes: 34 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,40 @@ target_link_libraries(lua-utf8
install(TARGETS lua-utf8 RUNTIME DESTINATION ".")
install(FILES $<TARGET_RUNTIME_DLLS:lua-utf8> DESTINATION ".")

# luasocket module

add_library(luasocket SHARED
"libs/luasocket/src/auxiliar.c"
"libs/luasocket/src/buffer.c"
"libs/luasocket/src/compat.c"
"libs/luasocket/src/except.c"
"libs/luasocket/src/inet.c"
"libs/luasocket/src/io.c"
"libs/luasocket/src/luasocket.c"
"libs/luasocket/src/options.c"
"libs/luasocket/src/select.c"
"libs/luasocket/src/tcp.c"
"libs/luasocket/src/timeout.c"
"libs/luasocket/src/udp.c"
"libs/luasocket/src/wsocket.c"
)

target_include_directories(luasocket
PRIVATE
${LSOCKET_SOURCE_DIR}/src
)

target_link_libraries(luasocket
PRIVATE
LuaJIT::LuaJIT
wsock32
ws2_32
)

set_target_properties( luasocket PROPERTIES OUTPUT_NAME "socket" )
install(TARGETS luasocket RUNTIME DESTINATION ".")
install(FILES $<TARGET_RUNTIME_DLLS:luasocket> DESTINATION ".")

# lzip module

add_library(lzip SHARED libs/LZip/lzip.cpp)
Expand Down
1 change: 1 addition & 0 deletions libs/luasocket
Submodule luasocket added at 66cdec
Loading