Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/ttssh2/ttxssh/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9255 - (show annotations) (download)
Wed May 19 14:11:26 2021 UTC (2 years, 10 months ago) by nmaya
File MIME type: text/plain
File size: 4453 byte(s)
SSH2 暗号化方式 chacha20-poly1305@openssh.com をサポート

merge from branches/ssh_chacha20poly1305
r9209, r9210, r9211, r9212, r9217, r9229, r9248, r9249, r9250, r9251, r9252, r9253
1 set(PACKAGE_NAME "ttxssh")
2
3 project(${PACKAGE_NAME})
4
5 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_zlib.cmake)
6 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_openssl.cmake)
7
8 if (MSVC)
9 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DELAYLOAD:user32.dll")
10 endif()
11
12 add_library(
13 ${PACKAGE_NAME} SHARED
14 )
15
16 target_sources(
17 ${PACKAGE_NAME}
18 PRIVATE
19 ${CMAKE_CURRENT_BINARY_DIR}/puttyversion.h
20 ../matcher/matcher.c
21 arc4random.c
22 arc4random.h
23 auth.c
24 auth.h
25 buffer.c
26 buffer.h
27 chacha.c
28 chacha.h
29 cipher-3des1.c
30 cipher-chachapoly-libcrypto.c
31 cipher-chachapoly.h
32 cipher-ctr.c
33 cipher.c
34 cipher.h
35 comp.c
36 comp.h
37 config.h
38 crypt.c
39 crypt.h
40 dns.c
41 dns.h
42 ed25519.c
43 ed25519_bcrypt_pbkdf.c
44 ed25519_blf.h
45 ed25519_blocks.c
46 ed25519_blowfish.c
47 ed25519_crypto_api.h
48 ed25519_fe25519.c
49 ed25519_fe25519.h
50 ed25519_ge25519.c
51 ed25519_ge25519.h
52 ed25519_hash.c
53 ed25519_sc25519.c
54 ed25519_sc25519.h
55 ed25519_verify.c
56 fwd-socks.c
57 fwd-socks.h
58 fwd.c
59 fwd.h
60 fwdui.c
61 fwdui.h
62 hostkey.c
63 hostkey.h
64 hosts.c
65 hosts.h
66 kex.c
67 kex.h
68 key.c
69 key.h
70 keyfiles.c
71 keyfiles.h
72 mac.c
73 mac.h
74 pkt.c
75 pkt.h
76 poly1305.c
77 poly1305.h
78 resource.h
79 sftp.c
80 sftp.h
81 ssh.c
82 ssh.h
83 ssherr.c
84 ssherr.h
85 ttxssh-version.h
86 ttxssh-version.rc
87 ttxssh.c
88 ttxssh.def
89 ttxssh.h
90 ttxssh.rc
91 util.c
92 util.h
93 x11util.c
94 x11util.h
95 ${COMMON_SRC}
96 )
97
98 target_sources(
99 ${PACKAGE_NAME}
100 PRIVATE
101 ../../teraterm/teraterm/WSAAsyncGetAddrInfo.c
102 ../../teraterm/common/ttcommon.h
103 ../../teraterm/common/i18n.h
104 ../../teraterm/common/ttlib.h
105 ../../teraterm/common/ttlib.c
106 ../../teraterm/common/dlglib.h
107 ../../teraterm/common/servicenames.h
108 ../../teraterm/common/codeconv.h
109 ../../teraterm/common/tipwin.h
110 ../../teraterm/common/layer_for_unicode.h
111 ../../teraterm/common/compat_win.h
112 ../../teraterm/common/dllutil.h
113 )
114
115 source_group(
116 "common"
117 REGULAR_EXPRESSION
118 "teraterm\/common\/")
119
120 if(SUPPORT_OLD_WINDOWS)
121 if(MSVC)
122 target_sources(
123 ${PACKAGE_NAME}
124 PRIVATE
125 ../../teraterm/common/compat_w95_vs2005.c
126 )
127 endif()
128 if(MINGW)
129 target_sources(
130 ${PACKAGE_NAME}
131 PRIVATE
132 ../../teraterm/libmingw/tlssup.c
133 )
134 target_link_libraries(
135 ${PACKAGE_NAME}
136 PRIVATE
137 -Wl,--whole-archive
138 mingw_msvcrt
139 -Wl,--no-whole-archive
140 )
141 endif()
142 endif(SUPPORT_OLD_WINDOWS)
143
144 target_include_directories(
145 ${PACKAGE_NAME}
146 PRIVATE
147 ../../teraterm/teraterm
148 ../../teraterm/common
149 ../matcher
150 ../putty
151 ${OPENSSL_INCLUDE_DIRS}
152 ${ZLIB_INCLUDE_DIRS}
153 )
154
155 set_target_properties(
156 ${PACKAGE_NAME}
157 PROPERTIES
158 PREFIX ""
159 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/"
160 )
161
162 target_compile_definitions(
163 ${PACKAGE_NAME}
164 PRIVATE
165 $<$<CONFIG:Debug>:_CRTDBG_MAP_ALLOC>
166 )
167
168 if(MINGW)
169 target_link_options(
170 ttxssh
171 PRIVATE
172 -Wl,-Map=ttxssh.map,-cref
173 )
174 endif()
175
176 target_link_libraries(
177 ${PACKAGE_NAME}
178 PRIVATE
179 common_static
180 libputty
181 ttpcmn
182 ${ZLIB_LIB}
183 ${OPENSSL_LIB}
184 #
185 ws2_32
186 gdi32
187 comdlg32
188 delayimp
189 comctl32
190 # OpenSSL が使用
191 crypt32.lib # TODO このlibを使用しないパッチを適応したら削除すること
192 )
193
194 ### create puttyversion.h
195
196 set(PUTTY_ISS "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss")
197 if(NOT EXISTS ${PUTTY_ISS})
198 message(FATAL_ERROR "${PUTTY_ISS} not found")
199 endif()
200
201 file(READ "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss" iis)
202
203 string(REGEX MATCH "VersionInfoTextVersion=([^\n]+)\n" _ ${iis})
204 set(version_str ${CMAKE_MATCH_1})
205 if("${version_str}" STREQUAL "")
206 string(REGEX MATCH "AppVerName=([^\n]+)\n" _ ${iis})
207 set(version_str ${CMAKE_MATCH_1})
208 endif()
209 if("${version_str}" STREQUAL "")
210 set(version_str "unknown")
211 endif()
212 message("putty version=\"${version_str}\"")
213 FILE(
214 WRITE ${CMAKE_CURRENT_BINARY_DIR}/puttyversion.h
215 "#define PUTTYVERSION \"${version_str}\"\n"
216 )
217
218 install(
219 TARGETS ttxssh
220 RUNTIME
221 DESTINATION .
222 )
223
224 ####
225 # ソースツリー内に生成ファイルが存在していたら削除する
226 if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ttssh2/ttxssh/puttyversion.h")
227 file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/ttssh2/ttxssh/puttyversion.h")
228 endif()

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26