Skip to content

Commit

Permalink
Use badvpn_add_library for all internal libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrop72 committed Oct 15, 2014
1 parent bbe0524 commit 5153894
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 37 deletions.
3 changes: 1 addition & 2 deletions arpprobe/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
add_library(arpprobe BArpProbe.c)
target_link_libraries(arpprobe base system flow)
badvpn_add_library(arpprobe "base;system;flow" "" BArpProbe.c)
9 changes: 3 additions & 6 deletions dhcpclient/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
add_library(dhcpclientcore
BDHCPClientCore.c
)
target_link_libraries(dhcpclientcore system flow flowextra badvpn_random)
badvpn_add_library(dhcpclientcore "system;flow;flowextra;badvpn_random" "" BDHCPClientCore.c)

if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_library(dhcpclient
set(DHCPCLIENT_SOURCES
BDHCPClient.c
DHCPIpUdpEncoder.c
DHCPIpUdpDecoder.c
)
target_link_libraries(dhcpclient system flow dhcpclientcore)
badvpn_add_library(dhcpclient "system;flow;dhcpclientcore" "" "${DHCPCLIENT_SOURCES}")
endif ()
4 changes: 2 additions & 2 deletions flowextra/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_library(flowextra
set(FLOWEXTRA_SOURCES
PacketPassInactivityMonitor.c
KeepaliveIO.c
)
target_link_libraries(flowextra flow system)
badvpn_add_library(flowextra "flow;system" "" "${FLOWEXTRA_SOURCES}")
4 changes: 2 additions & 2 deletions lwip/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_library(lwip
set(LWIP_SOURCES
src/core/timers.c
src/core/udp.c
src/core/memp.c
Expand All @@ -24,4 +24,4 @@ add_library(lwip
src/core/ipv6/ip6_frag.c
custom/sys.c
)
target_link_libraries(lwip system)
badvpn_add_library(lwip "system" "" "${LWIP_SOURCES}")
4 changes: 2 additions & 2 deletions nspr_support/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_library(nspr_support
set(NSPRSUPPORT_SOURCES
DummyPRFileDesc.c
BSSLConnection.c
)
target_link_libraries(nspr_support system flow threadwork ${NSPR_LIBRARIES} ${NSS_LIBRARIES})
badvpn_add_library(nspr_support "system;flow;threadwork" "${NSPR_LIBRARIES};${NSS_LIBRARIES}" "${NSPRSUPPORT_SOURCES}")
4 changes: 2 additions & 2 deletions predicate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_library(predicate
set(PREDICATE_SOURCES
BPredicate.c
${PROJECT_SOURCE_DIR}/generated/flex_BPredicate.c
${PROJECT_SOURCE_DIR}/generated/bison_BPredicate.c
)
target_link_libraries(predicate system)
badvpn_add_library(predicate "system" "" "${PREDICATE_SOURCES}")
5 changes: 1 addition & 4 deletions random/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
add_library(badvpn_random
BRandom2.c
)
target_link_libraries(badvpn_random base)
badvpn_add_library(badvpn_random "base" "" BRandom2.c)
4 changes: 2 additions & 2 deletions security/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_library(security
set(SECURITY_SOURCES
BSecurity.c
BEncryption.c
BHash.c
Expand All @@ -7,4 +7,4 @@ add_library(security
OTPChecker.c
OTPGenerator.c
)
target_link_libraries(security system threadwork ${LIBCRYPTO_LIBRARIES})
badvpn_add_library(security "system;threadwork" "${LIBCRYPTO_LIBRARIES}" "${SECURITY_SOURCES}")
4 changes: 2 additions & 2 deletions server_connection/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_library(server_conection
set(SERVERCONNECTION_SOURCES
ServerConnection.c
SCKeepaliveSource.c
)
target_link_libraries(server_conection system flow flowextra nspr_support ${NSPR_LIBRARIES} ${NSS_LIBRARIES})
badvpn_add_library(server_conection "system;flow;flowextra;nspr_support" "${NSPR_LIBRARIES};${NSS_LIBRARIES}" "${SERVERCONNECTION_SOURCES}")
5 changes: 1 addition & 4 deletions socksclient/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
add_library(socksclient
BSocksClient.c
)
target_link_libraries(socksclient system flow flowextra)
badvpn_add_library(socksclient "system;flow;flowextra" "" BSocksClient.c)
4 changes: 1 addition & 3 deletions stringmap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
add_library(stringmap
BStringMap.c
)
badvpn_add_library(stringmap "" "" BStringMap.c)
3 changes: 1 addition & 2 deletions threadwork/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ if (BADVPN_THREADWORK_USE_PTHREAD)
list(APPEND BADVPN_THREADWORK_EXTRA_LIBS pthread)
endif ()

add_library(threadwork BThreadWork.c)
target_link_libraries(threadwork system ${BADVPN_THREADWORK_EXTRA_LIBS})
badvpn_add_library(threadwork "system" "${BADVPN_THREADWORK_EXTRA_LIBS}" BThreadWork.c)
4 changes: 2 additions & 2 deletions udevmonitor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
add_library(udevmonitor
set(UDEVMONITOR_SOURCES
NCDUdevMonitorParser.c
NCDUdevMonitor.c
NCDUdevCache.c
NCDUdevManager.c
)
target_link_libraries(udevmonitor system flow stringmap)
badvpn_add_library(udevmonitor "system;flow;stringmap" "" "${UDEVMONITOR_SOURCES}")
3 changes: 1 addition & 2 deletions udpgw_client/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
add_library(udpgw_client UdpGwClient.c)
target_link_libraries(udpgw_client system flow flowextra)
badvpn_add_library(udpgw_client "system;flow;flowextra" "" UdpGwClient.c)

0 comments on commit 5153894

Please sign in to comment.