35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
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
|
|
--- a/third_party/abseil-cpp/CMakeLists.txt
|
|
+++ b/third_party/abseil-cpp/CMakeLists.txt
|
|
@@ -46,6 +46,7 @@
|
|
OPTION(BUILD_TESTING "Build tests" OFF)
|
|
|
|
project(absl LANGUAGES CXX VERSION 20210324)
|
|
+set(BUILD_SHARED_LIBS OFF)
|
|
include(CTest)
|
|
|
|
# Output directory is correct by default for most build setups. However, when
|
|
@@ -57,7 +58,7 @@
|
|
# 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.
|
|
if(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
|
- 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()
|
|
@@ -176,7 +177,7 @@
|
|
endif() # absl_VERSION
|
|
|
|
install(DIRECTORY absl
|
|
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/grpc_absl
|
|
FILES_MATCHING
|
|
PATTERN "*.inc"
|
|
PATTERN "*.h"
|