forked from Qv2ray/QvPlugin-Trojan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
87 lines (77 loc) · 2.35 KB
/
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
project(QvTrojanPlugin)
cmake_minimum_required(VERSION 3.1.0)
set(CMAKE_CXX_STANDARD 14)
if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
find_package(Qt5 COMPONENTS Core Widgets Gui Network REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(QVPLUGIN_INTERFACE_INCLUDE_DIR "interface/")
set(QVPLUGIN_HAS_HTTP_TO_SOCKS_HELPER ON)
include(interface/QvPluginInterface.cmake)
include_directories(${QVPLUGIN_INTERFACE_INCLUDE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/trojan/src)
set(TROJAN_SOURCES
trojan/src/core/authenticator.cpp
trojan/src/core/config.cpp
trojan/src/core/log.cpp
trojan/src/core/service.cpp
trojan/src/core/version.cpp
trojan/src/proto/socks5address.cpp
trojan/src/proto/trojanrequest.cpp
trojan/src/proto/udppacket.cpp
trojan/src/session/clientsession.cpp
trojan/src/session/forwardsession.cpp
trojan/src/session/natsession.cpp
trojan/src/session/serversession.cpp
trojan/src/session/session.cpp
trojan/src/session/udpforwardsession.cpp
trojan/src/ssl/ssldefaults.cpp
trojan/src/ssl/sslsession.cpp
)
set(TROJAN_HEADERS
trojan/src/core/authenticator.h
trojan/src/core/config.h
trojan/src/core/log.h
trojan/src/core/service.h
trojan/src/core/version.h
trojan/src/proto/socks5address.h
trojan/src/proto/trojanrequest.h
trojan/src/proto/udppacket.h
trojan/src/session/clientsession.h
trojan/src/session/forwardsession.h
trojan/src/session/natsession.h
trojan/src/session/serversession.h
trojan/src/session/session.h
trojan/src/session/udpforwardsession.h
trojan/src/ssl/ssldefaults.h
trojan/src/ssl/sslsession.h)
add_library(${PROJECT_NAME} MODULE
TrojanPlugin.hpp
TrojanPlugin.cpp
core/EventHandler.cpp
core/EventHandler.hpp
core/Serializer.cpp
core/Serializer.hpp
ui/TrojanOutboundEditor.cpp
ui/TrojanOutboundEditor.hpp
ui/TrojanOutboundEditor.ui
core/Common.hpp
core/Kernel.cpp
core/Kernel.hpp
resx.qrc
${QVPLUGIN_INTERFACE_HEADERS}
${TROJAN_SOURCES}
${TROJAN_HEADERS})
include(cmake/trojan.cmake)
target_link_libraries(${PROJECT_NAME}
Qt5::Core
Qt5::Gui
Qt5::Widgets
Qt5::Network
${CMAKE_THREAD_LIBS_INIT}
${OPENSSL_LIBRARIES}
${Boost_LIBRARIES})