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 10529 - (show annotations) (download)
Sat Jan 21 17:41:55 2023 UTC (14 months, 2 weeks ago) by zmatsuo
File MIME type: text/plain
File size: 4865 byte(s)
ttssh2 プロトタイプをヘッダに移動

- cipher-3des1.h, cipher-ctr.h を追加
- cipher-3des1.c, cipher-ctr.c の関数のプロトタイプを h へ移動
1 set(PACKAGE_NAME "ttxssh")
2
3 option(TTXSSH_LIBRESSL "User LibreSSL" on)
4 option(TTXSSH_OPENSSL3 "Use OpenSSL3" off)
5
6 project(${PACKAGE_NAME})
7
8 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_zlib.cmake)
9 if(TTXSSH_LIBRESSL)
10 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_libressl.cmake)
11 elseif(TTXSSH_OPENSSL3)
12 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_openssl3.cmake)
13 else()
14 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_openssl.cmake)
15 endif()
16
17 add_library(
18 ${PACKAGE_NAME} SHARED
19 )
20
21 target_sources(
22 ${PACKAGE_NAME}
23 PRIVATE
24 ../matcher/matcher.c
25 arc4random.c
26 arc4random.h
27 auth.c
28 auth.h
29 buffer.c
30 buffer.h
31 chacha.c
32 chacha.h
33 cipher-3des1.c
34 cipher-3des1.h
35 cipher-chachapoly-libcrypto.c
36 cipher-chachapoly.h
37 cipher-ctr.c
38 cipher-ctr.h
39 cipher.c
40 cipher.h
41 comp.c
42 comp.h
43 config.h
44 crypt.c
45 crypt.h
46 dns.c
47 dns.h
48 ed25519.c
49 ed25519_bcrypt_pbkdf.c
50 ed25519_blf.h
51 ed25519_blocks.c
52 ed25519_blowfish.c
53 ed25519_crypto_api.h
54 ed25519_fe25519.c
55 ed25519_fe25519.h
56 ed25519_ge25519.c
57 ed25519_ge25519.h
58 ed25519_hash.c
59 ed25519_sc25519.c
60 ed25519_sc25519.h
61 ed25519_verify.c
62 fwd-socks.c
63 fwd-socks.h
64 fwd.c
65 fwd.h
66 fwdui.c
67 fwdui.h
68 hostkey.c
69 hostkey.h
70 hosts.c
71 hosts.h
72 kex.c
73 kex.h
74 key.c
75 key.h
76 keyfiles.c
77 keyfiles.h
78 keyfiles-putty.c
79 keyfiles-putty.h
80 mac.c
81 mac.h
82 pkt.c
83 pkt.h
84 poly1305.c
85 poly1305.h
86 resource.h
87 sftp.c
88 sftp.h
89 ssh.c
90 ssh.h
91 ssherr.c
92 ssherr.h
93 ttxssh-version.h
94 ttxssh-version.rc
95 ttxssh.c
96 ttxssh.def
97 ttxssh.h
98 ttxssh.rc
99 util.c
100 util.h
101 x11util.c
102 x11util.h
103 ${COMMON_SRC}
104 )
105
106 target_sources(
107 ${PACKAGE_NAME}
108 PRIVATE
109 ../../teraterm/teraterm/WSAAsyncGetAddrInfo.c
110 ../../teraterm/common/ttcommon.h
111 ../../teraterm/common/i18n.h
112 ../../teraterm/common/ttlib.h
113 ../../teraterm/common/ttlib.c
114 ../../teraterm/common/dlglib.h
115 ../../teraterm/common/servicenames.h
116 ../../teraterm/common/codeconv.h
117 ../../teraterm/common/tipwin.h
118 ../../teraterm/common/compat_win.h
119 ../../teraterm/common/dllutil.h
120 )
121
122 source_group(
123 "common"
124 REGULAR_EXPRESSION
125 "teraterm\/common\/")
126
127 if(SUPPORT_OLD_WINDOWS)
128 if(MSVC)
129 if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
130 set(CMAKE_C_STANDARD_LIBRARIES "")
131 set(CMAKE_CXX_STANDARD_LIBRARIES "")
132 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
133 else()
134 target_link_options(
135 ${PACKAGE_NAME}
136 PRIVATE
137 /NODEFAULTLIB
138 )
139 endif()
140 target_sources(
141 ${PACKAGE_NAME}
142 PRIVATE
143 ../../teraterm/common/compat_w95_vs2005.c
144 )
145 endif()
146 if(MINGW)
147 target_sources(
148 ${PACKAGE_NAME}
149 PRIVATE
150 ../../teraterm/libmingw/tlssup.c
151 )
152 target_link_libraries(
153 ${PACKAGE_NAME}
154 PRIVATE
155 -Wl,--whole-archive
156 mingw_msvcrt
157 -Wl,--no-whole-archive
158 )
159 endif()
160 endif(SUPPORT_OLD_WINDOWS)
161
162 target_include_directories(
163 ${PACKAGE_NAME}
164 PRIVATE
165 ../../teraterm/teraterm
166 ../../teraterm/common
167 ../matcher
168 ../putty
169 ../../libs/include
170 ${ZLIB_INCLUDE_DIRS}
171 )
172
173 if(TTXSSH_LIBRESSL)
174 target_include_directories(
175 ${PACKAGE_NAME}
176 PRIVATE
177 ${LIBRESSL_INCLUDE_DIRS}
178 )
179 elseif(TTXSSH_OPENSSL3)
180 target_include_directories(
181 ${PACKAGE_NAME}
182 PRIVATE
183 ${OPENSSL3_INCLUDE_DIRS}
184 )
185 else()
186 target_include_directories(
187 ${PACKAGE_NAME}
188 PRIVATE
189 ${OPENSSL_INCLUDE_DIRS}
190 )
191 endif()
192
193
194 set_target_properties(
195 ${PACKAGE_NAME}
196 PROPERTIES
197 PREFIX ""
198 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/"
199 )
200
201 target_compile_definitions(
202 ${PACKAGE_NAME}
203 PRIVATE
204 $<$<CONFIG:Debug>:_CRTDBG_MAP_ALLOC>
205 )
206
207 if(MINGW)
208 target_link_options(
209 ttxssh
210 PRIVATE
211 -Wl,-Map=ttxssh.map,-cref
212 )
213 endif()
214
215 target_link_libraries(
216 ${PACKAGE_NAME}
217 PRIVATE
218 common_static
219 libputty
220 ttpcmn
221 argon2
222 ${ZLIB_LIB}
223 )
224
225 if(TTXSSH_LIBRESSL)
226 target_link_libraries(
227 ${PACKAGE_NAME}
228 PRIVATE
229 ${LIBRESSL_LIB}
230 bcrypt.lib
231 )
232 elseif(TTXSSH_OPENSSL3)
233 target_link_libraries(
234 ${PACKAGE_NAME}
235 PRIVATE
236 ${OPENSSL3_LIB}
237 bcrypt.lib
238 )
239 else()
240 target_link_libraries(
241 ${PACKAGE_NAME}
242 PRIVATE
243 ${OPENSSL_LIB}
244 crypt32.lib # TODO このlibを使用しないパッチを適応したら削除すること
245 )
246 endif()
247
248 if(SUPPORT_OLD_WINDOWS)
249 target_link_libraries(
250 ${PACKAGE_NAME}
251 PRIVATE
252 layer_for_unicode
253 )
254 endif()
255
256 target_link_libraries(
257 ${PACKAGE_NAME}
258 PRIVATE
259 ws2_32
260 gdi32
261 comdlg32
262 comctl32
263 )
264
265 install(
266 TARGETS ttxssh
267 RUNTIME
268 DESTINATION .
269 )

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