janbar / openssl-cmake

Build OpenSSL with CMake on MacOS, Win32, Win64 and cross compile for Android, IOS
Other
275 stars 142 forks source link

How can I get DLLs out of it? #25

Closed MichaelVoelkel closed 2 years ago

MichaelVoelkel commented 2 years ago

Hi,

I tried tons of things, as subdirectory etc.

But actually, I just need to create DLLs to ship with my executable and they cannot be found from a reliable source online.

And actually, I see that you use add_library with shared but I don't get DLL output only lib :/ Any idea?

MichaelVoelkel commented 2 years ago

Found an answer in another issue... Actually, way too stupid, I just need to run:

cmake -DBUILD_SHARED_LIBS=ON <CMakeLists-txt-dir>

I'm writing this here explicitly again because I will certainly encounter the same stupidity by myself in the future. Not sure why some googled pages say, build_shared_libs cannot be specific with -D, though sigh