diff --git a/FindBoost.cmake b/FindBoost.cmake index 36341830c02b64f4d27200b5dea8faf76c08c569..dccea206ad587cf45e9c72b998a0a63fcb1e9451 100644 --- a/FindBoost.cmake +++ b/FindBoost.cmake @@ -84,26 +84,26 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) endforeach() # Look for libraries specified by COMPONENTS flag -set(Boost_LIBRARY_DIRS "Boost_LIBRARY_DIRS-NOTFOUND") -find_path( - Boost_LIBRARY_DIRS - - NAMES - ${REQUESTED_BOOST_LIBS} - - HINTS - ${BOOST_LIBRARYDIR} - $ENV{BOOST_LIBRARYDIR} - ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost - - PATHS - /usr/lib/boost - /usr/lib/x86_64-linux-gnu - - PATH_SUFFIXES - stage/lib - lib -) +#set(Boost_LIBRARY_DIRS "Boost_LIBRARY_DIRS-NOTFOUND") +#find_path( +# Boost_LIBRARY_DIRS +# +# NAMES +# ${REQUESTED_BOOST_LIBS} +# +# HINTS +# ${BOOST_LIBRARYDIR} +# $ENV{BOOST_LIBRARYDIR} +# ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost +# +# PATHS +# /usr/lib/boost +# /usr/lib/x86_64-linux-gnu +# +# PATH_SUFFIXES +# stage/lib +# lib +#) # Construct list of libraries' names and make them # targets, so they may be linked @@ -118,20 +118,27 @@ foreach(LIBNAME ${REQUESTED_BOOST_LIBS}) NAMES ${LIBNAME} + HINTS + ${BOOST_LIBRARYDIR} + $ENV{BOOST_LIBRARYDIR} + ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost + PATHS ${Boost_LIBRARY_DIRS} + /usr/lib/boost + /usr/lib/x86_64-linux-gnu PATH_SUFFIXES - stage/lib - lib + stage/lib + lib NO_DEFAULT_PATH ) # Check, if the Boost component was found if("${LIBNAME}" STREQUAL "${LIBNAME}-NOTFOUND") - message(FATAL_ERROR "Boost library ${LIBNAME} was NOT found! - Please, set variable BOOST_LIBRARYDIR to the correct path and check the library names + message(FATAL_ERROR "Boost library ${LIBNAME} was NOT found!\ + Please, set variable BOOST_LIBRARYDIR to the correct path and check the library names\ format in your Boost installation.") endif()