Skip to content

Commit

Permalink
remove redundant code/white space
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed May 28, 2024
1 parent f48ea2c commit d147372
Show file tree
Hide file tree
Showing 30 changed files with 10 additions and 239 deletions.
12 changes: 0 additions & 12 deletions tunnels/adapters/bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@


add_library(Bridge STATIC
bridge.c

)


#ww api
target_include_directories(Bridge PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(Bridge ww)


# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)





target_compile_definitions(Bridge PRIVATE Bridge_VERSION=0.1)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(Bridge PRIVATE DEBUG=1)

endif()
3 changes: 0 additions & 3 deletions tunnels/adapters/connector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ target_link_libraries(Connector ww)
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)

target_compile_definitions(Connector PRIVATE Connector_VERSION=0.1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(Connector PRIVATE DEBUG=1)
endif()
3 changes: 0 additions & 3 deletions tunnels/adapters/connector/tcp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ target_link_libraries(TcpConnector ww)
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)

target_compile_definitions(TcpConnector PRIVATE TcpConnector_VERSION=0.1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(TcpConnector PRIVATE DEBUG=1)
endif()
7 changes: 0 additions & 7 deletions tunnels/adapters/connector/udp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@


add_library(UdpConnector STATIC
udp_connector.c

)


#ww api
target_include_directories(UdpConnector PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(UdpConnector ww)


# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)


target_compile_definitions(UdpConnector PRIVATE UdpConnector_VERSION=0.1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(UdpConnector PRIVATE DEBUG=1)
endif()
6 changes: 1 addition & 5 deletions tunnels/adapters/listener/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


add_library(Listener STATIC
listener.c

Expand All @@ -9,8 +8,5 @@ add_library(Listener STATIC
target_include_directories(Listener PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(Listener ww)


target_compile_definitions(Listener PRIVATE Listener_VERSION=0.1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(Listener PRIVATE DEBUG=1)
endif()

12 changes: 0 additions & 12 deletions tunnels/adapters/listener/tcp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@


add_library(TcpListener STATIC
tcp_listener.c

)


#ww api
target_include_directories(TcpListener PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(TcpListener ww)


# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)





target_compile_definitions(TcpListener PRIVATE TcpListener_VERSION=0.1)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(TcpListener PRIVATE DEBUG=1)

endif()
10 changes: 0 additions & 10 deletions tunnels/adapters/listener/udp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@


add_library(UdpListener STATIC
udp_listener.c

)


#ww api
target_include_directories(UdpListener PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(UdpListener ww)
Expand All @@ -15,12 +13,4 @@ target_link_libraries(UdpListener ww)
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)





target_compile_definitions(UdpListener PRIVATE UdpListener_VERSION=0.1)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(UdpListener PRIVATE DEBUG=1)

endif()
10 changes: 1 addition & 9 deletions tunnels/client/header/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@

add_library(HeaderClient STATIC
header_client.c

)



#ww api
target_include_directories(HeaderClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(HeaderClient PUBLIC ww)



# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)


target_compile_definitions(HeaderClient PRIVATE HeaderClient_VERSION=0.1)


if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(HeaderClient PRIVATE DEBUG=1)
endif()
9 changes: 1 addition & 8 deletions tunnels/client/http2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

add_library(Http2Client STATIC
http2_client.c
)


#ww api
target_include_directories(Http2Client PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(Http2Client PUBLIC ww)
Expand All @@ -13,9 +13,6 @@ target_include_directories(Http2Client PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../
# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)




CPMAddPackage(
NAME nghttp2
GIT_TAG v1.60.0
Expand All @@ -29,7 +26,3 @@ CPMAddPackage(
)

target_link_libraries(Http2Client PUBLIC nghttp2_static)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(Http2Client PRIVATE DEBUG=1)
endif()
10 changes: 0 additions & 10 deletions tunnels/client/openssl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


add_library(OpenSSLClient STATIC
openssl_client.c

Expand All @@ -10,15 +9,12 @@ add_library(OpenSSLClient STATIC
target_include_directories(OpenSSLClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(OpenSSLClient ww)


target_include_directories(OpenSSLClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../shared/openssl)


# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)



# add openssl (default version is latest 3.3.0 +)
CPMAddPackage(
NAME openssl-cmake
Expand All @@ -35,9 +31,3 @@ target_link_libraries(OpenSSLClient
)

target_compile_definitions(OpenSSLClient PRIVATE OpenSSLClient_VERSION=0.1)


if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(OpenSSLClient PRIVATE DEBUG=1)

endif()
8 changes: 1 addition & 7 deletions tunnels/client/preconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

add_library(PreConnectClient STATIC
preconnect_client.c

)



#ww api
target_include_directories(PreConnectClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(PreConnectClient PUBLIC ww)
Expand All @@ -16,8 +15,3 @@ include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)


target_compile_definitions(PreConnectClient PRIVATE PreConnectClient_VERSION=0.1)


if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(PreConnectClient PRIVATE DEBUG=1)
endif()
4 changes: 0 additions & 4 deletions tunnels/client/protobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ add_library(ProtoBufClient STATIC
)



#ww api
target_include_directories(ProtoBufClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(ProtoBufClient PUBLIC ww)
Expand Down Expand Up @@ -43,6 +42,3 @@ target_compile_definitions(ProtoBufClient PRIVATE ProtoBufClient_VERSION=0.1)

# )

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(ProtoBufClient PRIVATE DEBUG=1)
endif()
6 changes: 0 additions & 6 deletions tunnels/client/reality/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


add_library(RealityClient STATIC
reality_client.c

Expand Down Expand Up @@ -32,8 +31,3 @@ target_link_libraries(RealityClient

target_compile_definitions(RealityClient PRIVATE RealityClient_VERSION=0.1)


if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(RealityClient PRIVATE DEBUG=1)

endif()
9 changes: 0 additions & 9 deletions tunnels/client/reverse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@


add_library(ReverseClient STATIC
reverse_client.c

)


#ww api
target_include_directories(ReverseClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(ReverseClient ww)
Expand All @@ -14,11 +12,4 @@ target_link_libraries(ReverseClient ww)
# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)



target_compile_definitions(ReverseClient PRIVATE ReverseClient_VERSION=0.1)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(ReverseClient PRIVATE DEBUG=1)

endif()
9 changes: 1 addition & 8 deletions tunnels/client/wireguard/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@

add_library(WireGuard STATIC
wireguard_client.c

)



#ww api
target_include_directories(WireGuard PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(WireGuard PUBLIC ww)



# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)


target_compile_definitions(WireGuard PRIVATE WireGuard_VERSION=0.1)


if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(WireGuard PRIVATE DEBUG=1)
endif()
9 changes: 0 additions & 9 deletions tunnels/client/wolfssl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


add_library(WolfSSLClient STATIC
wolfssl_client.c
)
Expand All @@ -13,16 +12,12 @@ add_library(WolfSSLClient STATIC
## if compiling for ARM: ./configure --enable-distro --enable-sp=rsa2048,asm --enable-harden --enable-static --enable-fast-rsa --enable-opensslall --enable-opensslextra --enable-tls13 --disable-oldtls
## libs will be saved at: /src/.libs/libwolfssl.a


#ww api
target_include_directories(WolfSSLClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(WolfSSLClient ww)



target_include_directories(WolfSSLClient PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../shared/wolfssl)


# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)

Expand All @@ -46,10 +41,6 @@ CPMAddPackage(
)
target_compile_definitions(wolfssl PRIVATE NO_WOLFSSL_STUB=1)
target_compile_definitions(WolfSSLClient PRIVATE WolfSSLClient_VERSION=0.1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(WolfSSLClient PRIVATE DEBUG=1)
endif()



# this code is used for linking with prebuilt .a (which you built with autoconf)
Expand Down
7 changes: 0 additions & 7 deletions tunnels/logger/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@


add_library(LoggerTunnel STATIC
logger_tunnel.c

)


#ww api
target_include_directories(LoggerTunnel PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../ww)
target_link_libraries(LoggerTunnel ww)
Expand All @@ -14,9 +12,4 @@ target_link_libraries(LoggerTunnel ww)
# add dependencies
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)


target_compile_definitions(LoggerTunnel PRIVATE LoggerTunnel_VERSION=0.1)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(LoggerTunnel PRIVATE DEBUG=1)
endif()
Loading

0 comments on commit d147372

Please sign in to comment.