[Ttssh2-commit] [7236] opensslがコンパイルできなくなっていたので修正

アーカイブの一覧に戻る

scmno****@osdn***** scmno****@osdn*****
2018年 9月 10日 (月) 00:52:24 JST


Revision: 7236
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7236
Author:   zmatsuo
Date:     2018-09-10 00:52:24 +0900 (Mon, 10 Sep 2018)
Log Message:
-----------
opensslがコンパイルできなくなっていたので修正

- x64でのコンパイルも考慮

Modified Paths:
--------------
    branches/cmake/libs/SFMT.cmake
    branches/cmake/libs/buildall_cmake.bat
    branches/cmake/libs/lib_SFMT.cmake
    branches/cmake/libs/lib_oniguruma.cmake
    branches/cmake/libs/lib_openssl.cmake
    branches/cmake/libs/lib_zlib.cmake
    branches/cmake/libs/oniguruma.cmake
    branches/cmake/libs/openssl.cmake
    branches/cmake/libs/zlib.cmake

-------------- next part --------------
Modified: branches/cmake/libs/SFMT.cmake
===================================================================
--- branches/cmake/libs/SFMT.cmake	2018-09-07 18:51:43 UTC (rev 7235)
+++ branches/cmake/libs/SFMT.cmake	2018-09-09 15:52:24 UTC (rev 7236)
@@ -58,6 +58,10 @@
 set(SRC_DIR "${CMAKE_SOURCE_DIR}/build/SFMT/src/${SRC_DIR_BASE}")
 set(BUILD_DIR "${CMAKE_SOURCE_DIR}/build/SFMT/build_${TOOLSET}")
 set(INSTALL_DIR "${CMAKE_SOURCE_DIR}/SFMT_${TOOLSET}")
+if("${CMAKE_GENERATOR}" MATCHES "Win64")
+  set(BUILD_DIR "${BUILD_DIR}_x64")
+  set(INSTALL_DIR "${INSTALL_DIR}_x64")
+endif()
 
 ########################################
 

Modified: branches/cmake/libs/buildall_cmake.bat
===================================================================
--- branches/cmake/libs/buildall_cmake.bat	2018-09-07 18:51:43 UTC (rev 7235)
+++ branches/cmake/libs/buildall_cmake.bat	2018-09-09 15:52:24 UTC (rev 7236)
@@ -7,7 +7,8 @@
 :retry_cmake
 set CMAKE=%~dp0cmake-3.11.4-win32-x86\bin\cmake.exe
 echo 1. \x8E\xA9\x95\xAA\x82\xCCcmake.exe\x82\xF0\x8Eg\x97p\x82\xB7\x82\xE9(PATH\x82\xF0\x92ʂ\xB5\x82Ă\xA0\x82\xE9)
