Revision: 9454 https://osdn.net/projects/ttssh2/scm/svn/commits/9454 Author: zmatsuo Date: 2021-09-25 01:47:12 +0900 (Sat, 25 Sep 2021) Log Message: ----------- 64bitでビルドしていても、cygtool は 32bitバイナリを出力 - cmakeビルド時、msys2 MinGW 64bitでビルドしているとき - libgcc_s_dw2-1.dll に依存しないようリンクオプションを追加 Modified Paths: -------------- trunk/installer/cygtool/CMakeLists.txt trunk/installer/cygtool/build_cygtool.cmake -------------- next part -------------- Modified: trunk/installer/cygtool/CMakeLists.txt =================================================================== --- trunk/installer/cygtool/CMakeLists.txt 2021-09-24 16:47:02 UTC (rev 9453) +++ trunk/installer/cygtool/CMakeLists.txt 2021-09-24 16:47:12 UTC (rev 9454) @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.11) +cmake_minimum_required(VERSION 3.13) set(PACKAGE_NAME "cygtool_dll") @@ -10,6 +10,15 @@ cygtool.def ) +if(MINGW) + # libgcc_s_dw2-1.dll に依存しないため + target_link_options( + ${PACKAGE_NAME} + PRIVATE + -static-libgcc + ) +endif() + if(SUPPORT_OLD_WINDOWS) if(MSVC) target_sources( Modified: trunk/installer/cygtool/build_cygtool.cmake =================================================================== --- trunk/installer/cygtool/build_cygtool.cmake 2021-09-24 16:47:02 UTC (rev 9453) +++ trunk/installer/cygtool/build_cygtool.cmake 2021-09-24 16:47:12 UTC (rev 9454) @@ -13,6 +13,10 @@ (${CMAKE_GENERATOR} MATCHES "Visual Studio 17 2022")) # 32bit build for inno setup set(GENERATE_OPTION "-A;Win32") +elseif(${CMAKE_COMMAND} MATCHES "msys64/mingw64/bin") + message("switch msys 32bit env") + set(ENV{PATH} "c:\\msys64\\mingw32\\bin;c:\\msys64\\usr\\bin") + set(CMAKE_COMMAND "C:/msys64/mingw32/bin/cmake.exe") endif() message("CMAKE_GENERATOR=${CMAKE_GENERATOR}")