|
Boost Interest : |
Subject: Re: [Boost-cmake] RFC: exported targets
From: Brad King (brad.king_at_[hidden])
Date: 2009-10-29 16:30:28
Ingmar Vanhassel wrote:
>> Yes. This is a great cmake feature. Boost.CMake now uses this to
>> install a $PREFIX/lib/Boost.cmake file.
>
> Can we agree on $PREFIX/lib$LIB_SUFFIX/cmake/Boost.cmake please?
>
> Also, some users may want to install multiple versions of boost, so I'd
> shove $BOOST_VERSION in the filename too.
Eventually the idea (discussed elsewhere in this thread) is to have
a BoostConfig.cmake that knows where everything is located. It should
also load this file, or at least set a variable indicating its location.
Then a user can do
find_package(Boost 1.41 ...)
include_directories(${Boost_INCLUDE_DIRS}) # or whatever variable
add_executable(my_program main.cpp)
target_link_libraries(my_program boost_thread-mt-shared-debug)
Ideally no user project should ever see the Boost.cmake exported-targets
file, or need to know where it is. It should all be loaded through the
find_package(Boost) command. That way BoostConfig can be re-organized
later without breaking projects.
-Brad