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})
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()
......
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