-----Original Message----- From: Boost
On Behalf Of Peter Dimov via Boost Sent: Friday, September 14, 2018 6:25 PM To: boost@lists.boost.org Cc: Peter Dimov Subject: Re: [boost] [cmake] Pull request announcement mike wrote:
We are talking about 5-10 lines of cmake code + one line per dependency (the way I tend to format them).
I suggest you use my approach of including cmake/dependencies.cmake,
Frankly, I don't see the advantage to split such a trivial file: cmake_minimum_required(VERSION 3.5) project(boost-foo) add_library(boost_foo INTERFACE) add_library(Boost::foo alias boost_foo) target_include_directories(boost_foo INTERFACE include) target_link_libraries(boost_foo INTERFACE Boost::bar Boost::baz Boost::miaow ... ) That's it for a header only library (as I said, I won't deal with testing, installation etc) For a more complex file, I see the benefit of splitting it up
I (somewhat arbitrarily) chose to use boost::libname as imported target name, not sure if Boost:: is better.
Boost:: is what cmake is currently using when using find_package(Boost ...) Best Mike