| 1 |
set(PACKAGE_NAME "teraterm") |
| 2 |
|
| 3 |
project(${PACKAGE_NAME}) |
| 4 |
|
| 5 |
option(ENABLE_GDIPLUS "Use GDI+ library" ON) |
| 6 |
|
| 7 |
include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_SFMT.cmake) |
| 8 |
include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_oniguruma.cmake) |
| 9 |
|
| 10 |
set(ENABLE_DEBUG_INFO 1) |
| 11 |
|
| 12 |
add_executable( |
| 13 |
${PACKAGE_NAME} WIN32 |
| 14 |
addsetting.cpp |
| 15 |
addsetting.h |
| 16 |
broadcast.cpp |
| 17 |
broadcast.h |
| 18 |
buffer.c |
| 19 |
buffer.h |
| 20 |
checkeol.cpp |
| 21 |
checkeol.h |
| 22 |
clipboar.c |
| 23 |
clipboar.h |
| 24 |
coding_pp.cpp |
| 25 |
coding_pp.h |
| 26 |
coding_pp.rc |
| 27 |
coding_pp_res.h |
| 28 |
commlib.c |
| 29 |
commlib.h |
| 30 |
dnddlg.cpp |
| 31 |
dnddlg.h |
| 32 |
filesys.cpp |
| 33 |
filesys.h |
| 34 |
filesys_log.cpp |
| 35 |
filesys_log.rc |
| 36 |
filesys_log_res.h |
| 37 |
filesys_proto.cpp |
| 38 |
filesys_proto.h |
| 39 |
font_pp.cpp |
| 40 |
font_pp.h |
| 41 |
font_pp.rc |
| 42 |
font_pp_res.h |
| 43 |
ftdlg.cpp |
| 44 |
ftdlg.h |
| 45 |
keyboard.c |
| 46 |
keyboard.h |
| 47 |
prnabort.cpp |
| 48 |
prnabort.h |
| 49 |
protodlg.cpp |
| 50 |
protodlg.h |
| 51 |
scp.cpp |
| 52 |
scp.h |
| 53 |
setupdirdlg.cpp |
| 54 |
setupdirdlg.h |
| 55 |
sizetip.c |
| 56 |
sizetip.h |
| 57 |
teklib.c |
| 58 |
teklib.h |
| 59 |
tekwin.cpp |
| 60 |
tekwin.h |
| 61 |
telnet.c |
| 62 |
telnet.h |
| 63 |
teraprn.cpp |
| 64 |
teraprn.h |
| 65 |
teraterm.cpp |
| 66 |
teraterml.h |
| 67 |
theme.h |
| 68 |
themefile.cpp |
| 69 |
ttdde.c |
| 70 |
ttdde.h |
| 71 |
ttdebug.cpp |
| 72 |
ttdebug.h |
| 73 |
ttdialog.c |
| 74 |
ttdialog.h |
| 75 |
ttfileio.c |
| 76 |
ttfileio.h |
| 77 |
ttime.c |
| 78 |
ttime.h |
| 79 |
ttplug.c |
| 80 |
ttplug.h |
| 81 |
ttsetup.c |
| 82 |
ttsetup.h |
| 83 |
ttwinman.c |
| 84 |
ttwinman.h |
| 85 |
ttwsk.c |
| 86 |
ttwsk.h |
| 87 |
vtdisp.c |
| 88 |
vtdisp.h |
| 89 |
vtterm.c |
| 90 |
vtterm.h |
| 91 |
vtwin.cpp |
| 92 |
vtwin.h |
| 93 |
winjump.c |
| 94 |
winjump.h |
| 95 |
WSAAsyncGetAddrInfo.c |
| 96 |
WSAAsyncGetAddrInfo.h |
| 97 |
sendmem.cpp |
| 98 |
sendmem.h |
| 99 |
# |
| 100 |
uni_combining.map |
| 101 |
# |
| 102 |
ttermpro.rc |
| 103 |
tt-version.rc |
| 104 |
teraterm_manifest.rc |
| 105 |
# |
| 106 |
${CMAKE_CURRENT_BINARY_DIR}/../ttpdlg/svnversion.h |
| 107 |
# |
| 108 |
unicode_test.h |
| 109 |
unicode.h |
| 110 |
unicode.cpp |
| 111 |
unicode_asian_width.tbl |
| 112 |
unicode_combine.tbl |
| 113 |
unicode_emoji.tbl |
| 114 |
# |
| 115 |
ftdlg_lite.h |
| 116 |
ftdlg_lite.cpp |
| 117 |
clipboarddlg.h |
| 118 |
clipboarddlg.cpp |
| 119 |
debug_pp.cpp |
| 120 |
debug_pp.h |
| 121 |
debug_pp.rc |
| 122 |
debug_pp_res.h |
| 123 |
sendfiledlg.cpp |
| 124 |
sendfiledlg.h |
| 125 |
# |
| 126 |
themedlg.cpp |
| 127 |
themedlg.h |
| 128 |
themedlg.rc |
| 129 |
themedlg_res.h |
| 130 |
) |
| 131 |
|
| 132 |
target_sources( |
| 133 |
${PACKAGE_NAME} |
| 134 |
PRIVATE |
| 135 |
../common/tt_res.h |
| 136 |
../common/ttcommon.h |
| 137 |
../common/ttddecmnd.h |
| 138 |
../common/tttypes.h |
| 139 |
../common/tektypes.h |
| 140 |
../common/ttplugin.h |
| 141 |
../common/tt-version.h |
| 142 |
../common/teraterm.h |
| 143 |
../common/ttlib.c |
| 144 |
../common/ttlib.h |
| 145 |
../common/dlglib.h |
| 146 |
../common/codemap.h |
| 147 |
../common/compat_win.h |
| 148 |
../common/tmfc.h |
| 149 |
../common/i18n.h |
| 150 |
../common/dllutil.h |
| 151 |
../common/codeconv.h |
| 152 |
../common/tipwin.h |
| 153 |
# |
| 154 |
../teraterm/unisym2decsp.map |
| 155 |
../teraterm/uni2sjis.map |
| 156 |
../ttpcmn/sjis2uni.map |
| 157 |
) |
| 158 |
|
| 159 |
target_sources( |
| 160 |
${PACKAGE_NAME} |
| 161 |
PRIVATE |
| 162 |
../susie_plugin/libsusieplugin.cpp |
| 163 |
../susie_plugin/libsusieplugin.h |
| 164 |
) |
| 165 |
|
| 166 |
source_group( |
| 167 |
"table_datas" |
| 168 |
REGULAR_EXPRESSION |
| 169 |
"(map|tbl)$" |
| 170 |
) |
| 171 |
|
| 172 |
source_group( |
| 173 |
"common" |
| 174 |
REGULAR_EXPRESSION |
| 175 |
"..\/common\/" |
| 176 |
) |
| 177 |
|
| 178 |
target_sources( |
| 179 |
${PACKAGE_NAME} |
| 180 |
PRIVATE |
| 181 |
../ttpdlg/dlg_res.h |
| 182 |
../ttpdlg/ttdlg.c |
| 183 |
../ttpdlg/ttdlg.h |
| 184 |
../ttpdlg/ttpdlg.rc |
| 185 |
) |
| 186 |
|
| 187 |
source_group( |
| 188 |
"ttpdlg" |
| 189 |
REGULAR_EXPRESSION |
| 190 |
"..\/ttpdlg\/") |
| 191 |
|
| 192 |
target_sources( |
| 193 |
${PACKAGE_NAME} |
| 194 |
PRIVATE |
| 195 |
../ttpfile/bplus.c |
| 196 |
../ttpfile/bplus.h |
| 197 |
../ttpfile/filesys_io.h |
| 198 |
../ttpfile/filesys_win32.cpp |
| 199 |
../ttpfile/filesys_win32.h |
| 200 |
../ttpfile/ftlib.c |
| 201 |
../ttpfile/ftlib.h |
| 202 |
../ttpfile/kermit.c |
| 203 |
../ttpfile/kermit.h |
| 204 |
../ttpfile/protolog.cpp |
| 205 |
../ttpfile/protolog.h |
| 206 |
../ttpfile/quickvan.c |
| 207 |
../ttpfile/quickvan.h |
| 208 |
../ttpfile/xmodem.c |
| 209 |
../ttpfile/xmodem.h |
| 210 |
../ttpfile/ymodem.c |
| 211 |
../ttpfile/ymodem.h |
| 212 |
../ttpfile/zmodem.c |
| 213 |
../ttpfile/zmodem.h |
| 214 |
) |
| 215 |
|
| 216 |
source_group( |
| 217 |
"ttpfile" |
| 218 |
REGULAR_EXPRESSION |
| 219 |
"..\/ttpfile\/") |
| 220 |
|
| 221 |
target_sources( |
| 222 |
${PACKAGE_NAME} |
| 223 |
PRIVATE |
| 224 |
../ttpset/ttset.c |
| 225 |
../ttpset/ttset.h |
| 226 |
../ttpset/ttset_i.h |
| 227 |
../ttpset/ttset_keyboard.c |
| 228 |
) |
| 229 |
|
| 230 |
source_group( |
| 231 |
"ttpset" |
| 232 |
REGULAR_EXPRESSION |
| 233 |
"..\/ttpset\/") |
| 234 |
|
| 235 |
target_sources( |
| 236 |
${PACKAGE_NAME} |
| 237 |
PRIVATE |
| 238 |
../ttpcmn/ttcmn_dup.cpp |
| 239 |
../ttpcmn/ttcmn_dup.h |
| 240 |
../ttpcmn/ttcmn_shared_memory.h |
| 241 |
../ttpcmn/ttcmn_static.c |
| 242 |
../ttpcmn/ttcmn_static.h |
| 243 |
) |
| 244 |
|
| 245 |
source_group( |
| 246 |
"ttpcmn" |
| 247 |
REGULAR_EXPRESSION |
| 248 |
"..\/ttpcmn\/") |
| 249 |
|
| 250 |
if(SUPPORT_OLD_WINDOWS) |
| 251 |
if(MSVC) |
| 252 |
if(${CMAKE_VERSION} VERSION_LESS "3.12.0") |
| 253 |
set(CMAKE_C_STANDARD_LIBRARIES "") |
| 254 |
set(CMAKE_CXX_STANDARD_LIBRARIES "") |
| 255 |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB") |
| 256 |
else() |
| 257 |
target_link_options( |
| 258 |
${PACKAGE_NAME} |
| 259 |
PRIVATE |
| 260 |
/NODEFAULTLIB |
| 261 |
) |
| 262 |
endif() |
| 263 |
target_sources( |
| 264 |
${PACKAGE_NAME} |
| 265 |
PRIVATE |
| 266 |
../../teraterm/common/compat_w95_vs2005.c |
| 267 |
) |
| 268 |
endif() |
| 269 |
if(MINGW) |
| 270 |
target_link_libraries( |
| 271 |
${PACKAGE_NAME} |
| 272 |
PRIVATE |
| 273 |
-Wl,--whole-archive |
| 274 |
mingw_msvcrt |
| 275 |
-Wl,--no-whole-archive |
| 276 |
) |
| 277 |
endif() |
| 278 |
endif(SUPPORT_OLD_WINDOWS) |
| 279 |
|
| 280 |
if (MSVC) |
| 281 |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") |
| 282 |
endif() |
| 283 |
|
| 284 |
set_target_properties( |
| 285 |
${PACKAGE_NAME} |
| 286 |
PROPERTIES |
| 287 |
OUTPUT_NAME "ttermpro" |
| 288 |
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/" |
| 289 |
) |
| 290 |
|
| 291 |
target_include_directories( |
| 292 |
${PACKAGE_NAME} |
| 293 |
PRIVATE |
| 294 |
. |
| 295 |
../teraterm |
| 296 |
../common |
| 297 |
../ttpfile |
| 298 |
../ttpdlg |
| 299 |
../ttpcmn |
| 300 |
../susie_plugin |
| 301 |
${ONIGURUMA_INCLUDE_DIRS} |
| 302 |
${CMAKE_CURRENT_BINARY_DIR}/../ttpdlg # for svnversion.h |
| 303 |
${SFMT_INCLUDE_DIRS} |
| 304 |
) |
| 305 |
|
| 306 |
if(MINGW) |
| 307 |
target_include_directories( |
| 308 |
${PACKAGE_NAME} |
| 309 |
PRIVATE |
| 310 |
. |
| 311 |
) |
| 312 |
endif() |
| 313 |
|
| 314 |
if(MSVC AND ENABLE_DEBUG_INFO) |
| 315 |
target_compile_options( |
| 316 |
${PACKAGE_NAME} |
| 317 |
PRIVATE |
| 318 |
$<$<CONFIG:Release>:/Zi> |
| 319 |
) |
| 320 |
if(${CMAKE_VERSION} VERSION_GREATER "3.13") |
| 321 |
target_link_options( |
| 322 |
${PACKAGE_NAME} |
| 323 |
PRIVATE |
| 324 |
/DEBUG:FULL |
| 325 |
/pdbaltpath:ttermpro.pdb |
| 326 |
/map |
| 327 |
) |
| 328 |
else() |
| 329 |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /map") |
| 330 |
endif() |
| 331 |
elseif(MINGW) |
| 332 |
target_link_options( |
| 333 |
${PACKAGE_NAME} |
| 334 |
PRIVATE |
| 335 |
-Wl,-Map=ttermpro.map,-cref |
| 336 |
) |
| 337 |
endif() |
| 338 |
|
| 339 |
if(ENABLE_GDIPLUS) |
| 340 |
target_compile_options( |
| 341 |
${PACKAGE_NAME} |
| 342 |
PRIVATE "-DENABLE_GDIPLUS=1" |
| 343 |
) |
| 344 |
else(ENABLE_GDIPLUS) |
| 345 |
target_compile_options( |
| 346 |
${PACKAGE_NAME} |
| 347 |
PRIVATE "-DENABLE_GDIPLUS=0" |
| 348 |
) |
| 349 |
endif(ENABLE_GDIPLUS) |
| 350 |
|
| 351 |
target_link_libraries( |
| 352 |
${PACKAGE_NAME} |
| 353 |
PRIVATE |
| 354 |
common_static |
| 355 |
ttpcmn |
| 356 |
ttptek |
| 357 |
cyglib |
| 358 |
${ONIGURUMA_LIB} |
| 359 |
${SFMT_LIB} |
| 360 |
) |
| 361 |
|
| 362 |
if(SUPPORT_OLD_WINDOWS) |
| 363 |
target_link_libraries( |
| 364 |
${PACKAGE_NAME} |
| 365 |
PRIVATE |
| 366 |
layer_for_unicode |
| 367 |
) |
| 368 |
endif() |
| 369 |
|
| 370 |
target_link_libraries( |
| 371 |
${PACKAGE_NAME} |
| 372 |
PRIVATE |
| 373 |
advapi32 |
| 374 |
comctl32 |
| 375 |
comdlg32 |
| 376 |
gdi32 |
| 377 |
imagehlp |
| 378 |
kernel32 |
| 379 |
ole32 |
| 380 |
oleaut32 |
| 381 |
shell32 |
| 382 |
user32 |
| 383 |
uuid |
| 384 |
ws2_32 |
| 385 |
) |
| 386 |
|
| 387 |
if(ENABLE_GDIPLUS) |
| 388 |
target_link_libraries( |
| 389 |
${PACKAGE_NAME} |
| 390 |
PRIVATE |
| 391 |
gdiplus.lib |
| 392 |
) |
| 393 |
endif(ENABLE_GDIPLUS) |
| 394 |
|
| 395 |
install( |
| 396 |
TARGETS ${PACKAGE_NAME} |
| 397 |
DESTINATION . |
| 398 |
) |
| 399 |
if(MSVC AND ENABLE_DEBUG_INFO AND (${CMAKE_VERSION} VERSION_GREATER "3.13")) |
| 400 |
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio") |
| 401 |
install( |
| 402 |
FILES |
| 403 |
$<TARGET_PDB_FILE:teraterm> |
| 404 |
$<CONFIG>/ttermpro.map |
| 405 |
DESTINATION . |
| 406 |
) |
| 407 |
else() |
| 408 |
# single configuration like "NMake Makefiles" |
| 409 |
install( |
| 410 |
FILES |
| 411 |
$<TARGET_PDB_FILE:teraterm> |
| 412 |
${CMAKE_BINARY_DIR}/ttermpro.map |
| 413 |
DESTINATION . |
| 414 |
) |
| 415 |
endif() |
| 416 |
endif() |