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 10541 - (hide annotations) (download)
Sat Jan 28 15:26:13 2023 UTC (14 months, 1 week ago) by zmatsuo
File MIME type: text/plain
File size: 4840 byte(s)
cmakeビルド用 svnversion.h 移動修正

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

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