Please merge topic/johanna/openssl-fixes of cmake

Description

Please merge topic/johanna/openssl-fixes of bro and cmake

On OS-X, --with-openssl failed to override the OpenSSL installation in
macports/homebrew. The reason for this is that CMAKE_PREFIX_PATH, which
is set on OS-X, has a higher priority than the hint that is passed to
find_*.

The only working solution that I found is to unset CMAKE_PREFIX_PATH for
find_package in case the package root dir is explicitly set.

This patch also aborts configure if OpenSSL 1.1 is found - which we do
not compile with yet. And it rewrites the old OpenSSL version test to
just use the determined version.

Also:

Change ordering of include directories.

It turns out that --with-openssl does not currently work because even
when the correct library is chosen, the include path ordering will
(typically) cause the system OpenSSL to be included.

Push OpenSSL header directory as the highest priority one. This probably
also makes sense since OpenSSL is/will be one of the most common
libraries that needs specific include directories.

Environment

None

Assignee

Jon Siwek

Reporter

Johanna Amann

Labels

None

External issue ID

None

Components

Fix versions

Priority

Normal
Configure