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 9255 - (hide 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 zmatsuo 9129 set(PACKAGE_NAME "ttxssh")
2 zmatsuo 7456
3 zmatsuo 9129 project(${PACKAGE_NAME})
4 zmatsuo 7456
5     include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_zlib.cmake)
6     include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_openssl.cmake)
7    
8 zmatsuo 7952 if (MSVC)
9 zmatsuo 9126 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DELAYLOAD:user32.dll")
10 zmatsuo 7456 endif()
11    
12 zmatsuo 7952 add_library(
13 zmatsuo 9129 ${PACKAGE_NAME} SHARED
14 zmatsuo 7456 )
15    
16 zmatsuo 7952 target_sources(
17 zmatsuo 9129 ${PACKAGE_NAME}
18 zmatsuo 7952 PRIVATE
19 zmatsuo 7456 ${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 nmaya 9255 cipher-3des1.c
30     cipher-chachapoly-libcrypto.c
31     cipher-chachapoly.h
32     cipher-ctr.c
33     cipher.c
34 zmatsuo 7456 cipher.h
35 nmaya 9255 comp.c
36     comp.h
37 zmatsuo 7456 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 nmaya 9255 fwd-socks.c
57     fwd-socks.h
58 zmatsuo 7456 fwd.c
59     fwd.h
60     fwdui.c
61     fwdui.h
62 nmaya 9255 hostkey.c
63     hostkey.h
64 zmatsuo 7456 hosts.c
65     hosts.h
66     kex.c
67     kex.h
68     key.c
69     key.h
70     keyfiles.c
71     keyfiles.h
72 nmaya 9255 mac.c
73     mac.h
74 zmatsuo 7456 pkt.c
75     pkt.h
76 nmaya 9255 poly1305.c
77     poly1305.h
78 zmatsuo 7456 resource.h
79     sftp.c
80     sftp.h
81     ssh.c
82     ssh.h
83 nmaya 9255 ssherr.c
84     ssherr.h
85     ttxssh-version.h
86     ttxssh-version.rc
87 zmatsuo 7456 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 zmatsuo 7952 target_sources(
99 zmatsuo 9129 ${PACKAGE_NAME}
100 zmatsuo 7952 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 doda 8445 ../../teraterm/common/layer_for_unicode.h
111     ../../teraterm/common/compat_win.h
112     ../../teraterm/common/dllutil.h
113 zmatsuo 7952 )
114 zmatsuo 7456
115 zmatsuo 7952 source_group(
116     "common"
117     REGULAR_EXPRESSION
118     "teraterm\/common\/")
119    
120 zmatsuo 9129 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 zmatsuo 9136 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 zmatsuo 9129 endif(SUPPORT_OLD_WINDOWS)
143    
144 zmatsuo 7952 target_include_directories(
145 zmatsuo 9129 ${PACKAGE_NAME}
146 zmatsuo 7952 PRIVATE
147 zmatsuo 7456 ../../teraterm/teraterm
148     ../../teraterm/common
149     ../matcher
150     ../putty
151     ${OPENSSL_INCLUDE_DIRS}
152     ${ZLIB_INCLUDE_DIRS}
153 zmatsuo 7952 )
154 zmatsuo 7456
155 zmatsuo 7536 set_target_properties(
156 zmatsuo 9129 ${PACKAGE_NAME}
157 zmatsuo 7536 PROPERTIES
158     PREFIX ""
159 zmatsuo 9129 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/"
160 zmatsuo 7536 )
161    
162 zmatsuo 7952 target_compile_definitions(
163 zmatsuo 9129 ${PACKAGE_NAME}
164 zmatsuo 7952 PRIVATE
165     $<$<CONFIG:Debug>:_CRTDBG_MAP_ALLOC>
166     )
167    
168 zmatsuo 9129 if(MINGW)
169     target_link_options(
170     ttxssh
171     PRIVATE
172     -Wl,-Map=ttxssh.map,-cref
173     )
174     endif()
175    
176 zmatsuo 7456 target_link_libraries(
177 zmatsuo 9129 ${PACKAGE_NAME}
178 zmatsuo 8565 PRIVATE
179     common_static
180 zmatsuo 7456 libputty
181     ttpcmn
182 zmatsuo 7952 ${ZLIB_LIB}
183 zmatsuo 7456 ${OPENSSL_LIB}
184     #
185     ws2_32
186     gdi32
187     comdlg32
188     delayimp
189 doda 8445 comctl32
190 zmatsuo 8332 # OpenSSL が使用
191     crypt32.lib # TODO このlibを使用しないパッチを適応したら削除すること
192 zmatsuo 7456 )
193    
194     ### create puttyversion.h
195    
196 zmatsuo 7532 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 zmatsuo 7456 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 zmatsuo 7990
218     install(
219     TARGETS ttxssh
220     RUNTIME
221     DESTINATION .
222     )
223 zmatsuo 8681
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