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
|
|
|
|
--- third_party/abseil-cpp/CMakeLists.txt
|
|
|
|
+++ 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"
|