2

It seems that most users will just use a pre build version of boost in combination with find_package.

I always download my 3rd party dependencies via git and integrate them in cmake. This was usually not a problem because all my libraries were either using cmake or were just header only libraries.

How would I integrate boost log into my cmake build system? Do I need to treat it as if I had written it myself and compile it manually by including every .h and .cpp files and build it as a shared library?

Or is there a more simple way, for example reusing the .jam file in cmake?

Maik Klein
  • 15,548
  • 27
  • 101
  • 197
  • 1
    Look at ExternalProject_Add https://cmake.org/cmake/help/v3.4/module/ExternalProject.html – drescherjm Dec 29 '15 at 23:44
  • Good question. I hate bjam, and if somebody was able to create a sane build system for boost, that would be fantastic. – SergeyA Dec 30 '15 at 00:08
  • Do the CMake ports still exist? I followed these a few years ago but once I got bjam working in my CMake generated build scripts I have not worried about it since it has not caused my much issue. Edit: Looks like these are several years old http://stackoverflow.com/questions/18354398/what-is-the-best-way-to-build-boost-with-cmake – drescherjm Dec 30 '15 at 00:14
  • 1
    From my last link this answer uses ExternalProject_add to download and build boost: http://stackoverflow.com/a/18357815/487892 – drescherjm Dec 30 '15 at 00:22

0 Answers0