2021-04-30 18:16:06 +02:00
|
|
|
gRPC requires abseil, but abseil can be statically linked to avoid installing
|
|
|
|
and tracking a ton of extra shared libs. Unfortunately, grpcpp headers now
|
|
|
|
include absl headers, so these need to be installed. Put them in a private
|
|
|
|
location because the full abseil installation is not provided.
|
|
|
|
|
|
|
|
diff -ur third_party/abseil-cpp/CMakeLists.txt third_party/abseil-cpp/CMakeLists.txt
|
srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
for p in ${template%/template}/patches/*; do
sed -i '
\,^[+-][+-][+-] /dev/null,b
/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
s,^[*][*][*] ,&a/,
/^--- /{
s,\(^--- \)\(./\)*,\1a/,
s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1,
s/[.][Oo][Rr][Ii][Gg]$//
s/[.]patched[.]\([^.]\)/.\1/
h
}
/^+++ -/{
g
s/^--- a/+++ b/
b
}
s,\(^+++ \)\(./\)*,\1b/,
' "$p"
done
sed -i '/^patch_args=/d' $template
done
```
2021-06-19 05:03:21 +02:00
|
|
|
--- a/third_party/abseil-cpp/CMakeLists.txt
|
|
|
|
+++ b/third_party/abseil-cpp/CMakeLists.txt
|
2021-05-24 15:33:47 +02:00
|
|
|
@@ -46,6 +46,7 @@
|
|
|
|
OPTION(BUILD_TESTING "Build tests" OFF)
|
2021-04-30 18:16:06 +02:00
|
|
|
|
2021-05-24 15:33:47 +02:00
|
|
|
project(absl LANGUAGES CXX VERSION 20210324)
|
2021-04-30 18:16:06 +02:00
|
|
|
+set(BUILD_SHARED_LIBS OFF)
|
2021-05-24 15:33:47 +02:00
|
|
|
include(CTest)
|
2021-04-30 18:16:06 +02:00
|
|
|
|
|
|
|
# Output directory is correct by default for most build setups. However, when
|
2021-05-24 15:33:47 +02:00
|
|
|
@@ -57,7 +58,7 @@
|
2021-04-30 18:16:06 +02:00
|
|
|
# when absl is included as subproject (i.e. using add_subdirectory(abseil-cpp))
|
|
|
|
# in the source tree of a project that uses it, install rules are disabled.
|
2021-05-24 15:33:47 +02:00
|
|
|
if(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
2021-04-30 18:16:06 +02:00
|
|
|
- option(ABSL_ENABLE_INSTALL "Enable install rule" OFF)
|
|
|
|
+ option(ABSL_ENABLE_INSTALL "Enable install rule" ON)
|
|
|
|
else()
|
|
|
|
option(ABSL_ENABLE_INSTALL "Enable install rule" ON)
|
|
|
|
endif()
|
2021-05-24 15:33:47 +02:00
|
|
|
@@ -176,7 +177,7 @@
|
2021-04-30 18:16:06 +02:00
|
|
|
endif() # absl_VERSION
|
|
|
|
|
|
|
|
install(DIRECTORY absl
|
2021-05-24 15:33:47 +02:00
|
|
|
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
|
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/grpc_absl
|
2021-04-30 18:16:06 +02:00
|
|
|
FILES_MATCHING
|
|
|
|
PATTERN "*.inc"
|
|
|
|
PATTERN "*.h"
|