[Ttssh2-commit] [8151] cmakeビルドで32bitビルド時のみimagehlp.dllを遅延リンクするようにした

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 9月 15日 (日) 01:23:48 JST


Revision: 8151
          https://osdn.net/projects/ttssh2/scm/svn/commits/8151
Author:   zmatsuo
Date:     2019-09-15 01:23:48 +0900 (Sun, 15 Sep 2019)
Log Message:
-----------
cmakeビルドで32bitビルド時のみimagehlp.dllを遅延リンクするようにした

- 64bit時はimagehlp.dllを使用するコードがない(無効かされる)
- リンク時に警告が出ていた

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

-------------- next part --------------
Modified: trunk/teraterm/teraterm/CMakeLists.txt
===================================================================
--- trunk/teraterm/teraterm/CMakeLists.txt	2019-09-14 14:39:45 UTC (rev 8150)
+++ trunk/teraterm/teraterm/CMakeLists.txt	2019-09-14 16:23:48 UTC (rev 8151)
@@ -142,7 +142,6 @@
   ${TTDLG_SRC}
   )
 
-
 link_directories(
   ${ONIGURUMA_LIBRARY_DIRS}
   ${SFMT_LIBRARY_DIRS}
@@ -149,7 +148,13 @@
   )
 
 if (MSVC)
-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:imagehlp.dll /DELAYLOAD:user32.dll /DELAYLOAD:shell32.dll")
+  set_source_files_properties(buffer.c PROPERTIES COMPILE_FLAGS /W4)
+
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:user32.dll /DELAYLOAD:shell32.dll")
+  if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+    # 32bit
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:imagehlp.dll")
+  endif()
 endif()
 
 add_executable(


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