Revision: 8074 https://osdn.net/projects/ttssh2/scm/svn/commits/8074 Author: zmatsuo Date: 2019-09-06 22:03:14 +0900 (Fri, 06 Sep 2019) Log Message: ----------- cmake ビルドで SFMTバージョンヘッダを入れるようにした - SFMT*/include/SFMT_version_for_teraterm.h を追加 - r8059 Revision Links: -------------- https://osdn.net/projects/ttssh2/scm/svn/commits/8059 Modified Paths: -------------- trunk/libs/SFMT.cmake trunk/teraterm/teraterm/CMakeLists.txt -------------- next part -------------- Modified: trunk/libs/SFMT.cmake =================================================================== --- trunk/libs/SFMT.cmake 2019-09-06 13:03:03 UTC (rev 8073) +++ trunk/libs/SFMT.cmake 2019-09-06 13:03:14 UTC (rev 8074) @@ -1,4 +1,5 @@ -# cmake -DCMAKE_GENERATOR="Visual Studio 16 2019" -DARCHITECTURE=Win32 -P oniguruma.cmake +# cmake -DCMAKE_GENERATOR="Visual Studio 16 2019" -DARCHITECTURE=Win32 -P SFMT.cmake +# cmake -DCMAKE_GENERATOR="Visual Studio 16 2019" -DARCHITECTURE=x64 -P SFMT.cmake # cmake -DCMAKE_GENERATOR="Visual Studio 15 2017" -P SFMT.cmake # cmake -DCMAKE_GENERATOR="Visual Studio 15 2017" -DCMAKE_CONFIGURATION_TYPE=Release -P SFMT.cmake @@ -56,6 +57,7 @@ include(script_support.cmake) +set(SFMT_VERSION "1.5.1") set(SRC_DIR_BASE "SFMT-src-1.5.1") set(SRC_ARC "SFMT-1.5.1.zip") set(SRC_URL "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/SFMT-src-1.5.1.zip") @@ -88,11 +90,21 @@ COMMAND ${CMAKE_COMMAND} -E tar "xvf" ${DOWN_DIR}/${SRC_ARC} WORKING_DIRECTORY ${EXTRACT_DIR} ) - endif() ######################################## +if(NOT EXISTS ${SRC_DIR}/SFMT_version_for_teraterm.h) + file(WRITE "${SRC_DIR}/SFMT_version_for_teraterm.h" + "// created by cmake\n" + "#pragma once\n" + "#ifndef SFMT_VERSION_H\n" + "#define SFMT_VERSION_H\n" + "#define SFMT_VERSION \"${SFMT_VERSION}\"\n" + "#endif" + ) + +endif() if(NOT EXISTS ${SRC_DIR}/CMakeLists.txt) file(WRITE "${SRC_DIR}/CMakeLists.txt" "cmake_minimum_required(VERSION 2.4.4)\n" @@ -112,7 +124,9 @@ " ARCHIVE DESTINATION \${CMAKE_INSTALL_PREFIX}/lib\n" " )\n" "install(\n" - " FILES SFMT.h SFMT-params.h SFMT-params19937.h\n" + " FILES\n" + " SFMT.h SFMT-params.h SFMT-params19937.h\n" + " SFMT_version_for_teraterm.h\n" " DESTINATION \${CMAKE_INSTALL_PREFIX}/include\n" " )\n" ) Modified: trunk/teraterm/teraterm/CMakeLists.txt =================================================================== --- trunk/teraterm/teraterm/CMakeLists.txt 2019-09-06 13:03:03 UTC (rev 8073) +++ trunk/teraterm/teraterm/CMakeLists.txt 2019-09-06 13:03:14 UTC (rev 8074) @@ -171,6 +171,7 @@ ../ttpdlg ${ONIGURUMA_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/../ttpdlg # for svnversion.h + ${SFMT_INCLUDE_DIRS} ) if(MINGW)