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 9324 - (show annotations) (download)
Tue Jun 29 15:20:20 2021 UTC (2 years, 9 months ago) by zmatsuo
File MIME type: text/plain
File size: 4337 byte(s)
layer for unicode 向けのコードを削除
1 set(PACKAGE_NAME "ttxssh")
2
3 project(${PACKAGE_NAME})
4
5 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_zlib.cmake)
6 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_openssl.cmake)
7
8 add_library(
9 ${PACKAGE_NAME} SHARED
10 )
11
12 target_sources(
13 ${PACKAGE_NAME}
14 PRIVATE
15 ${CMAKE_CURRENT_BINARY_DIR}/puttyversion.h
16 ../matcher/matcher.c
17 arc4random.c
18 arc4random.h
19 auth.c
20 auth.h
21 buffer.c
22 buffer.h
23 chacha.c
24 chacha.h
25 cipher-3des1.c
26 cipher-chachapoly-libcrypto.c
27 cipher-chachapoly.h
28 cipher-ctr.c
29 cipher.c
30 cipher.h
31 comp.c
32 comp.h
33 config.h
34 crypt.c
35 crypt.h
36 dns.c
37 dns.h
38 ed25519.c
39 ed25519_bcrypt_pbkdf.c
40 ed25519_blf.h
41 ed25519_blocks.c
42 ed25519_blowfish.c
43 ed25519_crypto_api.h
44 ed25519_fe25519.c
45 ed25519_fe25519.h
46 ed25519_ge25519.c
47 ed25519_ge25519.h
48 ed25519_hash.c
49 ed25519_sc25519.c
50 ed25519_sc25519.h
51 ed25519_verify.c
52 fwd-socks.c
53 fwd-socks.h
54 fwd.c
55 fwd.h
56 fwdui.c
57 fwdui.h
58 hostkey.c
59 hostkey.h
60 hosts.c
61 hosts.h
62 kex.c
63 kex.h
64 key.c
65 key.h
66 keyfiles.c
67 keyfiles.h
68 keyfiles-putty.c
69 keyfiles-putty.h
70 mac.c
71 mac.h
72 pkt.c
73 pkt.h
74 poly1305.c
75 poly1305.h
76 resource.h
77 sftp.c
78 sftp.h
79 ssh.c
80 ssh.h
81 ssherr.c
82 ssherr.h
83 ttxssh-version.h
84 ttxssh-version.rc
85 ttxssh.c
86 ttxssh.def
87 ttxssh.h
88 ttxssh.rc
89 util.c
90 util.h
91 x11util.c
92 x11util.h
93 ${COMMON_SRC}
94 )
95
96 target_sources(
97 ${PACKAGE_NAME}
98 PRIVATE
99 ../../teraterm/teraterm/WSAAsyncGetAddrInfo.c
100 ../../teraterm/common/ttcommon.h
101 ../../teraterm/common/i18n.h
102 ../../teraterm/common/ttlib.h
103 ../../teraterm/common/ttlib.c
104 ../../teraterm/common/dlglib.h
105 ../../teraterm/common/servicenames.h
106 ../../teraterm/common/codeconv.h
107 ../../teraterm/common/tipwin.h
108 ../../teraterm/common/compat_win.h
109 ../../teraterm/common/dllutil.h
110 )
111
112 source_group(
113 "common"
114 REGULAR_EXPRESSION
115 "teraterm\/common\/")
116
117 if(SUPPORT_OLD_WINDOWS)
118 if(MSVC)
119 target_sources(
120 ${PACKAGE_NAME}
121 PRIVATE
122 ../../teraterm/common/compat_w95_vs2005.c
123 )
124 endif()
125 if(MINGW)
126 target_sources(
127 ${PACKAGE_NAME}
128 PRIVATE
129 ../../teraterm/libmingw/tlssup.c
130 )
131 target_link_libraries(
132 ${PACKAGE_NAME}
133 PRIVATE
134 -Wl,--whole-archive
135 mingw_msvcrt
136 -Wl,--no-whole-archive
137 )
138 endif()
139 endif(SUPPORT_OLD_WINDOWS)
140
141 target_include_directories(
142 ${PACKAGE_NAME}
143 PRIVATE
144 ../../teraterm/teraterm
145 ../../teraterm/common
146 ../matcher
147 ../putty
148 ${OPENSSL_INCLUDE_DIRS}
149 ${ZLIB_INCLUDE_DIRS}
150 )
151
152 set_target_properties(
153 ${PACKAGE_NAME}
154 PROPERTIES
155 PREFIX ""
156 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/"
157 )
158
159 target_compile_definitions(
160 ${PACKAGE_NAME}
161 PRIVATE
162 $<$<CONFIG:Debug>:_CRTDBG_MAP_ALLOC>
163 )
164
165 if(MINGW)
166 target_link_options(
167 ttxssh
168 PRIVATE
169 -Wl,-Map=ttxssh.map,-cref
170 )
171 endif()
172
173 target_link_libraries(
174 ${PACKAGE_NAME}
175 PRIVATE
176 common_static
177 libputty
178 ttpcmn
179 argon2
180 ${ZLIB_LIB}
181 ${OPENSSL_LIB}
182 #
183 ws2_32
184 gdi32
185 comdlg32
186 comctl32
187 # OpenSSL が使用
188 crypt32.lib # TODO このlibを使用しないパッチを適応したら削除すること
189 )
190
191 ### create puttyversion.h
192
193 set(PUTTY_ISS "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss")
194 if(NOT EXISTS ${PUTTY_ISS})
195 message(FATAL_ERROR "${PUTTY_ISS} not found")
196 endif()
197
198 file(READ "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss" iis)
199
200 string(REGEX MATCH "VersionInfoTextVersion=([^\n]+)\n" _ ${iis})
201 set(version_str ${CMAKE_MATCH_1})
202 if("${version_str}" STREQUAL "")
203 string(REGEX MATCH "AppVerName=([^\n]+)\n" _ ${iis})
204 set(version_str ${CMAKE_MATCH_1})
205 endif()
206 if("${version_str}" STREQUAL "")
207 set(version_str "unknown")
208 endif()
209 message("putty version=\"${version_str}\"")
210 FILE(
211 WRITE ${CMAKE_CURRENT_BINARY_DIR}/puttyversion.h
212 "#define PUTTYVERSION \"${version_str}\"\n"
213 )
214
215 install(
216 TARGETS ttxssh
217 RUNTIME
218 DESTINATION .
219 )
220
221 ####
222 # ソースツリー内に生成ファイルが存在していたら削除する
223 if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ttssh2/ttxssh/puttyversion.h")
224 file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/ttssh2/ttxssh/puttyversion.h")
225 endif()

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