Add back comment and output messages.

This commit is contained in:
Daniel Kirchner 2019-06-06 20:47:55 +02:00
parent cb9c35f883
commit dcb6b2cb33

View File

@ -1,3 +1,6 @@
# all dependencies that are not directly included in the cpp-ethereum distribution are defined here
# for this to work, download the dependency via the cmake script in extdep or install them manually!
if (DEFINED MSVC)
# by defining CMAKE_PREFIX_PATH variable, cmake will look for dependencies first in our own repository before looking in system paths like /usr/local/ ...
# this must be set to point to the same directory as $ETH_DEPENDENCY_INSTALL_DIR in /extdep directory
@ -27,11 +30,17 @@ set(BOOST_COMPONENTS "regex;filesystem;unit_test_framework;program_options;syste
find_package(Boost 1.65.0 QUIET REQUIRED COMPONENTS ${BOOST_COMPONENTS})
# make sure we actually get all required imported targets for boost
# If cmake is older than boost and boost is older than 1.70,
# find_package does not define imported targets, so we have to
# define them manually.
if (NOT TARGET Boost::boost) # header only target
add_library(Boost::boost INTERFACE IMPORTED)
target_include_directories(Boost::boost INTERFACE ${Boost_INCLUDE_DIRS})
endif()
get_property(LOCATION TARGET Boost::boost PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "Found Boost headers in ${LOCATION}")
foreach (BOOST_COMPONENT IN LISTS BOOST_COMPONENTS)
if (NOT TARGET Boost::${BOOST_COMPONENT})
add_library(Boost::${BOOST_COMPONENT} UNKNOWN IMPORTED)
@ -40,4 +49,6 @@ foreach (BOOST_COMPONENT IN LISTS BOOST_COMPONENTS)
set_property(TARGET Boost::${BOOST_COMPONENT} PROPERTY INTERFACE_LINK_LIBRARIES ${Boost_${BOOST_COMPONENT_UPPER}_LIBRARIES})
set_property(TARGET Boost::${BOOST_COMPONENT} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
endif()
get_property(LOCATION TARGET Boost::${BOOST_COMPONENT} PROPERTY IMPORTED_LOCATION)
message(STATUS "Found Boost::${BOOST_COMPONENT} at ${LOCATION}")
endforeach()