|
Boost Interest : |
Subject: [Boost-cmake] About BoostConfig*.cmake
From: Mourad (boost-cmake_at_[hidden])
Date: 2012-01-05 09:10:38
Hi,
I hope this is the right place to send requests/"bug" reports about
boost-cmake project.
I'm using boost-cmake to build boost installers for Windows (using
cpack + NSIS). I noticed that recent versions of CMake can find boost
either in a "module" mode or a "config" mode. The problem I have is
about the config mode. In fact, in the generated BoostConfig*.cmake
files, the include/library dirs paths are hardcoded with the value of
CMAKE_INSTALL_PREFIX.
These hardcoded paths make the config mode of find_package(Boost...)
fail whenever Boost is installed (via my generated installer) to a
different folder than CMAKE_INSTALL_PREFIX used when building boost.
So, I suggest to avoid hardcoded paths, and prefer using relative
paths instead. Since Boost_DIR will be set to the location of
BoostConfig.cmake, we can retrieve the include/library dirs from
Boost_DIR.
Cheers,
Mourad