aports/community/libphonenumber/system-abseil.patch
2022-03-01 05:35:37 +00:00

42 lines
1.1 KiB
Diff

--- a/tools/cpp/CMakeLists.txt
+++ b/tools/cpp/CMakeLists.txt
@@ -28,27 +28,7 @@
include (gtest.cmake)
include (FetchContent)
-# Downloading the abseil sources.
-FetchContent_Declare(
- abseil-cpp
- GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
- GIT_TAG origin/master
-)
-
-# Building the abseil binaries
-FetchContent_GetProperties(abseil-cpp)
-if (NOT abseil-cpp_POPULATED)
- FetchContent_Populate(abseil-cpp)
-endif ()
-
-if (NOT abseil-cpp_POPULATED)
- message (FATAL_ERROR "Could not build abseil-cpp binaries.")
-endif ()
-
-# Safeguarding against any potential link errors as mentioned in
-# https://github.com/abseil/abseil-cpp/issues/225
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
-add_subdirectory(${abseil-cpp_SOURCE_DIR} ${abseil-cpp_BINARY_DIR})
find_or_build_gtest ()
set (
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -33,6 +33,8 @@
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
endif ()
+find_package(absl REQUIRED CONFIG)
+
# Helper functions dealing with finding libraries and programs this library
# depends on.