diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-21 11:00:23 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-21 11:02:02 +0000 |
commit | d6d6c46c4d6090347e10d6ec793e9ed9672cb1c5 (patch) | |
tree | 17b8807e19457449622ab37254de70a45cbe6ddd /CMakeLists.txt | |
parent | Merge pull request #5201 (diff) | |
download | monero-d6d6c46c4d6090347e10d6ec793e9ed9672cb1c5.tar.xz |
cmake: handle detecting boost using boost's own cmake files
Its version looks like 1.70.1 rather than 107000, so detect range
to know which type we're seeing
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b2d47706b..543e58eca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -887,10 +887,16 @@ find_package(Boost 1.58 QUIET REQUIRED COMPONENTS system filesystem thread date_ set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES}) if(NOT Boost_FOUND) - die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (1.58) or the equivalent") + die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=1.58) or the equivalent") elseif(Boost_FOUND) message(STATUS "Found Boost Version: ${Boost_VERSION}") - if (Boost_VERSION VERSION_LESS 106200 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1)) + if (Boost_VERSION VERSION_LESS 10 AND Boost_VERSION VERSION_LESS 1.62.0 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1)) + set(BOOST_BEFORE_1_62 true) + endif() + if (NOT Boost_VERSION VERSION_LESS 10 AND Boost_VERSION VERSION_LESS 106200 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1)) + set(BOOST_BEFORE_1_62 true) + endif() + if (BOOST_BEFORE_1_62) message(FATAL_ERROR "Boost older than 1.62 is too old to link with OpenSSL 1.1 or newer. " "Update Boost or install OpenSSL 1.0 and set path to it when running cmake: " "cmake -DOPENSSL_ROOT_DIR='/usr/include/openssl-1.0;/usr/lib/openssl-1.0'") |