Skip to content
Snippets Groups Projects
Commit 2778adb5 authored by Martin Beseda's avatar Martin Beseda
Browse files

Testing own FindBoost.cmake

parent ed2dff1c
No related branches found
No related tags found
No related merge requests found
...@@ -84,26 +84,26 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) ...@@ -84,26 +84,26 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
endforeach() endforeach()
# Look for libraries specified by COMPONENTS flag # Look for libraries specified by COMPONENTS flag
set(Boost_LIBRARY_DIRS "Boost_LIBRARY_DIRS-NOTFOUND") #set(Boost_LIBRARY_DIRS "Boost_LIBRARY_DIRS-NOTFOUND")
find_path( #find_path(
Boost_LIBRARY_DIRS # Boost_LIBRARY_DIRS
#
NAMES # NAMES
${REQUESTED_BOOST_LIBS} # ${REQUESTED_BOOST_LIBS}
#
HINTS # HINTS
${BOOST_LIBRARYDIR} # ${BOOST_LIBRARYDIR}
$ENV{BOOST_LIBRARYDIR} # $ENV{BOOST_LIBRARYDIR}
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost # ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost
#
PATHS # PATHS
/usr/lib/boost # /usr/lib/boost
/usr/lib/x86_64-linux-gnu # /usr/lib/x86_64-linux-gnu
#
PATH_SUFFIXES # PATH_SUFFIXES
stage/lib # stage/lib
lib # lib
) #)
# Construct list of libraries' names and make them # Construct list of libraries' names and make them
# targets, so they may be linked # targets, so they may be linked
...@@ -118,20 +118,27 @@ foreach(LIBNAME ${REQUESTED_BOOST_LIBS}) ...@@ -118,20 +118,27 @@ foreach(LIBNAME ${REQUESTED_BOOST_LIBS})
NAMES NAMES
${LIBNAME} ${LIBNAME}
HINTS
${BOOST_LIBRARYDIR}
$ENV{BOOST_LIBRARYDIR}
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost
PATHS PATHS
${Boost_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS}
/usr/lib/boost
/usr/lib/x86_64-linux-gnu
PATH_SUFFIXES PATH_SUFFIXES
stage/lib stage/lib
lib lib
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
# Check, if the Boost component was found # Check, if the Boost component was found
if("${LIBNAME}" STREQUAL "${LIBNAME}-NOTFOUND") if("${LIBNAME}" STREQUAL "${LIBNAME}-NOTFOUND")
message(FATAL_ERROR "Boost library ${LIBNAME} was NOT found! message(FATAL_ERROR "Boost library ${LIBNAME} was NOT found!\
Please, set variable BOOST_LIBRARYDIR to the correct path and check the library names Please, set variable BOOST_LIBRARYDIR to the correct path and check the library names\
format in your Boost installation.") format in your Boost installation.")
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment