• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision8834 (tree)
Time2020-07-05 00:59:25
Authorzmatsuo

Log Message

cmakeで通常のビルドを軽くする

- ヘルプファイル(chm)のビルドなど常に行わないようにした
- 次のターゲットは常にビルドしない(install時にはビルドする)

- teraterm_ini
- lang_conv
- lang_copy
- teraterm_chm
- teratermj_chm

- プロジェクトフォルダを追加(Visual Studio)

- installer
- lang_conv, lang_copy, teraterm_ini
- doc
- teraterm_chm
- teratermj_chm
- tools
- ttbroadcast

- perlの検索を重複して行わないよう修正
- add_custom_command(COMMAND) でパイプを使用しないよう修正

- 実行ファイル名のパス変換を不要とするため

Change Summary

Incremental Difference

--- trunk/CMakeLists.txt (revision 8833)
+++ trunk/CMakeLists.txt (revision 8834)
@@ -121,7 +121,9 @@
121121 HINTS c:/cygwin64/usr/bin
122122 )
123123 else()
124- set(PERL "perl")
124+ find_program(
125+ PERL perl
126+ )
125127 endif()
126128 message("perl=${PERL}")
127129
--- trunk/doc/CMakeLists.txt (revision 8833)
+++ trunk/doc/CMakeLists.txt (revision 8834)
@@ -1,13 +1,5 @@
11 if (MSVC OR ("$ENV{MSYSTEM}" MATCHES "MINGW"))
22 find_program(
3- PERL perl.exe
4- HINTS c:/Perl64/bin
5- HINTS c:/Perl/bin
6- HINTS c:/cygwin/usr/bin
7- HINTS c:/cygwin64/usr/bin
8- )
9- file(TO_NATIVE_PATH ${PERL} PERL)
10- find_program(
113 HHC hhc.exe
124 HINTS "C:/Program Files (x86)/HTML Help Workshop"
135 HINTS "C:/Program Files/HTML Help Workshop"
@@ -34,7 +26,7 @@
3426 )
3527
3628 add_custom_target(
37- teraterm_chm ALL
29+ teraterm_chm
3830 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/en/teraterm.chm
3931 SOURCES ${SRC_EN}
4032 SOURCES htmlhelp_index_make.pl
@@ -44,7 +36,7 @@
4436 )
4537
4638 add_custom_target(
47- teratermj_chm ALL
39+ teratermj_chm
4840 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ja/teratermj.chm
4941 SOURCES htmlhelp_index_make.pl
5042 SOURCES htmlhelp_update_check.pl
@@ -65,9 +57,11 @@
6557 COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/SFMT/LICENSE.txt -o en/html/reference/SFMT-LICENSE.txt -l unix
6658 COMMAND ${PERL} ../installer/2sjis.pl -i ../cygterm/COPYING -o en/html/reference/CygTerm+-LICENSE.txt -l unix
6759 COMMAND ${PERL} ../installer/copy-zliblicense.pl -i ../libs/zlib/README -o en/html/reference/zlib-LICENSE.txt -l unix
68- COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" en/html/reference/build_with_cmake.md | ${PERL} Markdown_1.0.1/Markdown.pl > en/html/reference/build_with_cmake_utf8.html
60+ COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" en/html/reference/build_with_cmake.md > en/html/reference/build_with_cmake_no_bom.md
61+ COMMAND ${PERL} Markdown_1.0.1/Markdown.pl en/html/reference/build_with_cmake_no_bom.md > en/html/reference/build_with_cmake_utf8.html
6962 COMMAND ${PERL} ../installer/2sjis.pl -i en/html/reference/build_with_cmake_utf8.html -o en/html/reference/build_with_cmake.html -c utf8
70- COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" en/html/reference/build_library_with_cmake.md | ${PERL} Markdown_1.0.1/Markdown.pl > en/html/reference/build_library_with_cmake_utf8.html
63+ COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" en/html/reference/build_library_with_cmake.md > en/html/reference/build_library_with_cmake_no_bom.md
64+ COMMAND ${PERL} Markdown_1.0.1/Markdown.pl en/html/reference/build_library_with_cmake_no_bom.md > en/html/reference/build_library_with_cmake_utf8.html
7165 COMMAND ${PERL} ../installer/2sjis.pl -i en/html/reference/build_library_with_cmake_utf8.html -o en/html/reference/build_library_with_cmake.html -c utf8
7266 COMMAND ${PERL} htmlhelp_index_make.pl en html > en/Index.hhk
7367 COMMAND ${HHC} en/teraterm.hhp || (exit 0)
@@ -84,9 +78,11 @@
8478 COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/SFMT/LICENSE.txt -o ja/html/reference/SFMT-LICENSE.txt -l unix
8579 COMMAND ${PERL} ../installer/2sjis.pl -i ../cygterm/COPYING -o ja/html/reference/CygTerm+-LICENSE.txt -l unix
8680 COMMAND ${PERL} ../installer/copy-zliblicense.pl -i ../libs/zlib/README -o ja/html/reference/zlib-LICENSE.txt -l unix
87- COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" ja/html/reference/build_with_cmake.md | ${PERL} Markdown_1.0.1/Markdown.pl > ja/html/reference/build_with_cmake_utf8.html
81+ COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" ja/html/reference/build_with_cmake.md > ja/html/reference/build_with_cmake_no_bom.md
82+ COMMAND ${PERL} Markdown_1.0.1/Markdown.pl ja/html/reference/build_with_cmake_no_bom.md > ja/html/reference/build_with_cmake_utf8.html
8883 COMMAND ${PERL} ../installer/2sjis.pl -i ja/html/reference/build_with_cmake_utf8.html -o ja/html/reference/build_with_cmake.html -c utf8
89- COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" ja/html/reference/build_library_with_cmake.md | ${PERL} Markdown_1.0.1/Markdown.pl > ja/html/reference/build_library_with_cmake_utf8.html
84+ COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" ja/html/reference/build_library_with_cmake.md > ja/html/reference/build_library_with_cmake_no_bom.md
85+ COMMAND ${PERL} Markdown_1.0.1/Markdown.pl ja/html/reference/build_library_with_cmake_no_bom.md > ja/html/reference/build_library_with_cmake_utf8.html
9086 COMMAND ${PERL} ../installer/2sjis.pl -i ja/html/reference/build_library_with_cmake_utf8.html -o ja/html/reference/build_library_with_cmake.html -c utf8
9187 COMMAND ${PERL} htmlhelp_index_make.pl ja html > ja/Index.hhk
9288 COMMAND ${HHC} ja/teraterm.hhp || (exit 0)
@@ -94,6 +90,13 @@
9490 COMMENT Generate "${CMAKE_CURRENT_BINARY_DIR}/teratermj.chm"
9591 )
9692
93+ set_target_properties(
94+ teraterm_chm
95+ teratermj_chm
96+ PROPERTIES FOLDER doc)
97+
98+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_CURRENT_BINARY_DIR} --target teraterm_chm)")
99+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_CURRENT_BINARY_DIR} --target teratermj_chm)")
97100 install(
98101 FILES
99102 ${CMAKE_CURRENT_SOURCE_DIR}/ja/teratermj.chm
--- trunk/installer/CMakeLists.txt (revision 8833)
+++ trunk/installer/CMakeLists.txt (revision 8834)
@@ -13,23 +13,8 @@
1313 RENAME KEYBOARD.CNF
1414 )
1515
16-if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
17- find_program(
18- PERL perl
19- )
20-else()
21- # CYGWIN / Active Perl
22- find_program(
23- PERL perl.exe
24- HINTS c:/Perl64/bin
25- HINTS c:/Perl/bin
26- HINTS c:/cygwin/usr/bin
27- HINTS c:/cygwin64/usr/bin
28- )
29-endif()
30-
3116 add_custom_target(
32- teraterm_ini ALL
17+ teraterm_ini
3318 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI
3419 SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/release/TERATERM.INI
3520 SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/setini.pl
@@ -36,11 +21,17 @@
3621 COMMENT Generate "${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI"
3722 )
3823
24+set_target_properties(
25+ teraterm_ini
26+ PROPERTIES FOLDER installer
27+ )
28+
3929 add_custom_command(
4030 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI
4131 COMMAND ${PERL} ${CMAKE_CURRENT_SOURCE_DIR}/setini.pl ${CMAKE_CURRENT_SOURCE_DIR}/release/TERATERM.INI > "${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI"
4232 )
4333
34+install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_CURRENT_BINARY_DIR} --target teraterm_ini)")
4435 install(
4536 FILES ${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI
4637 DESTINATION .
@@ -49,7 +40,7 @@
4940 set(RELEASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/release)
5041
5142 add_custom_target(
52- lang_conv ALL
43+ lang_conv
5344 DEPENDS
5445 ${RELEASE_DIR}/lang_utf16le/Default.lng
5546 ${RELEASE_DIR}/lang_utf16le/English.lng
@@ -81,6 +72,11 @@
8172 "${RELEASE_DIR}/lang_utf8/Traditional Chinese.lng"
8273 )
8374
75+set_target_properties(
76+ lang_conv
77+ PROPERTIES FOLDER installer
78+ )
79+
8480 add_custom_command(
8581 OUTPUT
8682 ${RELEASE_DIR}/lang_utf16le/Default.lng
@@ -130,9 +126,8 @@
130126 if(MSVC AND ("${MSVC_VERSION}" GREATER_EQUAL "1910"))
131127 # Visual Studio 2017以上の時
132128 add_custom_target(
133- lang_copy ALL
129+ lang_copy
134130 DEPENDS
135- lang_conv
136131 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(Configuration)/lang/Default.lng"
137132 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(Configuration)/lang/English.lng"
138133 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(Configuration)/lang/French.lng"
@@ -171,6 +166,10 @@
171166 "${RELEASE_DIR}/lang/Simplified Chinese.lng"
172167 "${RELEASE_DIR}/lang/Traditional Chinese.lng"
173168 )
169+ set_target_properties(
170+ lang_copy
171+ PROPERTIES FOLDER installer
172+ )
174173 add_custom_command(
175174 OUTPUT
176175 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(Configuration)/lang/Default.lng"
@@ -197,9 +196,8 @@
197196 elseif(MINGW)
198197 # MinGW
199198 add_custom_target(
200- lang_copy ALL
199+ lang_copy
201200 DEPENDS
202- lang_conv
203201 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lang/Default.lng"
204202 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lang/English.lng"
205203 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lang/French.lng"
@@ -238,6 +236,10 @@
238236 "${RELEASE_DIR}/lang/Simplified Chinese.lng"
239237 "${RELEASE_DIR}/lang/Traditional Chinese.lng"
240238 )
239+ set_target_properties(
240+ lang_copy
241+ PROPERTIES FOLDER installer
242+ )
241243 add_custom_command(
242244 OUTPUT
243245 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lang/Default.lng"
--- trunk/tools/CMakeLists.txt (revision 8833)
+++ trunk/tools/CMakeLists.txt (revision 8834)
@@ -1 +1,6 @@
11 add_subdirectory(ttbroadcast)
2+
3+set_target_properties(
4+ ttbroadcast
5+ PROPERTIES FOLDER tools
6+ )
Show on old repository browser