FindOpenSSL() is missing link dependencies in OPENSSL_LIBRARIES for OpenSSL 1.1+ and Windows, breaking builds that use static linking.
OpenSSL appears to link against the Windows CryptoAPI (Crypt32.lib) and WinSock2 (ws2_32.lib) since version 1.1.
But FindOpenSSL() fails to find these dependencies, breaking CMake builds that statically link to OPENSSL_LIBRARIES on Windows.
For now, I have this workaround:
if(WIN32) target_link_libraries(myproject Crypt32 ws2_32) endif()
But it annoys me to have to have OS-specific patches like this.
I am using CMake 3.12