forked from liudf0716/xfrpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (51 loc) · 912 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
cmake_minimum_required(VERSION 2.6)
project(xfrp C)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(LibEvent)
if(NOT LibEvent_FOUND)
message(FATAL_ERROR "libevent2 not found!")
endif(NOT LibEvent_FOUND)
find_package(OpenSSL)
if(NOT OPENSSL_FOUND)
message(FATAL_ERROR "OpenSSL not found!")
endif(NOT OPENSSL_FOUND)
find_package(JSON-C REQUIRED)
include_directories(${JSON-C_INCLUDE_DIR})
set(src_xfrpc
main.c
client.c
config.c
control.c
frame.c
ini.c
msg.c
xfrpc.c
debug.c
zip.c
commandline.c
crypto.c
fastpbkdf2.c
utils.c
session.c
common.c
login.c
proxy_tcp.c
proxy_ftp.c
proxy.c
)
set(libs
ssl
crypto
event
z
m
json-c)
set(test_libs
event
)
ADD_DEFINITIONS(-Wall -g --std=gnu99)
add_executable(xfrpc ${src_xfrpc})
target_link_libraries(xfrpc ${libs})
install(TARGETS xfrpc
RUNTIME DESTINATION bin
)