Skip to content

Commit

Permalink
add cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu- committed Feb 7, 2023
1 parent f1605d8 commit 9c426ed
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#note: experimental

cmake_minimum_required(VERSION 3.7)
project(tinyvpn)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(CMAKE_CXX_STANDARD 11)

set(SOURCE_FILES
UDPspeeder/log.cpp
UDPspeeder/common.cpp
UDPspeeder/lib/fec.cpp
UDPspeeder/lib/rs.cpp
UDPspeeder/packet.cpp
UDPspeeder/delay_manager.cpp
UDPspeeder/fd_manager.cpp
UDPspeeder/connection.cpp
UDPspeeder/fec_manager.cpp
UDPspeeder/misc.cpp
UDPspeeder/my_ev.cpp
main.cpp
tun_dev_client.cpp
tun_dev_server.cpp
tun_dev.cpp
)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -O2 -g -fsanitize=address,undefined")

#target_include_directories(speederv2 PRIVATE .)
#set(CMAKE_LINK_LIBRARY_FLAG "-lrt")
add_executable(tinyvpn ${SOURCE_FILES})
target_link_libraries(tinyvpn rt)
target_link_libraries(tinyvpn pthread)
include_directories(SYSTEM "UDPspeeder/libev")
include_directories("UDPspeeder")
include_directories(".")

0 comments on commit 9c426ed

Please sign in to comment.