CmLibArchive in CMake 3.7.1+ does not support LibreSSL
Commit 7d433206 added support for new API style introduced in OpenSSL 1.1.0 and provided fallback methods for earlier versions. However, LibreSSL 2.x (which once forked from OpenSSL) not only lacks those methods, but also identifies itself as OpenSSL 2.x, thus preventing fallback methods from being used and resulting in linker failure.
It is easy to add support for LibreSSL by expanding the folloging line:
31c31
< #if OPENSSL_VERSION_NUMBER < 0x10100000L
---
> #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
I only had to apply this patch to archive_openssl_hmac_private.h to complete the build, but archive_openssl_evp_private.h appears to include similar piece of code.