authenticvision / libpaseto

C implementation of Platform-Agnostic Security Tokens (PASETO)
https://paseto.io
BSD 3-Clause "New" or "Revised" License
22 stars 2 forks source link

C++ and MacOS build #5

Closed draft6 closed 5 years ago

draft6 commented 5 years ago

Add C++ specific header, fix build on MacOS with homebrew-installed libsodium, add .gitignore

minus7 commented 5 years ago

Hi,

thanks for your patch. I just added C++ compatibility to master by removing the static keywords in the header altogether according to your patch. Having a second header file is not a good idea imo because both files would have to be kept in sync.

Regarding your change to the CMake config: hardcoding paths is not a good solution; you should be able to configure your system to also look in /usr/local/lib, or alternatively you could set CMAKE_LIBRARY_PATH when invoking cmake.

draft6 commented 5 years ago

Thanks for the fix. Agreed, this is a way better approach, didn't have enough time to actually think it through. Initially i just removed the statics from the function signatures as well.