HomePhabricator

[cmake] Improve EVP_MD_CTX_new detection

Description

[cmake] Improve EVP_MD_CTX_new detection

Summary:
The CMAKE_REQUIRED_LIBRARIES accept imported targets, so use that instead
of the old way using variables.
This has the benefit of pulling all the transitive libraries as well
which fixes the detection with Openssl 1.1.1.

Test Plan:
With Openssl 1.1.1 in the depends:

cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake

Detection failed before the patch, and works after.

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D13864

Details

Provenance
FabienAuthored on May 5 2023, 12:23
FabienPushed on May 5 2023, 17:02
Reviewer
Restricted Project
Differential Revision
D13864: [cmake] Improve EVP_MD_CTX_new detection
Parents
rABCfc8b3ef1f5a3: [Cashtab] Broadcast alias registration txs per latest spec
Branches
Unknown
Tags
Unknown