Hello
I have had great success with building dependencies for libraries like this using vcpkg from Microsoft - it integrates with CMake (but needs to be version 3.20 or so) but does all the heavy lifting when it comes to building OpenSSL etc on Windows, Linux and Mac.
It really simplified the building for my project asynchronous system exec library if you wanted to get a preview
Cheers
John