forked from rfc1036/udptunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (27 loc) · 907 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required (VERSION 3.10)
project ("udptunnel" "C")
if (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
message (FATAL_ERROR "In-source builds are not allowed")
endif ()
set (CMAKE_PROJECT_DESCRIPTION "UDP tunnel over TCP")
set (CMAKE_PROJECT_HOMEPAGE_URL "https://github.com/andrew-aladjev/udptunnel")
set (PROJECT_VERSION "1.2.1")
if (NOT DEFINED CMAKE_INSTALL_BINDIR)
set (CMAKE_INSTALL_BINDIR "sbin" CACHE PATH "output directory for binaries")
endif ()
set (CMAKE_C_FLAGS "-O2 -std=c11 -Wall")
set (CMAKE_EXE_LINKER_FLAGS "-static")
if (NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
set (CMAKE_BUILD_TYPE "Release")
endif ()
set (
SOURCES
"log.c"
"network.c"
"udptunnel.c"
"utils.c"
)
add_executable (${PROJECT_NAME} ${SOURCES})
install (TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
include (CPackConfig.cmake)
include (CPack)