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 7536 - (show annotations) (download)
Mon Apr 1 12:45:02 2019 UTC (5 years ago) by zmatsuo
File MIME type: text/plain
File size: 3013 byte(s)
MinGWでビルドできるよう調整
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(USE_UNICODE_API)
9 add_definitions(-DUNICODE -D_UNICODE)
10 endif()
11
12 set(COMMON_SRC
13 ../../teraterm/teraterm/WSAAsyncGetAddrInfo.c
14 ../../teraterm/common/ttcommon.h
15 ../../teraterm/common/i18n.h
16 ../../teraterm/common/ttlib.h
17 ../../teraterm/common/dlglib.h
18 ../../teraterm/common/servicenames.h
19 ../../teraterm/common/codeconv.cpp
20 ../../teraterm/common/codeconv.h
21 ../../teraterm/common/tipwin.cpp
22 ../../teraterm/common/tipwin.h
23 )
24
25 source_group(
26 "common"
27 FILES
28 ${COMMON_SRC}
29 )
30
31 set(SRC
32 ${CMAKE_CURRENT_BINARY_DIR}/puttyversion.h
33 ../matcher/matcher.c
34 arc4random.c
35 arc4random.h
36 auth.c
37 auth.h
38 buffer.c
39 buffer.h
40 chacha.c
41 chacha.h
42 cipher.h
43 cipher-ctr.c
44 config.h
45 crypt.c
46 crypt.h
47 dns.c
48 dns.h
49 ed25519.c
50 ed25519_bcrypt_pbkdf.c
51 ed25519_blf.h
52 ed25519_blocks.c
53 ed25519_blowfish.c
54 ed25519_crypto_api.h
55 ed25519_fe25519.c
56 ed25519_fe25519.h
57 ed25519_ge25519.c
58 ed25519_ge25519.h
59 ed25519_hash.c
60 ed25519_sc25519.c
61 ed25519_sc25519.h
62 ed25519_verify.c
63 fwd.c
64 fwd.h
65 fwd-socks.c
66 fwd-socks.h
67 fwdui.c
68 fwdui.h
69 hosts.c
70 hosts.h
71 kex.c
72 kex.h
73 key.c
74 key.h
75 keyfiles.c
76 keyfiles.h
77 pkt.c
78 pkt.h
79 resource.h
80 sftp.c
81 sftp.h
82 ssh.c
83 ssh.h
84 ttxssh.c
85 ttxssh.def
86 ttxssh.h
87 ttxssh.rc
88 ttxssh-version.h
89 ttxssh-version.rc
90 util.c
91 util.h
92 x11util.c
93 x11util.h
94 ${COMMON_SRC}
95 )
96
97
98 include_directories(
99 ../../teraterm/teraterm
100 ../../teraterm/common
101 ../matcher
102 ../putty
103 ${OPENSSL_INCLUDE_DIRS}
104 ${ZLIB_INCLUDE_DIRS}
105 )
106
107 link_directories(
108 ${ZLIB_LIBRARY_DIRS}
109 )
110
111 if (MSVC)
112 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DELAYLOAD:dnsapi.dll")
113 endif()
114
115 add_library(
116 ttxssh SHARED
117 ${SRC}
118 )
119
120 set_target_properties(
121 ttxssh
122 PROPERTIES
123 PREFIX ""
124 )
125
126 target_link_libraries(
127 ttxssh
128 libputty
129 ttpcmn
130 debug zlibstaticd
131 optimized zlibstatic
132 ${OPENSSL_LIB}
133 #
134 ws2_32
135 dnsapi
136 gdi32
137 comdlg32
138 delayimp
139 )
140
141 ### create puttyversion.h
142
143 set(PUTTY_ISS "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss")
144 if(NOT EXISTS ${PUTTY_ISS})
145 message(FATAL_ERROR "${PUTTY_ISS} not found")
146 endif()
147
148 file(READ "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss" iis)
149
150 string(REGEX MATCH "VersionInfoTextVersion=([^\n]+)\n" _ ${iis})
151 set(version_str ${CMAKE_MATCH_1})
152 if("${version_str}" STREQUAL "")
153 string(REGEX MATCH "AppVerName=([^\n]+)\n" _ ${iis})
154 set(version_str ${CMAKE_MATCH_1})
155 endif()
156 if("${version_str}" STREQUAL "")
157 set(version_str "unknown")
158 endif()
159 message("putty version=\"${version_str}\"")
160 FILE(
161 WRITE ${CMAKE_CURRENT_BINARY_DIR}/puttyversion.h
162 "#define PUTTYVERSION \"${version_str}\"\n"
163 )

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