diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index cdd7a0813..bc481ea21 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -106,7 +106,8 @@ if (USE_ALTERNATE_FORMATS) endif () # Find all the required libraries and programs. -find_package(absl) +# Use "CONFIG" as there is no built-in cmake module for absl. +find_package(absl CONFIG REQUIRED) if(NOT absl_FOUND) # Overide abseil install rules for subprojects diff --git a/cpp/cmake/config.cmake.in b/cpp/cmake/config.cmake.in index 05f915659..2cf7fc9bb 100644 --- a/cpp/cmake/config.cmake.in +++ b/cpp/cmake/config.cmake.in @@ -2,7 +2,7 @@ include(CMakeFindDependencyMacro) -find_dependency(absl) +find_dependency(absl CONFIG) find_dependency(Protobuf) include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")