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 9692 - (hide 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 zmatsuo 9129 set(PACKAGE_NAME "ttxssh")
2 zmatsuo 7456
3 nmaya 9692 option(TTXSSH_LIBRESSL "User LibreSSL" on)
4    
5 zmatsuo 9129 project(${PACKAGE_NAME})
6 zmatsuo 7456
7     include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_zlib.cmake)
8 nmaya 9692 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 zmatsuo 7456
14 zmatsuo 7952 add_library(
15 zmatsuo 9129 ${PACKAGE_NAME} SHARED
16 zmatsuo 7456 )
17    
18 zmatsuo 7952 target_sources(
19 zmatsuo 9129 ${PACKAGE_NAME}
20 zmatsuo 7952 PRIVATE
21 zmatsuo 7456 ../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 nmaya 9255 cipher-3des1.c
31     cipher-chachapoly-libcrypto.c
32     cipher-chachapoly.h
33     cipher-ctr.c
34     cipher.c
35 zmatsuo 7456 cipher.h
36 nmaya 9255 comp.c
37     comp.h
38 zmatsuo 7456 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 nmaya 9255 fwd-socks.c
58     fwd-socks.h
59 zmatsuo 7456 fwd.c
60     fwd.h
61     fwdui.c
62     fwdui.h
63 nmaya 9255 hostkey.c
64     hostkey.h
65 zmatsuo 7456 hosts.c
66     hosts.h
67     kex.c
68     kex.h
69     key.c
70     key.h
71     keyfiles.c
72     keyfiles.h
73 zmatsuo 9266 keyfiles-putty.c
74     keyfiles-putty.h
75 nmaya 9255 mac.c
76     mac.h
77 zmatsuo 7456 pkt.c
78     pkt.h
79 nmaya 9255 poly1305.c
80     poly1305.h
81 zmatsuo 7456 resource.h
82     sftp.c
83     sftp.h
84     ssh.c
85     ssh.h
86 nmaya 9255 ssherr.c
87     ssherr.h
88     ttxssh-version.h
89     ttxssh-version.rc
90 zmatsuo 7456 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 zmatsuo 7952 target_sources(
102 zmatsuo 9129 ${PACKAGE_NAME}
103 zmatsuo 7952 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 doda 8445 ../../teraterm/common/compat_win.h
114     ../../teraterm/common/dllutil.h
115 zmatsuo 7952 )
116 zmatsuo 7456
117 zmatsuo 7952 source_group(
118     "common"
119     REGULAR_EXPRESSION
120     "teraterm\/common\/")
121    
122 zmatsuo 9129 if(SUPPORT_OLD_WINDOWS)
123     if(MSVC)
124 zmatsuo 9325 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 zmatsuo 9129 target_sources(
136     ${PACKAGE_NAME}
137     PRIVATE
138     ../../teraterm/common/compat_w95_vs2005.c
139     )
140     endif()
141 zmatsuo 9136 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 zmatsuo 9129 endif(SUPPORT_OLD_WINDOWS)
156    
157 zmatsuo 7952 target_include_directories(
158 zmatsuo 9129 ${PACKAGE_NAME}
159 zmatsuo 7952 PRIVATE
160 zmatsuo 7456 ../../teraterm/teraterm
161     ../../teraterm/common
162     ../matcher
163     ../putty
164     ${ZLIB_INCLUDE_DIRS}
165 nmaya 9692 )
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 zmatsuo 7456
180 nmaya 9692
181 zmatsuo 7536 set_target_properties(
182 zmatsuo 9129 ${PACKAGE_NAME}
183 zmatsuo 7536 PROPERTIES
184     PREFIX ""
185 zmatsuo 9129 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/"
186 zmatsuo 7536 )
187    
188 zmatsuo 7952 target_compile_definitions(
189 zmatsuo 9129 ${PACKAGE_NAME}
190 zmatsuo 7952 PRIVATE
191     $<$<CONFIG:Debug>:_CRTDBG_MAP_ALLOC>
192     )
193    
194 zmatsuo 9129 if(MINGW)
195     target_link_options(
196     ttxssh
197     PRIVATE
198     -Wl,-Map=ttxssh.map,-cref
199     )
200     endif()
201    
202 zmatsuo 7456 target_link_libraries(
203 zmatsuo 9129 ${PACKAGE_NAME}
204 zmatsuo 8565 PRIVATE
205     common_static
206 zmatsuo 7456 libputty
207     ttpcmn
208 zmatsuo 9266 argon2
209 zmatsuo 7952 ${ZLIB_LIB}
210 zmatsuo 9325 )
211    
212 nmaya 9692 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 zmatsuo 9325 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 zmatsuo 7456 ws2_32
240     gdi32
241     comdlg32
242 doda 8445 comctl32
243 zmatsuo 7456 )
244    
245 zmatsuo 7990 install(
246     TARGETS ttxssh
247     RUNTIME
248     DESTINATION .
249     )

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