On Thu, Nov 3, 2016 at 7:14 PM, Alexander Lamaison <swish_at_lammy.co.uk>
wrote:
>
> On Thu, 3 Nov 2016, 16:09 Jeroen Wiert Pluimers, <jeroen.pluimers.com+
> libssh2.org_at_gmail.com> wrote:
>
>>
>> The slprobweb downloads contain static libs and are in fact recommended
>> at the top of the list https://wiki.openssl.org/index.php/Binaries
>>
>
> But when you built libssh2 for OpenSSL and passed
> OPENSSL_USE_STATIC_LIBS=ON to CMake, it still linked dynamically? If so
> that is either a bug in CMake's FindOpenSSL.cmake, or the static libs in
> slproweb are not for Visual Studio 2015.
>
Below are the lib files; the lib\VC\static ones are the ones I want to use.
I'll give it one more shot before the EKON conference and when it fails I
will either go the hunter way or help Bert with
https://github.com/Microsoft/vcpkg
CMake finds the libraries but doesn't tell which one it uses:
-- Found OpenSSL:
optimized;C:/OpenSSL-Win64/lib/ssleay32.lib;debug;C:/OpenSSL-Win64/lib/VC/static/ssleay32MTd.lib;optimized;C:/OpenSSL-Win64/lib/libeay32.lib;debug;C:/OpenSSL-Win64/lib/VC/static/libeay32MTd.lib
(found version "1.0.2j")
-- Found OpenSSL:
optimized;C:/OpenSSL-Win32/lib/ssleay32.lib;debug;C:/OpenSSL-Win32/lib/VC/static/ssleay32MTd.lib;optimized;C:/OpenSSL-Win32/lib/libeay32.lib;debug;C:/OpenSSL-Win32/lib/VC/static/libeay32MTd.lib
(found version "1.0.2j")
The odd thing is that CMake - despite specifying Release - seems to pick
the Debug static libraries (*MTd.lib)
cmake .. -G"Visual Studio 14 Win64" -D"BUILD_SHARED_LIBS=1"
-D"CMAKE_BUILD_TYPE=Release" -D"CRYPTO_BACKEND=OpenSSL"
-D"OPENSSL_USE_STATIC_LIBS=TRUE" -D"OPENSSL_MSVC_STATIC_RT=TRUE"
cmake .. -G"Visual Studio 14" -D"BUILD_SHARED_LIBS=1"
-D"CMAKE_BUILD_TYPE=Release" -D"CRYPTO_BACKEND=OpenSSL"
-D"OPENSSL_USE_STATIC_LIBS=TRUE" -D"OPENSSL_MSVC_STATIC_RT=TRUE"
The compiler output is so huge however that I have a tree/woods problem in
not knowing what else to look for.
In case someone knows, here is the build output:
https://gist.github.com/jpluimers/040c91af087b8afe4ce551e83279acc9
C:\OpenSSL-Win32\lib
C:\OpenSSL-Win32\lib\4758cca.lib
C:\OpenSSL-Win32\lib\aep.lib
C:\OpenSSL-Win32\lib\atalla.lib
C:\OpenSSL-Win32\lib\capi.lib
C:\OpenSSL-Win32\lib\chil.lib
C:\OpenSSL-Win32\lib\cswift.lib
C:\OpenSSL-Win32\lib\gmp.lib
C:\OpenSSL-Win32\lib\gost.lib
C:\OpenSSL-Win32\lib\libeay32.lib
C:\OpenSSL-Win32\lib\MinGW
C:\OpenSSL-Win32\lib\nuron.lib
C:\OpenSSL-Win32\lib\padlock.lib
C:\OpenSSL-Win32\lib\ssleay32.lib
C:\OpenSSL-Win32\lib\sureware.lib
C:\OpenSSL-Win32\lib\ubsec.lib
C:\OpenSSL-Win32\lib\VC
C:\OpenSSL-Win32\lib\MinGW\libeay32.a
C:\OpenSSL-Win32\lib\MinGW\libeay32.def
C:\OpenSSL-Win32\lib\MinGW\ssleay32.a
C:\OpenSSL-Win32\lib\MinGW\ssleay32.def
C:\OpenSSL-Win32\lib\VC\libeay32MD.lib
C:\OpenSSL-Win32\lib\VC\libeay32MDd.lib
C:\OpenSSL-Win32\lib\VC\libeay32MT.lib
C:\OpenSSL-Win32\lib\VC\libeay32MTd.lib
C:\OpenSSL-Win32\lib\VC\ssleay32MD.lib
C:\OpenSSL-Win32\lib\VC\ssleay32MDd.lib
C:\OpenSSL-Win32\lib\VC\ssleay32MT.lib
C:\OpenSSL-Win32\lib\VC\ssleay32MTd.lib
C:\OpenSSL-Win32\lib\VC\static
C:\OpenSSL-Win32\lib\VC\static\libeay32MD.lib
C:\OpenSSL-Win32\lib\VC\static\libeay32MDd.lib
C:\OpenSSL-Win32\lib\VC\static\libeay32MT.lib
C:\OpenSSL-Win32\lib\VC\static\libeay32MTd.lib
C:\OpenSSL-Win32\lib\VC\static\ssleay32MD.lib
C:\OpenSSL-Win32\lib\VC\static\ssleay32MDd.lib
C:\OpenSSL-Win32\lib\VC\static\ssleay32MT.lib
C:\OpenSSL-Win32\lib\VC\static\ssleay32MTd.lib
C:\OpenSSL-Win64\lib
C:\OpenSSL-Win64\lib\4758cca.lib
C:\OpenSSL-Win64\lib\aep.lib
C:\OpenSSL-Win64\lib\atalla.lib
C:\OpenSSL-Win64\lib\capi.lib
C:\OpenSSL-Win64\lib\chil.lib
C:\OpenSSL-Win64\lib\cswift.lib
C:\OpenSSL-Win64\lib\gmp.lib
C:\OpenSSL-Win64\lib\gost.lib
C:\OpenSSL-Win64\lib\libeay32.lib
C:\OpenSSL-Win64\lib\nuron.lib
C:\OpenSSL-Win64\lib\padlock.lib
C:\OpenSSL-Win64\lib\ssleay32.lib
C:\OpenSSL-Win64\lib\sureware.lib
C:\OpenSSL-Win64\lib\ubsec.lib
C:\OpenSSL-Win64\lib\VC
C:\OpenSSL-Win64\lib\VC\libeay32MD.lib
C:\OpenSSL-Win64\lib\VC\libeay32MDd.lib
C:\OpenSSL-Win64\lib\VC\libeay32MT.lib
C:\OpenSSL-Win64\lib\VC\libeay32MTd.lib
C:\OpenSSL-Win64\lib\VC\ssleay32MD.lib
C:\OpenSSL-Win64\lib\VC\ssleay32MDd.lib
C:\OpenSSL-Win64\lib\VC\ssleay32MT.lib
C:\OpenSSL-Win64\lib\VC\ssleay32MTd.lib
C:\OpenSSL-Win64\lib\VC\static
C:\OpenSSL-Win64\lib\VC\static\libeay32MD.lib
C:\OpenSSL-Win64\lib\VC\static\libeay32MDd.lib
C:\OpenSSL-Win64\lib\VC\static\libeay32MT.lib
C:\OpenSSL-Win64\lib\VC\static\libeay32MTd.lib
C:\OpenSSL-Win64\lib\VC\static\ssleay32MD.lib
C:\OpenSSL-Win64\lib\VC\static\ssleay32MDd.lib
C:\OpenSSL-Win64\lib\VC\static\ssleay32MT.lib
C:\OpenSSL-Win64\lib\VC\static\ssleay32MTd.lib
> Any steps on how to get started with hunter (not wanting to re-invent the
>> wheel again).
>>
>
> You just include the huntergate snippet in your root CMakeLists.txt and
> add a call to hunter_add_package for each package you use via find_package.
> Then run CMake. It will download and install everything. I.e add
> hunter_add_package(Libssh2).
>
I'm a total n00b at CMake. Is there a good introduction somewhere?
Regards,
--jeroen
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2016-11-04