Link the static versions of the Boost libraries using CMake

In your CMakeLists.txt file:

set(Boost_USE_STATIC_LIBS   ON)
find_package(Boost REQUIRED ...)

Where I have ..., you optionally put the names of the libraries you want to use, and then target_link_libraries(targetname ${Boost_LIBRARIES}) later below. If you have a fairly recent distribution of CMake, it should work exactly as advertised. I do it exactly this way in my own projects.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)