• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision9838 (tree)
Time2022-03-25 22:38:59
Authorzmatsuo

Log Message

NMake Makefiles, VS2005, msys2 など考慮

- cmakeビルド時
- multi config ではない(Release,Debugなどがない)場合を考慮

Change Summary

Incremental Difference

--- trunk/CMakeLists.txt (revision 9837)
+++ trunk/CMakeLists.txt (revision 9838)
@@ -26,7 +26,14 @@
2626 if(MSVC AND (MSVC_VERSION LESS_EQUAL 1500))
2727 # Visual Studio 2005, 2008 (1500=VS2008)
2828 set(_WIN32_WINNT "0x0501")
29- set(TTXSSH OFF)
29+ if(1)
30+ set(TTXSSH OFF)
31+ else()
32+ # この組み合わせはlibputtyがビルドできないので今のところ実現しない
33+ set(TTXSSH ON)
34+ set(TTXSSH_LIBRESSL OFF)
35+ set(TTXSSH_OPENSSL3 ON)
36+ endif()
3037 endif()
3138
3239 if(MSVC)
--- trunk/cygwin/CMakeLists.txt (revision 9837)
+++ trunk/cygwin/CMakeLists.txt (revision 9838)
@@ -8,8 +8,8 @@
88 cyglib
99 PROPERTIES FOLDER cygwin)
1010
11-if(CMAKE_SIZEOF_VOID_P EQUAL 4)
12- # 32bit build
11+if(MSVC AND (CMAKE_SIZEOF_VOID_P EQUAL 4))
12+ # Visual Studio 32bit build
1313 add_subdirectory(cygtool)
1414
1515 set_target_properties(
@@ -23,12 +23,14 @@
2323 FOLDER cygwin
2424 )
2525 else()
26- # 64bit build
26+ # other build system...
2727 if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0")
2828 add_subdirectory(cygtool_build)
29- set_target_properties(
30- cygtool_build
31- PROPERTIES FOLDER cygwin)
29+ if(TARGET cygtool_build)
30+ set_target_properties(
31+ cygtool_build
32+ PROPERTIES FOLDER cygwin)
33+ endif()
3234 endif()
3335 endif()
3436
--- trunk/cygwin/cygterm_build/CMakeLists.txt (revision 9837)
+++ trunk/cygwin/cygterm_build/CMakeLists.txt (revision 9838)
@@ -1,4 +1,7 @@
1-
1+# cygwin,msys2を使って cygterm,msys2term をビルドする
2+
3+cmake_minimum_required(VERSION 3.13) # for Generator-Expression
4+
25 add_custom_target(
36 cygterm_build ALL
47 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/build_mark.txt
@@ -6,10 +9,16 @@
69
710 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cygterm_build)
811
12+if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
13+ set(BINARY_DIR "${CMAKE_BINARY_DIR}/$<CONFIG>")
14+else()
15+ set(BINARY_DIR "${CMAKE_BINARY_DIR}")
16+endif()
17+
918 add_custom_command(
1019 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/build_mark.txt
11- COMMAND ${CMAKE_COMMAND} -E echo ${CMAKE_BINARY_DIR}/$<CONFIG>
12- COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/$<CONFIG> -P ${CMAKE_CURRENT_LIST_DIR}/../cygterm/build_cygterm.cmake
20+ COMMAND ${CMAKE_COMMAND} -E echo ${BINARY_DIR}
21+ COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${BINARY_DIR} -P ${CMAKE_CURRENT_LIST_DIR}/../cygterm/build_cygterm.cmake
1322 COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/build_mark.txt
1423 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cygterm_build
1524 )
@@ -16,29 +25,29 @@
1625
1726 install(
1827 FILES
19- ${CMAKE_BINARY_DIR}/$<CONFIG>/cygterm_x86_64/cygterm.exe
20- ${CMAKE_BINARY_DIR}/$<CONFIG>/cygterm_x86_64/cygterm.cfg
28+ ${BINARY_DIR}/cygterm_x86_64/cygterm.exe
29+ ${BINARY_DIR}/cygterm_x86_64/cygterm.cfg
2130 DESTINATION cygterm_x86_64
2231 OPTIONAL
2332 )
2433 install(
2534 FILES
26- ${CMAKE_BINARY_DIR}/$<CONFIG>/cygterm_x86_64/cygterm.exe
27- ${CMAKE_BINARY_DIR}/$<CONFIG>/cygterm_x86_64/cygterm.cfg
35+ ${BINARY_DIR}/cygterm_x86_64/cygterm.exe
36+ ${BINARY_DIR}/cygterm_x86_64/cygterm.cfg
2837 DESTINATION .
2938 OPTIONAL
3039 )
3140 install(
3241 FILES
33- ${CMAKE_BINARY_DIR}/$<CONFIG>/cygterm_i686/cygterm.exe
34- ${CMAKE_BINARY_DIR}/$<CONFIG>/cygterm_i686/cygterm.cfg
42+ ${BINARY_DIR}/cygterm_i686/cygterm.exe
43+ ${BINARY_DIR}/cygterm_i686/cygterm.cfg
3544 DESTINATION cygterm_i686
3645 OPTIONAL
3746 )
3847 install(
3948 FILES
40- ${CMAKE_BINARY_DIR}/$<CONFIG>/msys2term.exe
41- ${CMAKE_BINARY_DIR}/$<CONFIG>/msys2term.cfg
49+ ${BINARY_DIR}/msys2term.exe
50+ ${BINARY_DIR}/msys2term.cfg
4251 DESTINATION .
4352 OPTIONAL
4453 )
--- trunk/cygwin/cygtool_build/CMakeLists.txt (revision 9837)
+++ trunk/cygwin/cygtool_build/CMakeLists.txt (revision 9838)
@@ -1,20 +1,40 @@
1-
1+# VS 32bit 以外のビルドシステムから cygtool をビルドする
2+
3+cmake_minimum_required(VERSION 3.13) # for Generator-Expression
4+
5+if(NOT ("${CMAKE_GENERATOR}" MATCHES "Visual Studio"))
6+ # 現在VS以外はうまくっていない
7+ return()
8+endif()
9+
10+if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
11+ set(BINARY_DIR "${CMAKE_BINARY_DIR}/$<CONFIG>")
12+else()
13+ set(BINARY_DIR "${CMAKE_BINARY_DIR}")
14+endif()
15+
16+set(SRC
17+ ${CMAKE_CURRENT_LIST_DIR}/../cygtool/cygtool.c
18+ ${CMAKE_CURRENT_LIST_DIR}/../cygtool/cygtool.h
19+ ${CMAKE_CURRENT_LIST_DIR}/../cygtool/cygtool.def
20+ )
21+
222 add_custom_target(
323 cygtool_build ALL
4- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/build_mark.txt
24+ DEPENDS ${BINARY_DIR}/cygtool.dll
25+ SOURCES ${SRC}
526 )
627
728 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cygtool_build)
829
930 add_custom_command(
10- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/build_mark.txt
11- COMMAND ${CMAKE_COMMAND} -DCMAKE_GENERATOR=${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/$<CONFIG> -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -P ${CMAKE_CURRENT_LIST_DIR}/../cygtool/build_cygtool.cmake
12- COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/build_mark.txt
31+ OUTPUT ${BINARY_DIR}/cygtool.dll
32+ DEPENDS ${SRC}
33+ COMMAND ${CMAKE_COMMAND} -DCMAKE_GENERATOR=${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX=${BINARY_DIR} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -P ${CMAKE_CURRENT_LIST_DIR}/../cygtool/build_cygtool.cmake
1334 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cygtool_build
14- COMMENT Generate "${CMAKE_CURRENT_BINARY_DIR}/cygtool.dll"
1535 )
1636
1737 install(
18- FILES ${CMAKE_BINARY_DIR}/$<CONFIG>/cygtool.dll
38+ FILES ${BINARY_DIR}/cygtool.dll
1939 DESTINATION .
2040 )
--- trunk/teraterm/teraterm/CMakeLists.txt (revision 9837)
+++ trunk/teraterm/teraterm/CMakeLists.txt (revision 9838)
@@ -338,11 +338,20 @@
338338 DESTINATION .
339339 )
340340 if(MSVC AND ENABLE_DEBUG_INFO AND (${CMAKE_VERSION} VERSION_GREATER "3.13"))
341- install(
342- FILES
343- $<TARGET_PDB_FILE:teraterm>
344- $<$<CONFIG:Debug>:debug/ttermpro.map>
345- $<$<CONFIG:Release>:release/ttermpro.map>
346- DESTINATION .
347- )
341+ if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
342+ install(
343+ FILES
344+ $<TARGET_PDB_FILE:teraterm>
345+ $<CONFIG>/ttermpro.map
346+ DESTINATION .
347+ )
348+ else()
349+ # single configuration like "NMake Makefiles"
350+ install(
351+ FILES
352+ $<TARGET_PDB_FILE:teraterm>
353+ ${CMAKE_BINARY_DIR}/ttermpro.map
354+ DESTINATION .
355+ )
356+ endif()
348357 endif()
Show on old repository browser