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 8465 - (hide annotations) (download)
Fri Jan 10 13:13:45 2020 UTC (4 years, 3 months ago) by zmatsuo
File MIME type: text/plain
File size: 3644 byte(s)
cmake の USE_UNICODE_API を削除

- Unicode版,ANSI版の作り分けを考慮していたが今のところ不要
1 zmatsuo 7456 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 zmatsuo 7952 if (MSVC)
9 zmatsuo 8211 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DELAYLOAD:user32.dll /DELAYLOAD:dnsapi.dll")
10 zmatsuo 7456 endif()
11    
12 zmatsuo 7952 add_library(
13     ttxssh SHARED
14 zmatsuo 7456 )
15    
16 zmatsuo 7952 target_sources(
17     ttxssh
18     PRIVATE
19 zmatsuo 7456 ${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 zmatsuo 7952 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/dlglib.c
94     ../../teraterm/common/dlglib_cpp.cpp
95     ../../teraterm/common/dlglib_tmpl.cpp
96     ../../teraterm/common/servicenames.h
97     ../../teraterm/common/codeconv.cpp
98     ../../teraterm/common/codeconv.h
99     ../../teraterm/common/tipwin.cpp
100     ../../teraterm/common/tipwin.h
101 doda 8445 ../../teraterm/common/layer_for_unicode.cpp
102     ../../teraterm/common/layer_for_unicode.h
103     ../../teraterm/common/compat_win.cpp
104     ../../teraterm/common/compat_win.h
105     ../../teraterm/common/dllutil.cpp
106     ../../teraterm/common/dllutil.h
107 zmatsuo 7952 )
108 zmatsuo 7456
109 zmatsuo 7952 source_group(
110     "common"
111     REGULAR_EXPRESSION
112     "teraterm\/common\/")
113    
114     target_include_directories(
115     ttxssh
116     PRIVATE
117 zmatsuo 7456 ../../teraterm/teraterm
118     ../../teraterm/common
119     ../matcher
120     ../putty
121     ${OPENSSL_INCLUDE_DIRS}
122     ${ZLIB_INCLUDE_DIRS}
123 zmatsuo 7952 )
124 zmatsuo 7456
125 zmatsuo 7536 set_target_properties(
126     ttxssh
127     PROPERTIES
128     PREFIX ""
129     )
130    
131 zmatsuo 7952 target_compile_definitions(
132     ttxssh
133     PRIVATE
134     $<$<CONFIG:Debug>:_CRTDBG_MAP_ALLOC>
135     )
136    
137 zmatsuo 7456 target_link_libraries(
138     ttxssh
139     libputty
140     ttpcmn
141 zmatsuo 7952 ${ZLIB_LIB}
142 zmatsuo 7456 ${OPENSSL_LIB}
143     #
144     ws2_32
145     dnsapi
146     gdi32
147     comdlg32
148     delayimp
149 doda 8445 comctl32
150 zmatsuo 8332 # OpenSSL が使用
151     crypt32.lib # TODO このlibを使用しないパッチを適応したら削除すること
152 zmatsuo 7456 )
153    
154     ### create puttyversion.h
155    
156 zmatsuo 7532 set(PUTTY_ISS "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss")
157     if(NOT EXISTS ${PUTTY_ISS})
158     message(FATAL_ERROR "${PUTTY_ISS} not found")
159     endif()
160    
161 zmatsuo 7456 file(READ "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss" iis)
162    
163     string(REGEX MATCH "VersionInfoTextVersion=([^\n]+)\n" _ ${iis})
164     set(version_str ${CMAKE_MATCH_1})
165     if("${version_str}" STREQUAL "")
166     string(REGEX MATCH "AppVerName=([^\n]+)\n" _ ${iis})
167     set(version_str ${CMAKE_MATCH_1})
168     endif()
169     if("${version_str}" STREQUAL "")
170     set(version_str "unknown")
171     endif()
172     message("putty version=\"${version_str}\"")
173     FILE(
174     WRITE ${CMAKE_CURRENT_BINARY_DIR}/puttyversion.h
175     "#define PUTTYVERSION \"${version_str}\"\n"
176     )
177 zmatsuo 7990
178     install(
179     TARGETS ttxssh
180     RUNTIME
181     DESTINATION .
182     )

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