2017-08-11 10:45:40 +08:00
|
|
|
cmake_minimum_required(VERSION 3.7)
|
|
|
|
project(udp2raw_tunnel)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
2017-08-18 14:25:14 +08:00
|
|
|
FILE(GLOB AES_FILES lib/aes*.c)
|
|
|
|
set_source_files_properties(${AES_FILES} lib/md5.c PROPERTIES LANGUAGE CXX )
|
2017-08-11 10:45:40 +08:00
|
|
|
|
|
|
|
set(SOURCE_FILES
|
2017-08-18 14:25:14 +08:00
|
|
|
${AES_FILES}
|
2017-08-11 10:45:40 +08:00
|
|
|
lib/md5.c
|
|
|
|
common.cpp
|
|
|
|
encrypt.cpp
|
|
|
|
log.cpp
|
|
|
|
main.cpp
|
|
|
|
network.cpp
|
|
|
|
)
|
|
|
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -static")
|
2017-08-11 16:17:26 +08:00
|
|
|
#set(CMAKE_LINK_LIBRARY_FLAG "-lrt")
|
|
|
|
add_executable(udp2raw_tunnel ${SOURCE_FILES})
|
|
|
|
target_link_libraries(udp2raw_tunnel rt)
|