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 9126 - (show annotations) (download)
Sat Jan 16 05:20:30 2021 UTC (3 years, 2 months ago) by zmatsuo
File MIME type: text/plain
File size: 3572 byte(s)
dnsapi.dll の遅延ロード指定を削除
1 project(ttxssh)
2
3 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/")
4
5 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_zlib.cmake)
6 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_openssl.cmake)
7
8 if (MSVC)
9 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DELAYLOAD:user32.dll")
10 endif()
11
12 add_library(
13 ttxssh SHARED
14 )
15
16 target_sources(
17 ttxssh
18 PRIVATE
19 ${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 cipher.h
30 cipher-ctr.c
31 config.h
32 crypt.c
33 crypt.h
34 dns.c
35 dns.h
36 ed25519.c
37 ed25519_bcrypt_pbkdf.c
38 ed25519_blf.h
39 ed25519_blocks.c
40 ed25519_blowfish.c
41 ed25519_crypto_api.h
42 ed25519_fe25519.c
43 ed25519_fe25519.h
44 ed25519_ge25519.c
45 ed25519_ge25519.h
46 ed25519_hash.c
47 ed25519_sc25519.c
48 ed25519_sc25519.h
49 ed25519_verify.c
50 fwd.c
51 fwd.h
52 fwd-socks.c
53 fwd-socks.h
54 fwdui.c
55 fwdui.h
56 hosts.c
57 hosts.h
58 kex.c
59 kex.h
60 key.c
61 key.h
62 keyfiles.c
63 keyfiles.h
64 pkt.c
65 pkt.h
66 resource.h
67 sftp.c
68 sftp.h
69 ssh.c
70 ssh.h
71 ttxssh.c
72 ttxssh.def
73 ttxssh.h
74 ttxssh.rc
75 ttxssh-version.h
76 ttxssh-version.rc
77 util.c
78 util.h
79 x11util.c
80 x11util.h
81 ${COMMON_SRC}
82 )
83
84 target_sources(
85 ttxssh
86 PRIVATE
87 ../../teraterm/teraterm/WSAAsyncGetAddrInfo.c
88 ../../teraterm/common/ttcommon.h
89 ../../teraterm/common/i18n.h
90 ../../teraterm/common/ttlib.h
91 ../../teraterm/common/ttlib.c
92 ../../teraterm/common/dlglib.h
93 ../../teraterm/common/servicenames.h
94 ../../teraterm/common/codeconv.h
95 ../../teraterm/common/tipwin.h
96 ../../teraterm/common/layer_for_unicode.h
97 ../../teraterm/common/compat_win.h
98 ../../teraterm/common/dllutil.h
99 )
100
101 source_group(
102 "common"
103 REGULAR_EXPRESSION
104 "teraterm\/common\/")
105
106 target_include_directories(
107 ttxssh
108 PRIVATE
109 ../../teraterm/teraterm
110 ../../teraterm/common
111 ../matcher
112 ../putty
113 ${OPENSSL_INCLUDE_DIRS}
114 ${ZLIB_INCLUDE_DIRS}
115 )
116
117 set_target_properties(
118 ttxssh
119 PROPERTIES
120 PREFIX ""
121 )
122
123 target_compile_definitions(
124 ttxssh
125 PRIVATE
126 $<$<CONFIG:Debug>:_CRTDBG_MAP_ALLOC>
127 )
128
129 target_link_libraries(
130 ttxssh
131 PRIVATE
132 common_static
133 libputty
134 ttpcmn
135 ${ZLIB_LIB}
136 ${OPENSSL_LIB}
137 #
138 ws2_32
139 gdi32
140 comdlg32
141 delayimp
142 comctl32
143 # OpenSSL が使用
144 crypt32.lib # TODO このlibを使用しないパッチを適応したら削除すること
145 )
146
147 ### create puttyversion.h
148
149 set(PUTTY_ISS "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss")
150 if(NOT EXISTS ${PUTTY_ISS})
151 message(FATAL_ERROR "${PUTTY_ISS} not found")
152 endif()
153
154 file(READ "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss" iis)
155
156 string(REGEX MATCH "VersionInfoTextVersion=([^\n]+)\n" _ ${iis})
157 set(version_str ${CMAKE_MATCH_1})
158 if("${version_str}" STREQUAL "")
159 string(REGEX MATCH "AppVerName=([^\n]+)\n" _ ${iis})
160 set(version_str ${CMAKE_MATCH_1})
161 endif()
162 if("${version_str}" STREQUAL "")
163 set(version_str "unknown")
164 endif()
165 message("putty version=\"${version_str}\"")
166 FILE(
167 WRITE ${CMAKE_CURRENT_BINARY_DIR}/puttyversion.h
168 "#define PUTTYVERSION \"${version_str}\"\n"
169 )
170
171 install(
172 TARGETS ttxssh
173 RUNTIME
174 DESTINATION .
175 )
176
177 ####
178 # ソースツリー内に生成ファイルが存在していたら削除する
179 if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ttssh2/ttxssh/puttyversion.h")
180 file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/ttssh2/ttxssh/puttyversion.h")
181 endif()

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