If you are wanting to link to Apple-provided OpenSSL libraries, you may want to rethink that strategy. Apple have the following text in their cryptographic services guide (emphasis mine):
Although OpenSSL is commonly used in the open source community, OpenSSL does not provide a stable API from version to version. For this reason, although OS X provides OpenSSL libraries, the OpenSSL libraries in OS X are deprecated, and OpenSSL has never been provided as part of iOS. Use of the OS X OpenSSL libraries by apps is strongly discouraged.
If your app depends on OpenSSL, you should compile OpenSSL yourself and statically link a known version of OpenSSL into your app. This use of OpenSSL is possible on both OS X and iOS. However, unless you are trying to maintain source compatibility with an existing open source project, you should generally use a different API.
Also see answers here and here. So for iOS at least, you will have to build your own OpenSSL anyway. One could argue that you probably want to do that for your Android builds too for consistency and for similar reasons as those in the extract above from Apple.
As @Tsyvarev said in his comment on your question, use find_package()
with appropriate hints to point your build at the OpenSSL you want to use. Your question indicates you already use your own pre-built OpenSSL, so presumably you are in control of where it is located and using find_package() would be a nice platform independent way to handle the different library suffixes, etc. Recent versions of CMake will also give you import targets which will carry with them include path dependencies, so they will be easier for your code to use (just link to them and get the header search path for OpenSSL added for free). Have a read of the CMake docs for the FindOpenSSL module for extra details.