Browse Source

Use find_package(absl CONFIG)

Same approach as in Protobuf:
bc127f2b56/cmake/abseil-cpp.cmake (L36)
pull/3213/head
Dark Dragon 3 years ago
parent
commit
0bcef3a210
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      cpp/CMakeLists.txt
  2. +1
    -1
      cpp/cmake/config.cmake.in

+ 2
- 1
cpp/CMakeLists.txt View File

@ -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


+ 1
- 1
cpp/cmake/config.cmake.in View File

@ -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")


Loading…
Cancel
Save