-echo 2. cmake\x82\xF0\x83_\x83E\x83\x93\x83\x8D\x81[\x83h\x82\xB7\x82\xE9(\x82\xB1\x82̃t\x83H\x83\x8B\x83_\x82ɃC\x83\x93\x83X\x83g\x81[\x83\x8B\x82\xB7\x82\xE9)
+echo 2. VS2005\x82ł\xE0\x8Eg\x97p\x82ł\xAB\x82\xE9cmake\x8Eg\x97p\x82\xB7\x82\xE9
+echo    (\x95K\x97v\x82Ȃ玩\x93\xAE\x82Ń_\x83E\x83\x93\x83\x8D\x81[\x83h\x82\xB5\x82āA\x82\xB1\x82̃t\x83H\x83\x8B\x83_\x82ɃC\x83\x93\x83X\x83g\x81[\x83\x8B\x82\xB5\x82܂\xB7)
 if exist %CMAKE% echo    \x83C\x83\x93\x83X\x83g\x81[\x83\x8B\x8Dς\xDD(%CMAKE%)
 
 set /p no="select no "

Modified: branches/cmake/libs/lib_SFMT.cmake
===================================================================
--- branches/cmake/libs/lib_SFMT.cmake	2018-09-07 18:51:43 UTC (rev 7235)
+++ branches/cmake/libs/lib_SFMT.cmake	2018-09-09 15:52:24 UTC (rev 7236)
@@ -1,10 +1,15 @@
 
 include(${CMAKE_CURRENT_LIST_DIR}/script_support.cmake)
 
+set(SFMT_ROOT ${CMAKE_CURRENT_LIST_DIR}/SFMT_${TOOLSET})
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set(SFMT_ROOT "${SFMT_ROOT}_x64")
+endif()
+
 set(SFMT_INCLUDE_DIRS
-  "${CMAKE_CURRENT_LIST_DIR}/SFMT_${TOOLSET}/include"
+  "${SFMT_ROOT}/include"
   )
 
 set(SFMT_LIBRARY_DIRS
-  "${CMAKE_CURRENT_LIST_DIR}/SFMT_${TOOLSET}/lib"
+  "${SFMT_ROOT}/lib"
   )

Modified: branches/cmake/libs/lib_oniguruma.cmake
===================================================================
--- branches/cmake/libs/lib_oniguruma.cmake	2018-09-07 18:51:43 UTC (rev 7235)
+++ branches/cmake/libs/lib_oniguruma.cmake	2018-09-09 15:52:24 UTC (rev 7236)
@@ -1,5 +1,13 @@
 
 include(${CMAKE_CURRENT_LIST_DIR}/script_support.cmake)
 
-set(ONIGURUMA_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/oniguruma_${TOOLSET}/include)
-set(ONIGURUMA_LIBRARY_DIRS ${CMAKE_CURRENT_LIST_DIR}/oniguruma_${TOOLSET}/lib)
+set(ONIGURUMA_ROOT ${CMAKE_CURRENT_LIST_DIR}/oniguruma_${TOOLSET})
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set(ONIGURUMA_ROOT "${ONIGURUMA_ROOT}_x64")
+endif()
+
+set(ONIGURUMA_DIR "${ONIGURUMA_ROOT}/lib/cmake/oniguruma")
+find_package(ONIGURUMA REQUIRED)
+set(ONIGURUMA_INCLUDE_DIRS ${ONIGURUMA_ROOT}/include)
+set(ONIGURUMA_LIBRARY_DIRS ${ONIGURUMA_ROOT}/lib)
+

Modified: branches/cmake/libs/lib_openssl.cmake
===================================================================
--- branches/cmake/libs/lib_openssl.cmake	2018-09-07 18:51:43 UTC (rev 7235)
+++ branches/cmake/libs/lib_openssl.cmake	2018-09-09 15:52:24 UTC (rev 7236)
@@ -12,14 +12,19 @@
 
 else()
 
+  set(OPENSSL_ROOT ${CMAKE_CURRENT_LIST_DIR}/openssl_${TOOLSET})
+  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+	set(OPENSSL_ROOT "${OPENSSL_ROOT}_x64")
+  endif()
+
   set(OPENSSL_INCLUDE_DIRS
-	"$<$<CONFIG:Debug>:${CMAKE_CURRENT_LIST_DIR}/openssl_${TOOLSET}_debug/include>"
-	"$<$<CONFIG:Release>:${CMAKE_CURRENT_LIST_DIR}/openssl_${TOOLSET}/include>"
+	"$<$<CONFIG:Debug>:${OPENSSL_ROOT}_debug/include>"
+	"$<$<CONFIG:Release>:${OPENSSL_ROOT}/include>"
 	)
 
   set(OPENSSL_LIB
-	debug ${CMAKE_CURRENT_LIST_DIR}/openssl_${TOOLSET}_debug/lib/libeay32.lib
-	optimized ${CMAKE_CURRENT_LIST_DIR}/openssl_${TOOLSET}/lib/libeay32.lib
+	debug ${OPENSSL_ROOT}_debug/lib/libeay32.lib
+	optimized ${OPENSSL_ROOT}/lib/libeay32.lib
 	)
 
 endif()

Modified: branches/cmake/libs/lib_zlib.cmake
===================================================================
--- branches/cmake/libs/lib_zlib.cmake	2018-09-07 18:51:43 UTC (rev 7235)
+++ branches/cmake/libs/lib_zlib.cmake	2018-09-09 15:52:24 UTC (rev 7236)
@@ -1,5 +1,10 @@
 
 include(${CMAKE_CURRENT_LIST_DIR}/script_support.cmake)
 
-set(ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/zlib_${TOOLSET}/include)
-set(ZLIB_LIBRARY_DIRS ${CMAKE_CURRENT_LIST_DIR}/zlib_${TOOLSET}/lib)
+set(ZLIB_ROOT ${CMAKE_CURRENT_LIST_DIR}/zlib_${TOOLSET})
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set(ZLIB_ROOT "${ZLIB_ROOT}_x64")
+endif()
+
+set(ZLIB_INCLUDE_DIRS ${ZLIB_ROOT}/include)
+set(ZLIB_LIBRARY_DIRS ${ZLIB_ROOT}/lib)

Modified: branches/cmake/libs/oniguruma.cmake
===================================================================
--- branches/cmake/libs/oniguruma.cmake	2018-09-07 18:51:43 UTC (rev 7235)
+++ branches/cmake/libs/oniguruma.cmake	2018-09-09 15:52:24 UTC (rev 7236)
@@ -58,6 +58,10 @@
 set(SRC_DIR "${CMAKE_SOURCE_DIR}/build/oniguruma/src/${SRC_DIR_BASE}")
 set(BUILD_DIR "${CMAKE_SOURCE_DIR}/build/oniguruma/build_${TOOLSET}")
 set(INSTALL_DIR "${CMAKE_SOURCE_DIR}/oniguruma_${TOOLSET}")
+if("${CMAKE_GENERATOR}" MATCHES "Win64")
+  set(BUILD_DIR "${BUILD_DIR}_x64")
+  set(INSTALL_DIR "${INSTALL_DIR}_x64")
+endif()
 
 ########################################
 

Modified: branches/cmake/libs/openssl.cmake
===================================================================
--- branches/cmake/libs/openssl.cmake	2018-09-07 18:51:43 UTC (rev 7235)
+++ branches/cmake/libs/openssl.cmake	2018-09-09 15:52:24 UTC (rev 7236)
@@ -56,14 +56,16 @@
 set(DOWN_DIR "${CMAKE_SOURCE_DIR}/download/openssl")
 
 set(EXTRACT_DIR "${CMAKE_SOURCE_DIR}/build/openssl/src_${TOOLSET}")
-set(SRC_DIR "${EXTRACT_DIR}/${SRC_DIR_BASE}")
 set(INSTALL_DIR "${CMAKE_SOURCE_DIR}/openssl_${TOOLSET}")
-
+if(${CMAKE_GENERATOR} MATCHES "Win64")
+  set(EXTRACT_DIR "${EXTRACT_DIR}_x64")
+  set(INSTALL_DIR "${INSTALL_DIR}_x64")
+endif()
 if((${CMAKE_GENERATOR} MATCHES "Visual Studio") AND ("${CMAKE_CONFIGURATION_TYPE}" STREQUAL "Debug"))
   set(EXTRACT_DIR "${EXTRACT_DIR}_debug")
-  set(SRC_DIR "${EXTRACT_DIR}/${SRC_DIR_BASE}")
   set(INSTALL_DIR "${INSTALL_DIR}_debug")
 endif()
+set(SRC_DIR "${EXTRACT_DIR}/${SRC_DIR_BASE}")
 
 ########################################
 
@@ -110,7 +112,7 @@
   if(${CMAKE_GENERATOR} MATCHES "NMake Makefiles")
   elseif(${CMAKE_GENERATOR} MATCHES "Visual Studio 15 2017")
 	find_program(
-	  VCVARS32 vcvars32.bat
+	  VCVARS32 vcvarsall.bat
 	  HINTS "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build"
 	  HINTS "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Auxiliary/Build"
 	  HINTS "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Auxiliary/Build"
@@ -152,28 +154,34 @@
 	message(FATAL_ERROR "vcvars32.bat not found")
   endif()
 
+  if(${CMAKE_GENERATOR} MATCHES "Win64")
+	set(CONFIG_TARGET "VC-WIN64A")
+	set(DO_MS "ms\\do_win64a.bat")
+  else()
+	set(CONFIG_TARGET "VC-WIN32")
+	set(DO_MS "ms\\do_ms.bat")
+  endif()
   if(("${CMAKE_BUILD_TYPE}" STREQUAL "Release") OR ("${CMAKE_CONFIGURATION_TYPE}" STREQUAL "Release"))
-	set(CONFIG_TARGET "VC-WIN32")
   else()
-	set(CONFIG_TARGET "debug-VC-WIN32")
+	set(CONFIG_TARGET "debug-${CONFIG_TARGET}")
   endif()
 
   file(WRITE "${SRC_DIR}/build_cmake.bat"
 	"cd %~dp0\n"
+	"setlocal\n"
 	)
   file(TO_NATIVE_PATH ${PERL} PERL_N)
   file(TO_NATIVE_PATH ${INSTALL_DIR} INSTALL_DIR_N)
+  file(TO_NATIVE_PATH ${VCVARS32} VCVARS32_N)
   string(REGEX REPLACE [[^(.*)\\.*$]] [[\1]] PERL_N_PATH ${PERL_N})
   file(APPEND "${SRC_DIR}/build_cmake.bat"
 	"del crypto\\buildinf.h\n"
+	"setlocal\n"
 	"set PATH=${PERL_N_PATH}\n"
+	"perl Configure no-asm ${CONFIG_TARGET} --prefix=${INSTALL_DIR_N}\n"
+	"call ${DO_MS}\n"
+	"endlocal\n"
 	)
-  if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
-	file(TO_NATIVE_PATH ${VCVARS32} VCVARS32_N)
-	file(APPEND "${SRC_DIR}/build_cmake.bat"
-	  "call \"${VCVARS32_N}\"\n"
-	  )
-  endif()
   if(${CMAKE_GENERATOR} MATCHES "Visual Studio 8 2005")
 	## Visual Studio 2005 特別処理
 	# include,libパスの設定
@@ -183,9 +191,20 @@
 	  "set LIB=%SDK%\\lib;%LIB%\n"
 	  )
   endif()
+  if(${CMAKE_GENERATOR} MATCHES "Visual Studio 15 2017 Win64")
+	file(APPEND "${SRC_DIR}/build_cmake.bat"
+	  "call \"${VCVARS32_N}\" x86_amd64 10.0.17134.0\n"
+	  )
+  elseif(${CMAKE_GENERATOR} MATCHES "Visual Studio 15 2017")
+	file(APPEND "${SRC_DIR}/build_cmake.bat"
+	  "call \"${VCVARS32_N}\" x86 10.0.17134.0\n"
+	  )
+  elseif(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+	file(APPEND "${SRC_DIR}/build_cmake.bat"
+	  "call \"${VCVARS32_N}\"\n"
+	  )
+  endif()
   file(APPEND "${SRC_DIR}/build_cmake.bat"
-	"perl Configure no-asm ${CONFIG_TARGET} --prefix=${INSTALL_DIR_N}\n"
-	"call ms\\do_ms.bat\n"
 	"nmake -f ms\\nt.mak install ${NMAKE_OPTION}\n"
 	)
 

Modified: branches/cmake/libs/zlib.cmake
===================================================================
--- branches/cmake/libs/zlib.cmake	2018-09-07 18:51:43 UTC (rev 7235)
+++ branches/cmake/libs/zlib.cmake	2018-09-09 15:52:24 UTC (rev 7236)
@@ -58,6 +58,10 @@
 set(SRC_DIR "${CMAKE_SOURCE_DIR}/build/zlib/src/${SRC_DIR_BASE}")
 set(BUILD_DIR "${CMAKE_SOURCE_DIR}/build/zlib/build_${TOOLSET}")
 set(INSTALL_DIR "${CMAKE_SOURCE_DIR}/zlib_${TOOLSET}")
+if("${CMAKE_GENERATOR}" MATCHES "Win64")
+  set(BUILD_DIR "${BUILD_DIR}_x64")
+  set(INSTALL_DIR "${INSTALL_DIR}_x64")
+endif()
 
 ########################################
 



Ttssh2-commit メーリングリストの案内
アーカイブの一覧に戻る