[cmake-developers] FindOpenSSL: Link libraries needed for static OpenSSL.
Rolf Eike Beer
eike at sf-mail.de
Wed Aug 17 10:04:19 EDT 2016
Am 2016-08-17 14:53, schrieb Brad King:
> On 08/16/2016 04:44 PM, Alexander Lamaison wrote:
>> I've attached a new patch without the changes to the singular-named
>> variables.
>
> Thanks.
>
>> + if(WIN32 AND NOT CYGWIN)
>> + set_target_properties(OpenSSL::Crypto PROPERTIES
>> + INTERFACE_LINK_LIBRARIES crypt32)
>> + else()
>> + set_target_properties(OpenSSL::Crypto PROPERTIES
>> + INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}")
>> + endif()
>
> The addition of crypt32/dl is done with this logic in several places.
> Instead please use a _OPENSSL_LIBRARY_DEPENDS variable to hold the
> value and then reference it in the other locations so that the
> conditions for setting it do not have to be duplicated.
Don't forget to unset() the variable at the end of the module.
Greetings,
Eike
--
More information about the cmake-developers
mailing list