Skip to content

Commit

Permalink
Merge pull request #196 from jow-/lib-socket
Browse files Browse the repository at this point in the history
lib: introduce socket library
  • Loading branch information
jow- authored Apr 24, 2024
2 parents cfe137b + e8d78a2 commit 6613368
Show file tree
Hide file tree
Showing 2 changed files with 3,549 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ option(RESOLV_SUPPORT "NS resolve plugin support" ON)
option(STRUCT_SUPPORT "Struct plugin support" ON)
option(ULOOP_SUPPORT "Uloop plugin support" ${DEFAULT_ULOOP_SUPPORT})
option(LOG_SUPPORT "Log plugin support" ON)
option(SOCKET_SUPPORT "Socket plugin support" ON)

set(LIB_SEARCH_PATH "${CMAKE_INSTALL_PREFIX}/lib/ucode/*.so:${CMAKE_INSTALL_PREFIX}/share/ucode/*.uc:./*.so:./*.uc" CACHE STRING "Default library search path")
string(REPLACE ":" "\", \"" LIB_SEARCH_DEFINE "${LIB_SEARCH_PATH}")
Expand Down Expand Up @@ -266,6 +267,13 @@ if(LOG_SUPPORT)
endif()
endif()

if(SOCKET_SUPPORT)
set(LIBRARIES ${LIBRARIES} socket_lib)
add_library(socket_lib MODULE lib/socket.c)
set_target_properties(socket_lib PROPERTIES OUTPUT_NAME socket PREFIX "")
target_link_options(socket_lib PRIVATE ${UCODE_MODULE_LINK_OPTIONS})
endif()

if(UNIT_TESTING)
enable_testing()
add_definitions(-DUNIT_TESTING)
Expand Down
Loading

0 comments on commit 6613368

Please sign in to comment.