[CMake] CMakeFindDependencyMacro and components

Daniel S. Reichenbach daniel at kogitoapp.com
Thu Jul 23 11:24:53 EDT 2015


Hi,

> find_dependency(Boost COMPONENTS date_time filesystem system)
>
> Looking at the CMakeFindDependencyMacro code the COMPONENTS argument
> does not seem to be supported.
>
> Is there a workaround for this situation?
What about using e.g.

set(BOOST_ROOT $ENV{BOOST_ROOT})
find_package(Boost 1.54 REQUIRED COMPONENTS filesystem program_options 
regex system thread)

I'm using this in a few projects and it reliably detects Boost and the
components on Mac OS X, Linux and Windows.

WkR,
Daniel
-- 
[kogito](http://kogitoapp.com)  -  nerds available for awesome projects

kogito Anwendungsentwicklung                       brainz at kogitoapp.com
c/o Daniel S. Reichenbach                       phone: +49 221 27096773
Limburger Straße 19                            mobile: +49 160 96311159
50672 Köln, Germany


More information about the CMake mailing list