aboutsummaryrefslogtreecommitdiff
path: root/dep
diff options
context:
space:
mode:
authorJan Van Buggenhout <chipzz@chipzz.be>2021-06-13 18:16:53 +0200
committerShauren <shauren.trinity@gmail.com>2022-03-11 01:49:11 +0100
commitccc37df27d9e5112aa70c3100e9289fe39057f7c (patch)
tree67b5639f5977227146ba536b69c84c102a38794c /dep
parentf0d8df8909cf7aaccdbe805fb37ff4b8c2fcd5ce (diff)
Build/CMake: Only complain about missing BOOST_ROOT when Boost is not found (#26598)
(cherry picked from commit 12668692ea11b10c7ec472577a87c70f5e0c9a17)
Diffstat (limited to 'dep')
-rw-r--r--dep/boost/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/dep/boost/CMakeLists.txt b/dep/boost/CMakeLists.txt
index e8c0d687e8c..8cfe4a786fd 100644
--- a/dep/boost/CMakeLists.txt
+++ b/dep/boost/CMakeLists.txt
@@ -14,8 +14,6 @@ if(WIN32)
set(BOOST_ROOT $ENV{BOOST_ROOT})
list(APPEND BOOST_LIBRARYDIR
${BOOST_ROOT}/lib${PLATFORM}-msvc-14.2 )
- elseif(NOT DEFINED Boost_DIR AND NOT DEFINED BOOST_ROOT AND NOT DEFINED BOOSTROOT)
- message(FATAL_ERROR "No BOOST_ROOT environment variable could be found! Please make sure it is set and the points to your Boost installation.")
endif()
set(Boost_USE_STATIC_LIBS ON)
@@ -39,6 +37,12 @@ endif()
find_package(Boost ${BOOST_REQUIRED_VERSION} REQUIRED system filesystem program_options iostreams regex)
+if(NOT Boost_FOUND)
+ if(NOT DEFINED ENV{BOOST_ROOT} AND NOT DEFINED Boost_DIR AND NOT DEFINED BOOST_ROOT AND NOT DEFINED BOOSTROOT)
+ message(FATAL_ERROR "No BOOST_ROOT environment variable could be found! Please make sure it is set and the points to your Boost installation.")
+ endif()
+endif()
+
# Find if Boost was compiled in C++03 mode because it requires -DBOOST_NO_CXX11_SCOPED_ENUMS
set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIR})