Revision: 8834 https://osdn.net/projects/ttssh2/scm/svn/commits/8834 Author: zmatsuo Date: 2020-07-05 00:59:25 +0900 (Sun, 05 Jul 2020) 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) でパイプを使用しないよう修正 - 実行ファイル名のパス変換を不要とするため Modified Paths: -------------- trunk/CMakeLists.txt trunk/doc/CMakeLists.txt trunk/installer/CMakeLists.txt trunk/tools/CMakeLists.txt -------------- next part -------------- Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2020-07-03 14:44:22 UTC (rev 8833) +++ trunk/CMakeLists.txt 2020-07-04 15:59:25 UTC (rev 8834) @@ -121,7 +121,9 @@ HINTS c:/cygwin64/usr/bin ) else() - set(PERL "perl") + find_program( + PERL perl + ) endif() message("perl=${PERL}") Modified: trunk/doc/CMakeLists.txt =================================================================== --- trunk/doc/CMakeLists.txt 2020-07-03 14:44:22 UTC (rev 8833) +++ trunk/doc/CMakeLists.txt 2020-07-04 15:59:25 UTC (rev 8834) @@ -1,13 +1,5 @@ if (MSVC OR ("$ENV{MSYSTEM}" MATCHES "MINGW")) find_program( - PERL perl.exe - HINTS c:/Perl64/bin - HINTS c:/Perl/bin - HINTS c:/cygwin/usr/bin - HINTS c:/cygwin64/usr/bin - ) - file(TO_NATIVE_PATH ${PERL} PERL) - find_program( HHC hhc.exe HINTS "C:/Program Files (x86)/HTML Help Workshop" HINTS "C:/Program Files/HTML Help Workshop" @@ -34,7 +26,7 @@ ) add_custom_target( - teraterm_chm ALL + teraterm_chm DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/en/teraterm.chm SOURCES ${SRC_EN} SOURCES htmlhelp_index_make.pl @@ -44,7 +36,7 @@ ) add_custom_target( - teratermj_chm ALL + teratermj_chm DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ja/teratermj.chm SOURCES htmlhelp_index_make.pl SOURCES htmlhelp_update_check.pl @@ -65,9 +57,11 @@ COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/SFMT/LICENSE.txt -o en/html/reference/SFMT-LICENSE.txt -l unix COMMAND ${PERL} ../installer/2sjis.pl -i ../cygterm/COPYING -o en/html/reference/CygTerm+-LICENSE.txt -l unix COMMAND ${PERL} ../installer/copy-zliblicense.pl -i ../libs/zlib/README -o en/html/reference/zlib-LICENSE.txt -l unix - 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 + COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" en/html/reference/build_with_cmake.md > en/html/reference/build_with_cmake_no_bom.md + 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 COMMAND ${PERL} ../installer/2sjis.pl -i en/html/reference/build_with_cmake_utf8.html -o en/html/reference/build_with_cmake.html -c utf8 - 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 + 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 + 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 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 COMMAND ${PERL} htmlhelp_index_make.pl en html > en/Index.hhk COMMAND ${HHC} en/teraterm.hhp || (exit 0) @@ -84,9 +78,11 @@ COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/SFMT/LICENSE.txt -o ja/html/reference/SFMT-LICENSE.txt -l unix COMMAND ${PERL} ../installer/2sjis.pl -i ../cygterm/COPYING -o ja/html/reference/CygTerm+-LICENSE.txt -l unix COMMAND ${PERL} ../installer/copy-zliblicense.pl -i ../libs/zlib/README -o ja/html/reference/zlib-LICENSE.txt -l unix - 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 + COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" ja/html/reference/build_with_cmake.md > ja/html/reference/build_with_cmake_no_bom.md + 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 COMMAND ${PERL} ../installer/2sjis.pl -i ja/html/reference/build_with_cmake_utf8.html -o ja/html/reference/build_with_cmake.html -c utf8 - 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 + 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 + 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 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 COMMAND ${PERL} htmlhelp_index_make.pl ja html > ja/Index.hhk COMMAND ${HHC} ja/teraterm.hhp || (exit 0) @@ -94,6 +90,13 @@ COMMENT Generate "${CMAKE_CURRENT_BINARY_DIR}/teratermj.chm" ) + set_target_properties( + teraterm_chm + teratermj_chm + PROPERTIES FOLDER doc) + + install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_CURRENT_BINARY_DIR} --target teraterm_chm)") + install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_CURRENT_BINARY_DIR} --target teratermj_chm)") install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/ja/teratermj.chm Modified: trunk/installer/CMakeLists.txt =================================================================== --- trunk/installer/CMakeLists.txt 2020-07-03 14:44:22 UTC (rev 8833) +++ trunk/installer/CMakeLists.txt 2020-07-04 15:59:25 UTC (rev 8834) @@ -13,23 +13,8 @@ RENAME KEYBOARD.CNF ) -if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux") - find_program( - PERL perl - ) -else() - # CYGWIN / Active Perl - find_program( - PERL perl.exe - HINTS c:/Perl64/bin - HINTS c:/Perl/bin - HINTS c:/cygwin/usr/bin - HINTS c:/cygwin64/usr/bin - ) -endif() - add_custom_target( - teraterm_ini ALL + teraterm_ini DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/release/TERATERM.INI SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/setini.pl @@ -36,11 +21,17 @@ COMMENT Generate "${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI" ) +set_target_properties( + teraterm_ini + PROPERTIES FOLDER installer + ) + add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI COMMAND ${PERL} ${CMAKE_CURRENT_SOURCE_DIR}/setini.pl ${CMAKE_CURRENT_SOURCE_DIR}/release/TERATERM.INI > "${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI" ) +install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_CURRENT_BINARY_DIR} --target teraterm_ini)") install( FILES ${CMAKE_CURRENT_BINARY_DIR}/TERATERM.INI DESTINATION . @@ -49,7 +40,7 @@ set(RELEASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/release) add_custom_target( - lang_conv ALL + lang_conv DEPENDS ${RELEASE_DIR}/lang_utf16le/Default.lng ${RELEASE_DIR}/lang_utf16le/English.lng @@ -81,6 +72,11 @@ "${RELEASE_DIR}/lang_utf8/Traditional Chinese.lng" ) +set_target_properties( + lang_conv + PROPERTIES FOLDER installer + ) + add_custom_command( OUTPUT ${RELEASE_DIR}/lang_utf16le/Default.lng @@ -130,9 +126,8 @@ if(MSVC AND ("${MSVC_VERSION}" GREATER_EQUAL "1910")) # Visual Studio 2017以上の時 add_custom_target( - lang_copy ALL + lang_copy DEPENDS - lang_conv "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(Configuration)/lang/Default.lng" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(Configuration)/lang/English.lng" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(Configuration)/lang/French.lng" @@ -171,6 +166,10 @@ "${RELEASE_DIR}/lang/Simplified Chinese.lng" "${RELEASE_DIR}/lang/Traditional Chinese.lng" ) + set_target_properties( + lang_copy + PROPERTIES FOLDER installer + ) add_custom_command( OUTPUT "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(Configuration)/lang/Default.lng" @@ -197,9 +196,8 @@ elseif(MINGW) # MinGW add_custom_target( - lang_copy ALL + lang_copy DEPENDS - lang_conv "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lang/Default.lng" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lang/English.lng" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lang/French.lng" @@ -238,6 +236,10 @@ "${RELEASE_DIR}/lang/Simplified Chinese.lng" "${RELEASE_DIR}/lang/Traditional Chinese.lng" ) + set_target_properties( + lang_copy + PROPERTIES FOLDER installer + ) add_custom_command( OUTPUT "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lang/Default.lng" Modified: trunk/tools/CMakeLists.txt =================================================================== --- trunk/tools/CMakeLists.txt 2020-07-03 14:44:22 UTC (rev 8833) +++ trunk/tools/CMakeLists.txt 2020-07-04 15:59:25 UTC (rev 8834) @@ -1 +1,6 @@ add_subdirectory(ttbroadcast) + +set_target_properties( + ttbroadcast + PROPERTIES FOLDER tools + )