CMake: Prefer Config, make Termcolor-message more visible.
continuous-integration/drone/push Build is passing Details

Starting with Boost 1.70, it provides an official CMake Package Config. Prefer
that if it is available. Gets rid of the “New Boost version may have incorrect
or missing dependencies and imported targets” warnings.
This commit is contained in:
tastytea 2021-05-26 10:48:11 +02:00
parent 6a612caa14
commit 10396f0d81
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
include(cmake/debug_flags.cmake)
# All dependencies except test dependencies.
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
find_package(Boost 1.65.0 REQUIRED COMPONENTS locale program_options regex)
find_package(Gettext REQUIRED)
find_package(Filesystem REQUIRED COMPONENTS Final Experimental)
@ -31,7 +32,7 @@ find_package(fmt 4 REQUIRED CONFIG)
find_package(termcolor CONFIG)
if(NOT termcolor_FOUND)
if(FALLBACK_BUNDLED)
message(VERBOSE "Using bundled version of Termcolor.")
message(STATUS "Using bundled version of Termcolor.")
add_subdirectory(dist/termcolor EXCLUDE_FROM_ALL)
else()
message(FATAL_ERROR "Termcolor was not found.")