adobkin / libcapn

A simple C Library for interact with the Apple Push Notification Service (APNs)
MIT License
100 stars 37 forks source link

Build library for MacOS #43

Open YummyTastyCode opened 5 years ago

YummyTastyCode commented 5 years ago

This is very strange but there is no correct build system for this library. I write my guide to build the library.

First of all, install OpenSSL brew install openssl

Then, create soft links using this commands:

ln -s /usr/local/Cellar/openssl/1.0.2o_1/include/openssl /usr/local/include/openssl
ln -s /usr/local/Cellar/openssl/1.0.2o_1/lib /usr/local/lib/openssl

where 1.0.2o_1 is a current version of the OpenSSL library.

To correct installation use -DCMAKE_INSTALL_PREFIX with local subfolder:

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ../

To use it it might be useful too as an external lib:

ln /usr/local/lib/capn/libcapn.dylib /usr/local/lib/libcapn.dylib