diff options
| author | Kitzunu <24550914+Kitzunu@users.noreply.github.com> | 2021-06-19 06:00:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-19 06:00:10 +0200 |
| commit | 55d72c9530252ce8fbe929e674171dee2ec70958 (patch) | |
| tree | 1b3b9104c65417eedac35d09d6a689a3b6dcb547 | |
| parent | 23e9b85d0e01298feac4f5e1951bc1d15a333d8a (diff) | |
refactor(Build/CMake): Only complain when BOOST_ROOT was not found (#6418)
Cherry-picked from commit (TrinityCore/TrinityCore@1266869)
Co-authored-by: Jan Van Buggenhout <1895262+chipzz@users.noreply.github.com>
| -rw-r--r-- | deps/boost/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/deps/boost/CMakeLists.txt b/deps/boost/CMakeLists.txt index 8d04c558c9..ffab0f52fd 100644 --- a/deps/boost/CMakeLists.txt +++ b/deps/boost/CMakeLists.txt @@ -19,8 +19,6 @@ if(WIN32) set(BOOST_ROOT $ENV{BOOST_ROOT}) list(APPEND BOOST_LIBRARYDIR ${BOOST_ROOT}/lib${PLATFORM}-msvc-14.2) - else() - 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}) |
