summaryrefslogtreecommitdiff
path: root/src/protocol/CMakeLists.txt
blob: 57cd0a8a3bf043dd68dcd598d737b81bc181f9c0 (plain)
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
find_package(OpenSSL REQUIRED)
set(CMAKE_AUTOMOC ON)

set(export_SRCS
  fqterm_socket_private.cpp
  fqterm_socket.h
  fqterm_telnet_socket.cpp
  fqterm_telnet_socket.h
  fqterm_local_socket.cpp
  fqterm_local_socket.h
  fqterm_ssh_socket.h
  fqterm_ssh_socket.cpp
)

set(internal_SRCS
  internal/buffer.c
  internal/ssh_rsa.c
  internal/ssh_crypto_common.h
  internal/ssh_crypto_common.c
  internal/ssh_cipher.h
  internal/all_ciphers.c
  internal/ssh_evp_cipher.c
  internal/ssh_3des-ssh1.c
  internal/ssh_mac.h
  internal/ssh_mac.c
  internal/ssh_pubkey_crypto.h
  internal/ssh_pubkey_crypto.c
  internal/ssh_diffie-hellman.h
  internal/ssh_diffie-hellman.c
  internal/crc32.c
  internal/ssh_packet.c
  internal/curve25519/smult.c
  internal/curve25519/base.c
  internal/fqterm_ssh_auth.h
  internal/fqterm_ssh_const.h
  internal/fqterm_ssh_kex.h
  internal/fqterm_ssh2_kex.h
  internal/fqterm_ssh_packet.h
  internal/fqterm_ssh1_packet.h
  internal/fqterm_ssh2_packet.h
  internal/fqterm_ssh_channel.h
  internal/fqterm_ssh_types.h
  internal/fqterm_ssh_auth.cpp
  internal/fqterm_ssh_kex.cpp
  internal/fqterm_ssh2_kex.cpp
  internal/fqterm_ssh_packet.cpp
  internal/fqterm_ssh1_packet.cpp
  internal/fqterm_ssh2_packet.cpp
  internal/fqterm_ssh_channel.cpp
)

if(USE_QT5)
  find_package(Qt5Core REQUIRED)
  find_package(Qt5Network REQUIRED)
else(USE_QT5)
endif(USE_QT5)

include_directories(
  ${QT_INCLUDE_DIR}
  ${QT_QTCORE_INCLUDE_DIR}
  ${QT_QTNETWORK_INCLUDE_DIR}
  ${OPENSSL_INCLUDE_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}/internal
  ${CMAKE_CURRENT_SOURCE_DIR}/../common
  ${CMAKE_CURRENT_BINARY_DIR}
)

add_library(fqterm_protocol
  ${export_SRCS}
  ${internal_SRCS}
)

add_dependencies(fqterm_protocol
  fqterm_common
)

if(USE_QT5)
  target_link_libraries(fqterm_protocol Qt5::Core Qt5::Network)
endif(USE_QT5)