Skip to content

Commit

Permalink
Improved variables names to make it more obvious what's going on.
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime committed Jul 10, 2023
1 parent a18a18b commit bbdbe71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ add_subdirectory(third_party)
# available otherwise we fallback to the older protobuf method. TODO: Simplify
# once we can require cmake 3.27 (where CONFIG is default).
find_package(Protobuf QUIET CONFIG)
if(${Protobuf_FOUND})
set(PROTOBUF_LOADED_AS_CONFIG ON)
else()
set(ABSL_INCLUDED_WITH_PROTOBUF ON)
if(NOT ${Protobuf_FOUND})
find_package(Protobuf REQUIRED)
include_directories(${Protobuf_INCLUDE_DIRS})
set(PROTOBUF_LOADED_AS_CONFIG OFF)
set(ABSL_INCLUDED_WITH_PROTOBUF OFF)
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
Expand Down
2 changes: 1 addition & 1 deletion third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

if(NOT ${PROTOBUF_LOADED_AS_CONFIG})
if(NOT ${ABSL_INCLUDED_WITH_PROTOBUF})
set(ABSL_PROPAGATE_CXX_STD ON)
add_subdirectory(abseil-cpp)
endif()
Expand Down

0 comments on commit bbdbe71

Please sign in to comment.