diff options
author | Guillaume Papin <guillaume.papin@parrot.com> | 2014-10-23 07:10:54 (GMT) |
---|---|---|
committer | Chuck Atkins <chuck.atkins@kitware.com> | 2014-10-26 04:03:39 (GMT) |
commit | 43b8bfb213188b1017949b5c29f3071e455121e3 (patch) | |
tree | 65760aa275a921e5578e802c539605a5df505ace /Modules/FindBoost.cmake | |
parent | 97eb511672a8d5804f98942791c7bad9ac73e6df (diff) | |
download | CMake-43b8bfb213188b1017949b5c29f3071e455121e3.zip CMake-43b8bfb213188b1017949b5c29f3071e455121e3.tar.gz CMake-43b8bfb213188b1017949b5c29f3071e455121e3.tar.bz2 |
FindBoost: fix find_library call when using "re-rooting"
When using CMAKE_FIND_ROOT_PATH, FindBoost is able to find the first
component and cache the full path of the directory in Boost_LIBRARY_DIR
so that all components are looked for in same directory. The issue was
that, when looking for the other components, Boost_LIBRARY_DIR was
re-rooted against CMAKE_FIND_ROOT_PATH even though it was already a path
on the host. This change fixes this by disabling the re-rooting in the
find_library call when using Boost_LIBRARY_DIR as a hint.
See http://www.cmake.org/pipermail/cmake-developers/2014-October/011670.html
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r-- | Modules/FindBoost.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 3642b3e..aad6575 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -321,7 +321,7 @@ macro(_Boost_FIND_LIBRARY var) # If Boost_LIBRARY_DIR is known then search only there. if(Boost_LIBRARY_DIR) - set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH) + set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) endif() endmacro() @@ -855,7 +855,7 @@ if(_Boost_CHANGE_LIBDIR AND NOT _Boost_LIBRARY_DIR_CHANGED) endif() if(Boost_LIBRARY_DIR) - set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH) + set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) else() set(_boost_LIBRARY_SEARCH_DIRS "") if(BOOST_LIBRARYDIR) |