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 9692 - (show annotations) (download)
Sun Jan 16 15:16:19 2022 UTC (2 years, 2 months ago) by nmaya
File MIME type: text/plain
File size: 4412 byte(s)
暗号ライブラリを OpenSSL から LibreSSL に変更

#43469

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

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