[CMake] FindOpenSSL always uses system libs

Andreas Pakulat apaku at gmx.de
Wed Aug 14 14:58:01 EDT 2013


Hi,

On Wed, Aug 14, 2013 at 8:06 PM, Josef 'Jeff' Sipek
<jeffpc at josefsipek.net>wrote:

> If you have a (linux or solaris) system with openssl installed in /usr and
> a
> second copy installed elsewhere (e.g., /opt) and you want a cmake project
> to
> find the elsewhere version, no matter what you try it finds the system
> copy.
> (In other words, OPENSSL_ROOT_DIR has no effect.)  Are we missing
> something or
> is this a bug in FindOpenSSL?  We've tested cmake 2.8.5, 2.8.8, and 2.8.11
> without any luck.
>

Yes this is a bug in the module, on Windows it sets a variable called
_OPENSSL_HINTS_AND_PATHS, but on *nix it only sets _OPENSSL_HINTS based on
the OPENSSL_ROOT_DIR variable. The code further down that looks for headers
and libs only uses _OPENSSL_HINTS_AND_PATHS with the HINTS keyword and
nothing else in the file uses _OPENSSL_HINTS.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130814/dcc2f9ee/attachment.htm>


More information about the CMake mailing list