How to link against Boost
OzymandiasTheGreat opened this issue · 1 comments
Hello.
I'm building a JSI module based on this template and I need to use Boost libraries in it.
I figured out how to include Boost headers based on react-native-vision-camera
CMakeLists.txt,
but I'm having trouble linking against Boost.
The recommended way to link Boost doesn't work for react-native and I can't figure out where Boost binaries are stored.
Could you help me out here? And maybe include an example in the repo? Boost libraries make life easier in a lot of ways, so this could be useful for quite a few people going forward.
Figured this one out myself. React-native only uses Boost headers, which is fine, because Boost mostly consists of header-only libraries. However, to link to Boost's shared libraries, you need to download and build Boost yourself.
For Android, I made a small script to automate this process: gist
For iOS just include "boost-iosx"
pod in your podspec.