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 7532 - (hide annotations) (download)
Fri Mar 29 13:58:09 2019 UTC (5 years ago) by zmatsuo
File MIME type: text/plain
File size: 2945 byte(s)
git-svn、putty.issがない場合に対応するようにした
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     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 zmatsuo 7507 ../../teraterm/common/tipwin.cpp
22     ../../teraterm/common/tipwin.h
23 zmatsuo 7456 )
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     target_link_libraries(
121     ttxssh
122     libputty
123     ttpcmn
124     debug zlibstaticd
125     optimized zlibstatic
126     ${OPENSSL_LIB}
127     #
128     ws2_32
129     dnsapi
130     gdi32
131     comdlg32
132     delayimp
133     )
134    
135     ### create puttyversion.h
136    
137 zmatsuo 7532 set(PUTTY_ISS "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss")
138     if(NOT EXISTS ${PUTTY_ISS})
139     message(FATAL_ERROR "${PUTTY_ISS} not found")
140     endif()
141    
142 zmatsuo 7456 file(READ "${CMAKE_SOURCE_DIR}/libs/putty/windows/putty.iss" iis)
143    
144     string(REGEX MATCH "VersionInfoTextVersion=([^\n]+)\n" _ ${iis})
145     set(version_str ${CMAKE_MATCH_1})
146     if("${version_str}" STREQUAL "")
147     string(REGEX MATCH "AppVerName=([^\n]+)\n" _ ${iis})
148     set(version_str ${CMAKE_MATCH_1})
149     endif()
150     if("${version_str}" STREQUAL "")
151     set(version_str "unknown")
152     endif()
153     message("putty version=\"${version_str}\"")
154     FILE(
155     WRITE ${CMAKE_CURRENT_BINARY_DIR}/puttyversion.h
156     "#define PUTTYVERSION \"${version_str}\"\n"
157     )

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