diff --git a/CMakeLists.txt b/CMakeLists.txt index 42ad3892..bd7fe7e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,6 @@ option( include_directories(include) include_directories(src) -add_subdirectory(third_party) - # TODO: Simplify once we can require cmake 3.27 (where CONFIG is default). # Due to packaging changes we use the combined protobuf/absl packaging if @@ -35,6 +33,8 @@ else() set(ABSL_INCLUDED_WITH_PROTOBUF OFF) endif() +add_subdirectory(third_party) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules") include(BuildUtils) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index dfb1bc02..7b8d8e60 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -1,8 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -if(${ABSL_INCLUDED_WITH_PROTOBUF}) - # Remove abseil-cpp from the repo when we can require cmake 3.27. -else() +if(NOT ${ABSL_INCLUDED_WITH_PROTOBUF}) set(ABSL_PROPAGATE_CXX_STD ON) add_subdirectory(abseil-cpp) endif()