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 9324 - (hide 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 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 add_library(
9 zmatsuo 9129 ${PACKAGE_NAME} SHARED
10 zmatsuo 7456 )
11    
12 zmatsuo 7952 target_sources(
13 zmatsuo 9129 ${PACKAGE_NAME}
14 zmatsuo 7952 PRIVATE
15 zmatsuo 7456 ${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 nmaya 9255 cipher-3des1.c
26     cipher-chachapoly-libcrypto.c
27     cipher-chachapoly.h
28     cipher-ctr.c
29     cipher.c
30 zmatsuo 7456 cipher.h
31 nmaya 9255 comp.c
32     comp.h
33 zmatsuo 7456 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 nmaya 9255 fwd-socks.c
53     fwd-socks.h
54 zmatsuo 7456 fwd.c
55     fwd.h
56     fwdui.c
57     fwdui.h
58 nmaya 9255 hostkey.c
59     hostkey.h
60 zmatsuo 7456 hosts.c
61     hosts.h
62     kex.c
63     kex.h
64     key.c
65     key.h
66     keyfiles.c
67     keyfiles.h
68 zmatsuo 9266 keyfiles-putty.c
69     keyfiles-putty.h
70 nmaya 9255 mac.c
71     mac.h
72 zmatsuo 7456 pkt.c
73     pkt.h
74 nmaya 9255 poly1305.c
75     poly1305.h
76 zmatsuo 7456 resource.h
77     sftp.c
78     sftp.h
79     ssh.c
80     ssh.h
81 nmaya 9255 ssherr.c
82     ssherr.h
83     ttxssh-version.h
84     ttxssh-version.rc
85 zmatsuo 7456 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 zmatsuo 7952 target_sources(
97 zmatsuo 9129 ${PACKAGE_NAME}
98 zmatsuo 7952 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 doda 8445 ../../teraterm/common/compat_win.h
109     ../../teraterm/common/dllutil.h
110 zmatsuo 7952 )
111 zmatsuo 7456
112 zmatsuo 7952 source_group(
113     "common"
114     REGULAR_EXPRESSION
115     "teraterm\/common\/")
116    
117 zmatsuo 9129 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 zmatsuo 9136 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 zmatsuo 9129 endif(SUPPORT_OLD_WINDOWS)
140    
141 zmatsuo 7952 target_include_directories(
142 zmatsuo 9129 ${PACKAGE_NAME}
143 zmatsuo 7952 PRIVATE
144 zmatsuo 7456 ../../teraterm/teraterm
145     ../../teraterm/common
146     ../matcher
147     ../putty
148     ${OPENSSL_INCLUDE_DIRS}
149     ${ZLIB_INCLUDE_DIRS}
150 zmatsuo 7952 )
151 zmatsuo 7456
152 zmatsuo 7536 set_target_properties(
153 zmatsuo 9129 ${PACKAGE_NAME}
154 zmatsuo 7536 PROPERTIES
155     PREFIX ""
156 zmatsuo 9129 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/"
157 zmatsuo 7536 )
158    
159 zmatsuo 7952 target_compile_definitions(
160 zmatsuo 9129 ${PACKAGE_NAME}
161 zmatsuo 7952 PRIVATE
162     $<$<CONFIG:Debug>:_CRTDBG_MAP_ALLOC>
163     )
164    
165 zmatsuo 9129 if(MINGW)
166     target_link_options(
167     ttxssh
168     PRIVATE
169     -Wl,-Map=ttxssh.map,-cref
170     )
171     endif()
172    
173 zmatsuo 7456 target_link_libraries(
174 zmatsuo 9129 ${PACKAGE_NAME}
175 zmatsuo 8565 PRIVATE
176     common_static
177 zmatsuo 7456 libputty
178     ttpcmn
179 zmatsuo 9266 argon2
180 zmatsuo 7952 ${ZLIB_LIB}
181 zmatsuo 7456 ${OPENSSL_LIB}
182     #
183     ws2_32
184     gdi32
185     comdlg32
186 doda 8445 comctl32
187 zmatsuo 8332 # OpenSSL が使用
188     crypt32.lib # TODO このlibを使用しないパッチを適応したら削除すること
189 zmatsuo 7456 )
190    
191     ### create puttyversion.h
192    
193 zmatsuo 7532 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 zmatsuo 7456 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 zmatsuo 7990
215     install(
216     TARGETS ttxssh
217     RUNTIME
218     DESTINATION .
219     )
220 zmatsuo 8681
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