[ttssh2-commit] [9875] cmake から inno setup compiler を直接呼び出すように修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2022年 4月 21日 (木) 22:40:25 JST


Revision: 9875
          https://osdn.net/projects/ttssh2/scm/svn/commits/9875
Author:   zmatsuo
Date:     2022-04-21 22:40:25 +0900 (Thu, 21 Apr 2022)
Log Message:
-----------
cmake から inno setup compiler を直接呼び出すように修正

- 修正前はbatファイル経由でisccを呼び出していた
- mingw用cmakeの特別仕様対策
  - add_custom_target(COMMAND)内で"/"を使うと"c:/msys64/mingw.."に置換されるようだ
  - isccが"-"オプションを受けい入れるので変更
- ttssh2がビルドされていないとき、インストーラーを生成しないようにした

Modified Paths:
--------------
    trunk/installer/CMakeLists.txt

Removed Paths:
-------------
    trunk/installer/exec_iscc.bat.in

-------------- next part --------------
Modified: trunk/installer/CMakeLists.txt
===================================================================
--- trunk/installer/CMakeLists.txt	2022-04-21 13:40:15 UTC (rev 9874)
+++ trunk/installer/CMakeLists.txt	2022-04-21 13:40:25 UTC (rev 9875)
@@ -283,9 +283,14 @@
   )
 message("ISCC=${ISCC}")
 
-if("${ISCC}" STREQUAL "ISCC-NOTFOUND")
+if(NOT TARGET ttssh)
   add_custom_target(
     inno_setup
+    COMMAND "${CMAKE_COMMAND}" -E echo "ttssh was not build"
+    )
+elseif("${ISCC}" STREQUAL "ISCC-NOTFOUND")
+  add_custom_target(
+    inno_setup
     COMMAND "${CMAKE_COMMAND}" -E echo "inno setup not found"
     )
 else()
@@ -295,31 +300,17 @@
     )
 
   if (RELEASE)
-    set(ISCC_OPTION "/DSETUP_RELEASE=1")
+    set(ISCC_OPTION "-DSETUP_RELEASE=1")
   endif()
   if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-    list(APPEND ISCC_OPTION "/DM_X64=1")
+    list(APPEND ISCC_OPTION "-DM_X64=1")
   endif()
-  if(NOT MINGW)
-    add_custom_target(
-      inno_setup
-      DEPENDS cygtool
-      COMMAND "${ISCC}" ${ISCC_OPTION} teraterm_cmake.iss
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BUILD_DIR}
-      )
-  else()
-    configure_file(
-      exec_iscc.bat.in
-      exec_iscc.bat
-      NEWLINE_STYLE CRLF
-      )
-    add_custom_target(
-      inno_setup
-      DEPENDS cygtool
-      COMMAND cmd /c exec_iscc.bat
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BUILD_DIR}
-      )
-  endif()
+  add_custom_target(
+    inno_setup
+    DEPENDS cygtool
+    COMMAND ${ISCC} ${ISCC_OPTION} teraterm_cmake.iss
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BUILD_DIR}
+    )
 endif()
 set_target_properties(
   inno_setup

Deleted: trunk/installer/exec_iscc.bat.in
===================================================================
--- trunk/installer/exec_iscc.bat.in	2022-04-21 13:40:15 UTC (rev 9874)
+++ trunk/installer/exec_iscc.bat.in	2022-04-21 13:40:25 UTC (rev 9875)
@@ -1 +0,0 @@
-"@ISCC@" @ISCC_OPTION@ teraterm_cmake.iss


ttssh2-commit メーリングリストの案内
Back to archive index