ClausKlein / boost-cmake

Easy Boost integration in CMake projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Result-variables aren't set as per the `FindBoost` module?

CraigHutchinson opened this issue · comments

I can't drop in boost-cmake in place of an existing project that uses Legacy-cmake variables such as Boost_INCLUDE_DIRS. May be a separate build issue but I couldn't see these defined here somehow?

The list of expected one are documented on the FindBoost module:
https://cmake.org/cmake/help/latest/module/FindBoost.html#result-variables

A far from complete solution but I have managed a workaround in the client code:

# Support pre Cmake 3.x Target based dependency mode
 set(Boost_BOOST_LIBRARY Boost::boost)
 set(Boost_PYTHON_LIBRARY Boost::python)
 set(Boost_INCLUDE_DIRS $<TARGET_PROPERTY:Boost::headers,INTERFACE_INCLUDE_DIRECTORIES>)