[cmake-developers] FindOpenSSL: Link libraries needed for static OpenSSL.

Brad King brad.king at kitware.com
Wed Aug 17 08:53:54 EDT 2016


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.

Thanks,
-Brad



More information about the cmake-developers mailing list