Develop and Download Open Source Software

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9693 - (hide annotations) (download)
Sun Jan 16 15:35:24 2022 UTC (2 years, 2 months ago) by nmaya
File MIME type: text/plain
File size: 4809 byte(s)
OpenSSL 3 のビルドに対応

#43469

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

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