Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
echo "" >> release-notes.md
echo "# Include in your CMake project" >> release-notes.md
echo "find_package(network_system REQUIRED)" >> release-notes.md
echo "target_link_libraries(your_app NetworkSystem::NetworkSystem)" >> release-notes.md
echo "target_link_libraries(your_app network_system::network_system)" >> release-notes.md
echo '```' >> release-notes.md
echo "" >> release-notes.md

Expand Down
80 changes: 40 additions & 40 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()
# Independent high-performance network system
##################################################

project(NetworkSystem
project(network_system
VERSION 0.1.1
DESCRIPTION "Independent High-Performance Network System"
LANGUAGES CXX
Expand Down Expand Up @@ -271,10 +271,10 @@ endfunction()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(NetworkSystemFeatures)
include(NetworkSystemDependencies)
include(NetworkSystemIntegration)
include(NetworkSystemInstall)
include(network_system_features)
include(network_system_dependencies)
include(network_system_integration)
include(network_system_install)

##################################################
# Dependency Detection
Expand Down Expand Up @@ -305,7 +305,7 @@ endif()
##################################################
# Shared Integration Objects (ODR Fix - Issue #555)
#
# These sources are shared between NetworkSystem and network-tcp.
# These sources are shared between network_system and network-tcp.
# Using an OBJECT library ensures symbols are defined exactly once,
# preventing ODR (One Definition Rule) violations that cause SEGV
# in sanitizer tests.
Expand Down Expand Up @@ -414,7 +414,7 @@ endif()
# Create Main Library
##################################################

add_library(NetworkSystem
add_library(network_system
# Main API implementation
src/network_system.cpp

Expand Down Expand Up @@ -537,7 +537,7 @@ add_library(NetworkSystem
# WARNING: Suppressions removed for strict code quality check.
# Fix the code instead of suppressing warnings!
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
# target_compile_options(NetworkSystem PRIVATE
# target_compile_options(network_system PRIVATE
# -Wno-sign-conversion
# -Wno-conversion
# -Wno-implicit-fallthrough
Expand All @@ -547,7 +547,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
# -Wno-unused-variable
# )
elseif(MSVC)
# target_compile_options(NetworkSystem PRIVATE
# target_compile_options(network_system PRIVATE
# /wd4244 # conversion from 'type1' to 'type2', possible loss of data
# /wd4267 # conversion from 'size_t' to 'type', possible loss of data
# /wd4100 # unreferenced formal parameter
Expand All @@ -562,7 +562,7 @@ option(BUILD_TLS_SUPPORT "Build with TLS/SSL support for secure messaging" ON)
option(BUILD_LZ4_COMPRESSION "Build with LZ4 compression support" ON)

if(BUILD_TLS_SUPPORT)
target_sources(NetworkSystem PRIVATE
target_sources(network_system PRIVATE
# secure_tcp_socket moved to libs/network-tcp (Issue #554)
# secure_messaging_udp moved to libs/network-udp (Issue #561)
src/internal/dtls_socket.cpp
Expand All @@ -575,34 +575,34 @@ if(BUILD_TLS_SUPPORT)
src/protocols/http2/http2_server.cpp
src/protocols/http2/http2_server_stream.cpp
)
target_compile_definitions(NetworkSystem PUBLIC BUILD_TLS_SUPPORT)
target_compile_definitions(network_system PUBLIC BUILD_TLS_SUPPORT)

# Find OpenSSL for TLS/SSL
# Minimum requirement: OpenSSL 3.0.0
# OpenSSL 1.1.x reached EOL on September 11, 2023 and is no longer supported
find_package(OpenSSL 3.0.0 REQUIRED)
target_link_libraries(NetworkSystem PUBLIC OpenSSL::SSL OpenSSL::Crypto)
target_link_libraries(network_system PUBLIC OpenSSL::SSL OpenSSL::Crypto)

message(STATUS "TLS/SSL support enabled (TLS 1.2/1.3)")
message(STATUS " OpenSSL version: ${OPENSSL_VERSION}")
endif()

# WebSocket support (conditional) - part of HTTP layer
if(BUILD_WEBSOCKET_SUPPORT)
target_sources(NetworkSystem PRIVATE
target_sources(network_system PRIVATE
src/internal/websocket_frame.cpp
src/internal/websocket_handshake.cpp
src/internal/websocket_protocol.cpp
src/internal/websocket_socket.cpp
src/http/websocket_client.cpp
src/http/websocket_server.cpp
)
target_compile_definitions(NetworkSystem PUBLIC BUILD_WEBSOCKET_SUPPORT)
target_compile_definitions(network_system PUBLIC BUILD_WEBSOCKET_SUPPORT)

# Find OpenSSL for SHA-1 hashing in handshake (if not already found)
if(NOT BUILD_TLS_SUPPORT)
find_package(OpenSSL 3.0.0 REQUIRED)
target_link_libraries(NetworkSystem PRIVATE OpenSSL::Crypto)
target_link_libraries(network_system PRIVATE OpenSSL::Crypto)
message(STATUS " OpenSSL version: ${OPENSSL_VERSION}")
endif()

Expand All @@ -616,9 +616,9 @@ if(BUILD_LZ4_COMPRESSION)
find_path(LZ4_INCLUDE_DIR NAMES lz4.h)

if(LZ4_LIBRARY AND LZ4_INCLUDE_DIR)
target_compile_definitions(NetworkSystem PUBLIC BUILD_LZ4_COMPRESSION)
target_include_directories(NetworkSystem PRIVATE ${LZ4_INCLUDE_DIR})
target_link_libraries(NetworkSystem PRIVATE ${LZ4_LIBRARY})
target_compile_definitions(network_system PUBLIC BUILD_LZ4_COMPRESSION)
target_include_directories(network_system PRIVATE ${LZ4_INCLUDE_DIR})
target_link_libraries(network_system PRIVATE ${LZ4_LIBRARY})
message(STATUS "LZ4 compression enabled")
message(STATUS " LZ4 library: ${LZ4_LIBRARY}")
message(STATUS " LZ4 include: ${LZ4_INCLUDE_DIR}")
Expand All @@ -628,9 +628,9 @@ if(BUILD_LZ4_COMPRESSION)
if(PkgConfig_FOUND)
pkg_check_modules(LZ4 QUIET liblz4)
if(LZ4_FOUND)
target_compile_definitions(NetworkSystem PUBLIC BUILD_LZ4_COMPRESSION)
target_include_directories(NetworkSystem PRIVATE ${LZ4_INCLUDE_DIRS})
target_link_libraries(NetworkSystem PRIVATE ${LZ4_LIBRARIES})
target_compile_definitions(network_system PUBLIC BUILD_LZ4_COMPRESSION)
target_include_directories(network_system PRIVATE ${LZ4_INCLUDE_DIRS})
target_link_libraries(network_system PRIVATE ${LZ4_LIBRARIES})
message(STATUS "LZ4 compression enabled (via pkg-config)")
message(STATUS " LZ4 version: ${LZ4_VERSION}")
else()
Expand All @@ -651,8 +651,8 @@ if(BUILD_ZLIB_COMPRESSION)
find_package(ZLIB QUIET)

if(ZLIB_FOUND)
target_compile_definitions(NetworkSystem PUBLIC BUILD_ZLIB_COMPRESSION)
target_link_libraries(NetworkSystem PRIVATE ZLIB::ZLIB)
target_compile_definitions(network_system PUBLIC BUILD_ZLIB_COMPRESSION)
target_link_libraries(network_system PRIVATE ZLIB::ZLIB)
message(STATUS "ZLIB compression enabled (gzip/deflate)")
message(STATUS " ZLIB version: ${ZLIB_VERSION_STRING}")
else()
Expand All @@ -671,13 +671,13 @@ if(NETWORK_ENABLE_GRPC_OFFICIAL AND GRPC_FOUND)
message(STATUS "========================================")

# Add gRPC wrapper sources
target_sources(NetworkSystem PRIVATE
target_sources(network_system PRIVATE
src/protocols/grpc/grpc_official_wrapper.cpp
)

if(GRPC_CMAKE_CONFIG)
# Use CMake config targets (preferred)
target_link_libraries(NetworkSystem PRIVATE
target_link_libraries(network_system PRIVATE
gRPC::grpc++
gRPC::grpc++_reflection
protobuf::libprotobuf
Expand All @@ -697,12 +697,12 @@ if(NETWORK_ENABLE_GRPC_OFFICIAL AND GRPC_FOUND)
endif()
elseif(GRPC_PKGCONFIG)
# Use pkg-config libraries
target_include_directories(NetworkSystem PRIVATE
target_include_directories(network_system PRIVATE
${GRPCPP_INCLUDE_DIRS}
${PROTOBUF_INCLUDE_DIRS}
)

target_link_libraries(NetworkSystem PRIVATE
target_link_libraries(network_system PRIVATE
${GRPCPP_LIBRARIES}
${PROTOBUF_LIBRARIES}
)
Expand All @@ -712,7 +712,7 @@ if(NETWORK_ENABLE_GRPC_OFFICIAL AND GRPC_FOUND)
endif()

# Define compile-time flag
target_compile_definitions(NetworkSystem PUBLIC NETWORK_GRPC_OFFICIAL=1)
target_compile_definitions(network_system PUBLIC NETWORK_GRPC_OFFICIAL=1)

message(STATUS "")
message(STATUS "Note: Existing gRPC API (grpc_server, grpc_client) remains unchanged.")
Expand All @@ -726,13 +726,13 @@ else()
endif()

# Set target properties
set_target_properties(NetworkSystem PROPERTIES
set_target_properties(network_system PROPERTIES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
)

# Include directories
target_include_directories(NetworkSystem
target_include_directories(network_system
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
Expand All @@ -742,34 +742,34 @@ target_include_directories(NetworkSystem

# Link to network-core for shared interfaces (Issue #538, #539)
if(TARGET network-core)
target_link_libraries(NetworkSystem PUBLIC network-core)
target_link_libraries(network_system PUBLIC network-core)
endif()

# Link to network-tcp for TCP protocol support (Issue #554)
if(TARGET network-tcp)
target_link_libraries(NetworkSystem PUBLIC network-tcp)
target_link_libraries(network_system PUBLIC network-tcp)
endif()

# Link to network-udp for UDP protocol support (Issue #618)
if(TARGET network-udp)
target_link_libraries(NetworkSystem PUBLIC network-udp)
target_link_libraries(network_system PUBLIC network-udp)
endif()

# Note: Integration objects are provided by network-tcp (ODR fix - Issue #555)
# NetworkSystem gets these symbols through linking with network-tcp
# network_system gets these symbols through linking with network-tcp

##################################################
# Configure Integrations
##################################################

setup_network_system_integrations(NetworkSystem)
setup_network_system_integrations(network_system)

# Messaging bridge (optional - requires external systems)
if(BUILD_MESSAGING_BRIDGE)
target_sources(NetworkSystem PRIVATE
target_sources(network_system PRIVATE
src/integration/messaging_bridge.cpp
)
target_compile_definitions(NetworkSystem PRIVATE BUILD_MESSAGING_BRIDGE)
target_compile_definitions(network_system PRIVATE BUILD_MESSAGING_BRIDGE)
endif()

##################################################
Expand All @@ -782,7 +782,7 @@ option(BUILD_VERIFY_BUILD "Build verify_build executable" OFF)

if(BUILD_VERIFY_BUILD)
add_executable(verify_build verify_build.cpp)
target_link_libraries(verify_build PRIVATE NetworkSystem)
target_link_libraries(verify_build PRIVATE network_system)

# Add system include paths to verify_build
if(CONTAINER_SYSTEM_INCLUDE_DIR)
Expand Down Expand Up @@ -890,7 +890,7 @@ endif()

# CPack only applies to standalone builds (not as a subdirectory)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
include(cmake/NetworkSystemCPack.cmake)
include(cmake/network_system_cpack.cmake)
endif()

##################################################
Expand Down Expand Up @@ -973,7 +973,7 @@ endif()
##################################################

message(STATUS "========================================")
message(STATUS "NetworkSystem Build Configuration:")
message(STATUS "network_system Build Configuration:")
message(STATUS "========================================")
message(STATUS "")
message(STATUS "Dependency Chain (Tier 4):")
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if(benchmark_FOUND OR BENCHMARK_FOUND)

target_link_libraries(network_benchmarks
PRIVATE
NetworkSystem
network_system
benchmark::benchmark
benchmark::benchmark_main
)
Expand All @@ -40,7 +40,7 @@ if(benchmark_FOUND OR BENCHMARK_FOUND)
${CMAKE_CURRENT_SOURCE_DIR}/../src
)

# Setup integrations for benchmarks (same as NetworkSystem target)
# Setup integrations for benchmarks (same as network_system target)
setup_asio_integration(network_benchmarks)

# Add system integration paths and definitions
Expand Down
12 changes: 1 addition & 11 deletions cmake/network_system-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ set(network_system_FOUND TRUE)
# Provide information about the package
set(network_system_VERSION @PROJECT_VERSION@)
set(network_system_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/network_system")
set(network_system_LIBRARIES network_system::NetworkSystem)

# Legacy variables for backward compatibility
set(NetworkSystem_FOUND TRUE)
set(NETWORKSYSTEM_FOUND TRUE)
set(NetworkSystem_VERSION ${network_system_VERSION})
set(NetworkSystem_INCLUDE_DIRS ${network_system_INCLUDE_DIRS})
set(NetworkSystem_LIBRARIES ${network_system_LIBRARIES})
set(NETWORKSYSTEM_VERSION ${network_system_VERSION})
set(NETWORKSYSTEM_INCLUDE_DIRS ${network_system_INCLUDE_DIRS})
set(NETWORKSYSTEM_LIBRARIES ${network_system_LIBRARIES})
set(network_system_LIBRARIES network_system::network_system)

message(STATUS "Found network_system: ${network_system_VERSION}")
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CPack Configuration for Network System

set(CPACK_PACKAGE_NAME "NetworkSystem")
set(CPACK_PACKAGE_NAME "network_system")
set(CPACK_PACKAGE_VENDOR "Network System Team")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "High-performance asynchronous network communication library")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
Expand Down Expand Up @@ -35,15 +35,15 @@ if(WIN32)

# Start menu shortcuts
set(CPACK_NSIS_CREATE_ICONS_EXTRA
"CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk' '$INSTDIR\\\\share\\\\doc\\\\NetworkSystem\\\\API_REFERENCE.md'"
"CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk' '$INSTDIR\\\\share\\\\doc\\\\network_system\\\\API_REFERENCE.md'"
)
set(CPACK_NSIS_DELETE_ICONS_EXTRA
"Delete '$SMPROGRAMS\\\\$START_MENU\\\\Documentation.lnk'"
)

elseif(APPLE)
set(CPACK_GENERATOR "TGZ;DragNDrop")
set(CPACK_DMG_VOLUME_NAME "NetworkSystem-${CPACK_PACKAGE_VERSION}")
set(CPACK_DMG_VOLUME_NAME "network_system-${CPACK_PACKAGE_VERSION}")
set(CPACK_DMG_FORMAT "UDZO") # Compressed
set(CPACK_PACKAGE_FILE_NAME "network_system-${CPACK_PACKAGE_VERSION}-macos")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##################################################
# NetworkSystemDependencies.cmake
#
# Dependency finding module for NetworkSystem
# Dependency finding module for network_system
# Handles ASIO and system integrations
##################################################

Expand Down Expand Up @@ -684,7 +684,7 @@ endfunction()
# Main dependency finding function
##################################################
function(find_network_system_dependencies)
message(STATUS "Finding NetworkSystem dependencies...")
message(STATUS "Finding network_system dependencies...")

find_asio_library()
find_container_system()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##################################################
# NetworkSystemFeatures.cmake
#
# Feature detection module for NetworkSystem
# Feature detection module for network_system
# Checks ASIO and coroutine support
##################################################

Expand Down Expand Up @@ -98,7 +98,7 @@ endfunction()
# Main feature check function
##################################################
function(check_network_system_features)
message(STATUS "Checking NetworkSystem feature support...")
message(STATUS "Checking network_system feature support...")

check_asio_support()
check_coroutine_support()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##################################################
# NetworkSystemInstall.cmake
#
# Installation configuration for NetworkSystem
# Installation configuration for network_system
##################################################

include(GNUInstallDirs)
Expand All @@ -12,7 +12,7 @@ include(CMakePackageConfigHelpers)
##################################################
function(install_network_system_library)
# Build list of targets to install
set(_INSTALL_TARGETS NetworkSystem)
set(_INSTALL_TARGETS network_system)

# Include network-core if it exists (Issue #538, #539)
if(TARGET network-core)
Expand Down
Loading
Loading