cmake-templates icon indicating copy to clipboard operation
cmake-templates copied to clipboard

HOWTO: Integrate Boost Library to Your Own Project

Open district10 opened this issue 9 years ago • 1 comments

Boost is great, for it's powerful. Boost is bad, for it's way to BIG!

You can't expect other people to configure this gaint library just for compiling your code. Here is a solution: bcp.

BCP - 1.61.0

The bcp utility is a tool for extracting subsets of Boost, it's useful for Boost authors who want to distribute their library separately from Boost, and for Boost users who want to distribute a subset of Boost with their application.

bcp can also report on which parts of Boost your code is dependent on, and what licences are used by those dependencies.

Here is my fork of bcp to demonstrate how to extract code from Boost and make a static compilation againt your own MiniBoost: district10/bcp at standalone.

Another example is my fork of @satoren's kaguya: 4ker/kaguya at standalone. Kaguya is a lua C++ binding, depends on C++11 compatible compiler or Boost library. I made this standalone Kaguya pack, so this lua binding can work on Windows with VS2010 without configuring Boost. (Though I've already got one.)

This two examples are extremely friendly, you can git clone it, cmake, build without hurdle. (If you come to any problems, please tell me. :smile:)

district10 avatar May 15 '16 13:05 district10