[openssl/openssl] 2ac569: Clean up exporters, specifically those we have for...

Richard Levitte noreply at github.com
Wed Nov 15 07:26:06 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 2ac569a67b9d0980efa2d8061a6a61e0645f37a7
      https://github.com/openssl/openssl/commit/2ac569a67b9d0980efa2d8061a6a61e0645f37a7
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M .gitignore
    M Configurations/unix-Makefile.tmpl
    M build.info
    A exporters/build.info
    A exporters/pkg-config/libcrypto.pc.in
    A exporters/pkg-config/libssl.pc.in
    A exporters/pkg-config/openssl.pc.in
    A util/mkinstallvars.pl

  Log Message:
  -----------
  Clean up exporters, specifically those we have for pkg-config

The pkg-config exporters were a special hack, all in
Configurations/unix-Makefile.tmpl, and this was well and good as long
as that was the only main package interface configuration system that we
cared about.

Things have changed, though, so we move the pkg-config production to be
templatable in a more flexible manner.  Additional templates for other
interface configuration systems can then be added fairly easily.

Two variants of the .pc files are produced:

- Those in 'exporters/' are installed in the location that 'pkg-config'
  itself prefers for installed packages.
- Those in the top directory are to be used when it's desirable to build
  directly against an OpenSSL build tree.

Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20878)


  Commit: c768ccebc718ea0ed6afc5147fe4079fff632cd6
      https://github.com/openssl/openssl/commit/c768ccebc718ea0ed6afc5147fe4079fff632cd6
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M .gitignore
    M Configurations/unix-Makefile.tmpl
    M Configurations/windows-makefile.tmpl
    M build.info
    M exporters/build.info
    A exporters/cmake/OpenSSLConfig.cmake.in
    A exporters/cmake/OpenSSLConfigVersion.cmake.in
    M util/mkinstallvars.pl

  Log Message:
  -----------
  Add exporters for CMake

CMake's older package finder, FindOpenSSL.cmake, does a best guess effort
and doesn't always get it right.

By CMake's own documentation, that's what such modules are (best effort
attempts), and package producers are (strongly) encouraged to help out by
producing and installing <PackageName>Config.cmake files to get a more
deterministic configuration.

The resulting OpenSSLConfig.cmake tries to mimic the result from CMake's
FindOpenSSL.cmake, by using the same variable and imported target names.
It also adds a few extra variables of its own, such as:

    OPENSSL_MODULES_DIR     Indicates the default installation directory
                            for OpenSSL loadable modules, such as providers.
    OPENSSL_RUNTIME_DIR     Indicates the default runtime directory, where
                            for example the openssl program is located.
    OPENSSL_PROGRAM         Is the full directory-and-filename of the
                            openssl program.

The imported targets OpenSSL::Crypto and OpenSSL::SSL are as precisely
specified as possible, so for example, they are specified with the both the
import library and the DLL on Windows, which should make life easier on that
platform.

For the moment, one of the following must be done in your CMake project for
this CMake configuration to take priority over CMake's FindOpenSSL.cmake:

-   The variable CMAKE_FIND_PACKAGE_PREFER_CONFIG must be set to true prior
    to the 'find_package(OpenSSL)' call.
-   The 'find_package' call itself must use the "Full Signature".  If you
    don't know any better, simply add the 'CONFIG' option, i.e. from this
    example:

        find_package(OpenSSL 3.0 REQUIRED)

    to this:

        find_package(OpenSSL 3.0 REQUIRED CONFIG)

Just as with the 'pkg-config' exporters, two variants of the .cmake files
are produced:

- Those in 'exporters/' are installed in the location that 'pkg-config'
  itself prefers for installed packages.
- Those in the top directory are to be used when it's desirable to build
  directly against an OpenSSL build tree.

Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20878)


  Commit: 10264b534b366785bb560be77913fdbf9f0f4f8f
      https://github.com/openssl/openssl/commit/10264b534b366785bb560be77913fdbf9f0f4f8f
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M CHANGES.md
    M NEWS.md

  Log Message:
  -----------
  Document the exporter change in CHANGES.md and NEWS.md

Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20878)


Compare: https://github.com/openssl/openssl/compare/fe487609c17d...10264b534b36


More information about the openssl-commits mailing list