From f2a6d4e78124df0621d7c9c73bfcf4d6002e4059 Mon Sep 17 00:00:00 2001 From: David Sisson Date: Fri, 7 Jul 2023 20:19:10 -0700 Subject: [PATCH] Now with the intended code. --- CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5696c47..6575a2ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,13 +22,14 @@ include_directories(src) add_subdirectory(third_party) -# find_package(absl REQUIRED) include_directories(${ABSL_INCLUDE_DIRS}) +find_package(Protobuf QUIET CONFIG) +if(NOT ${Protobuf_FOUND}) + find_package(absl REQUIRED) + include_directories(${absl_INCLUDE_DIRS}) -find_package(Protobuf REQUIRED CONFIG) -# include_directories(${PROTOBUF_INCLUDE_DIRS}) - -message(STATUS "include dirs are ${Protobuf_INCLUDE_DIRS}") -message(STATUS "include dirs are ${PROTOBUF_INCLUDE_DIRS}") + find_package(Protobuf REQUIRED) + include_directories(${Protobuf_INCLUDE_DIRS}) +endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules") include(BuildUtils)