matth-x / MicroOcppSimulator

GNU General Public License v3.0
98 stars 44 forks source link

Tweak to work with Homebrew OpenSSL on macOS. #9

Closed msqr closed 1 year ago

msqr commented 1 year ago

I had trouble building on macOS as the OpenSSL libraries were not found; I tweaked the CMake configuration to use its find_package(OpenSSL) support, which allowed me to build by setting the OPENSSL_ROOT_DIR and OPENSSL_LIBRARIES properties, like this:

cmake -S . -B ./build -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -DOPENSSL_LIBRARIES=/usr/local/opt/openssl@1.1/lib

I hope this change works OK more generally.

matth-x commented 1 year ago

Hi @msqr, thanks for this contribution! I also think that using the find_package directive is the more idiomatic way of building projects with OpenSSL. After checking this with Ubuntu and the other platforms I will merge your PR (it's time for a CI/CD pipeline, really).

msqr commented 1 year ago

Excellent, thanks for all the work put into this project!

matth-x commented 1 year ago

@msqr The changes work well, thank you again for the contribution!