From a4c396d111950be2a09995ddbdc5e4ab6cff4673 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 9 Sep 2018 15:20:01 +0800 Subject: [PATCH] cmake: support multi-arch lib directory used along with BOOST_ROOT by default, debian packaging creates ${prefix}/lib/x86_64-linux-gnu for multi-arch support. but FindBoost.cmake does not check in such a directory if $BOOST_ROOT is set. in this change, this directory is added to the search path. Signed-off-by: Kefu Chai --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8142f17d5a19f..c1314ee712fb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -629,6 +629,9 @@ if(WITH_SYSTEM_BOOST) else() set(Boost_USE_STATIC_LIBS ON) endif() + if(BOOST_ROOT AND CMAKE_LIBRARY_ARCHITECTURE) + set(BOOST_LIBRARYDIR "${BOOST_ROOT}/lib/${CMAKE_LIBRARY_ARCHITECTURE}") + endif() find_package(Boost 1.67 COMPONENTS ${BOOST_COMPONENTS} REQUIRED) else() set(BOOST_J 1 CACHE STRING -- 2.39.5