boost doesn't support DESTDIR or something like that, hence, we need --prefix=$DESTDIR/usr. However --prefix=$DESTDIR/usr adds $DESTDIR into its cmake config. This patch strips $DESTDIR out of cmake config --- a/tools/boost_install/boost-install.jam +++ b/tools/boost_install/boost-install.jam @@ -678,6 +678,16 @@ local rule path-native-fwd ( path ) return $(path) ; } +local rule path-strip-destdir ( path ) +{ + local parts = [ MATCH "^(/destdir(/[^/]+)?/boost-[0-9.]+)(/.*)" : $(path) ] ; + if $(parts) + { + path = $(parts[3]) ; + } + return $(path) ; +} + local rule get-dir ( name : dir ) { if [ path.is-rooted $(dir) ] @@ -756,6 +766,7 @@ rule generate-cmake-config- ( target : s if [ path.is-rooted $(cmakedir) ] { local cmakedir-native = [ path-native-fwd $(cmakedir) ] ; + cmakedir-native = [ path-strip-destdir $(cmakedir-native) ] ; print.text