QNX 7.0 by default ships with openssl 1.0.2 but allows to install openssl 1.1.1 in parallel, see this technical article:
- OpenSSL version 1.0.2: libcrypto.so.2 and libssl.so.2, headers under usr/include/openssl
- OpenSSL version 1.1.1: libcrypto1_1.so.2.1 and libssl1_1.so.2.1, header under usr/include/openssl1_1
I like to link against openssl 1.1.1 and try to find the library with
find_package(OpenSSL 1.1.1 EXACT), but unfortunately it does find the libraries for 1.0.2 and fails with the following error message (using cmake 3.19.3):
CMake Error at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR: Found unsuitable version "1.0.2r", but required is exact version "1.1.1" (found /opt/qnx700/target/qnx7/x86_64/usr/lib/libcrypto.so, )
I get the impression that the OpenSSL find module does not understand the “1_1” notion of QNX, always finds the default version 1.0.2 instead and fails while comparing the version string in the found header file.
What would be the best solution here?
I would rather avoid to provide a patched OpenSSL find module with the project.