Re: git: f89fd0980a5c - main - databases/mysql57-client: be ready for OpenSSL 3.0 in base
Date: Tue, 13 Jun 2023 06:28:17 UTC
13.06.2023 13:05, Gleb Popov wrote: > On Tue, Jun 13, 2023 at 8:16 AM Eugene Grosbein <eugen@freebsd.org> wrote: >> >> IF(OPENSSL_INCLUDE_DIR) >> ++ FOREACH(version_part >> ++ OPENSSL_VERSION_MAJOR >> ++ OPENSSL_VERSION_MINOR >> ++ OPENSSL_VERSION_PATCH >> ++ ) >> ++ FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" ${version_part} > > I don't quite see how it is supposed to work. The result of the > "file(STRINGS ...)" call overwrites your loop variable. > > Anyways, more canonical way to solve this is > https://cmake.org/cmake/help/latest/module/CheckSymbolExists.html That's not my code. I just got it from MySQL 8.0 distribution file and tested. And it works for both cases of OpenSSL 3.0 in base and OpenSSL 1.1.1 in base.