From: Dmitry Belyavskiy Date: Thu, 23 Nov 2017 19:18:42 +0000 (+0300) Subject: Visual Studio HOWTO X-Git-Tag: v3.0.0~425 X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=openssl-gost%2Fengine.git;a=commitdiff_plain;h=46a7d9707a3fcebf54887348c8ce2659e59aafca Visual Studio HOWTO --- diff --git a/INSTALL.md b/INSTALL.md index 007d9e1..85b4c30 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -26,6 +26,8 @@ shared libraries of the desirable OpenSSL instance $ cmake -DCMAKE_C_FLAGS='-I/PATH/TO/OPENSSL/include -L/PATH/TO/OPENSSL/lib' .. +If you use Visual Studio, see READMEWIN.txt for details. + How to Install -------------- @@ -119,4 +121,4 @@ Value of this parameter can be either short name, defined in OpenSSL `obj_dat.h` header file or numeric representation of OID, defined in [RFC 4357][1]. -[1]:https://tools.ietf.org/html/rfc4357 "RFC 4357" \ No newline at end of file +[1]:https://tools.ietf.org/html/rfc4357 "RFC 4357" diff --git a/READMEWIN.txt b/READMEWIN.txt new file mode 100644 index 0000000..c2023d7 --- /dev/null +++ b/READMEWIN.txt @@ -0,0 +1,43 @@ +It can be build via Visual Studio. + +1. Clone repository +C: +cd /projects/openssl/out32 +git clone git@github.com:gost-engine/engine.git + +2. Add to CMakeLists.txt references to OpenSSL + + include_directories("C:/projects/openssl/out32/openssl-x86-shared-release-vs2015/include") + +link_libraries("C:/projects/openssl/out32/openssl-x86-shared-release-vs2015/lib/libcrypto.lib", "C:/projects/openssl/out32/openssl-x86-shared-release-vs2015/lib/libssl.lib") + +3. At CMakeLists.txt replace rows + +add_library(gost STATIC ${GOST_LIB_SOURCE_FILES}) +set_target_properties(gost PROPERTIES POSITION_INDEPENDENT_CODE ON) +target_link_libraries(gost_engine gost) +target_link_libraries(gost12sum gost) +target_link_libraries(gostsum gost) + +with + +add_library(libgost STATIC ${GOST_LIB_SOURCE_FILES}) +set_target_properties(libgost PROPERTIES POSITION_INDEPENDENT_CODE ON) +target_link_libraries(gost_engine libgost) +target_link_libraries(gost12sum libgost) +target_link_libraries(gostsum libgost) + +4. Generate project for Visual Studio 14 (2015) + +cd /projects/openssl/tmp32 +mkdir engine +cd engine +cmake -G "Visual Studio 14" --build /projects/openssl/out32/engine +In gost_engine.vcxproj replace +;,.lib; to ; + +5. Open solution ccgost.sln into Visual Studio, select configuration Release and build solution. + +6. Use C:\projects\openssl\out32\engine\bin\Release\gost.dll + +