From 10396f0d81754510d864b6e153af749b63313843 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 26 May 2021 10:48:11 +0200 Subject: [PATCH] CMake: Prefer Config, make Termcolor-message more visible. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b445c5..a594b34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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.")