Small Abseil fixes for dependents. (#1711)

Enable PIC so that shared libraries can use the Cartographer
library.

Fixes the config so that dependent builds can find Abseil.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
master
Wolfgang Hess 2020-06-25 09:35:57 +02:00 committed by GitHub
parent ade7605fac
commit e5894cce1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -39,7 +39,7 @@ find_package(Ceres ${QUIET_OR_REQUIRED_OPTION} HINTS ${CERES_DIR_HINTS})
if (WIN32) if (WIN32)
find_package(glog REQUIRED) find_package(glog REQUIRED)
endif() endif()
find_package(Abseil ${QUIET_OR_REQUIRED_OPTION}) find_package(absl ${QUIET_OR_REQUIRED_OPTION})
if(CARTOGRAPHER_HAS_GRPC) if(CARTOGRAPHER_HAS_GRPC)
find_package(async_grpc ${QUIET_OR_REQUIRED_OPTION}) find_package(async_grpc ${QUIET_OR_REQUIRED_OPTION})
endif() endif()

View File

@ -71,6 +71,10 @@ On Ubuntu 16.04 (Xenial):
:language: bash :language: bash
:lines: 20- :lines: 20-
.. literalinclude:: ../../scripts/install_abseil.sh
:language: bash
:lines: 20-
.. literalinclude:: ../../scripts/install_ceres.sh .. literalinclude:: ../../scripts/install_ceres.sh
:language: bash :language: bash
:lines: 20- :lines: 20-

View File

@ -24,6 +24,7 @@ mkdir build
cd build cd build
cmake -G Ninja \ cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_INSTALL_PREFIX=/usr/local/stow/absl \ -DCMAKE_INSTALL_PREFIX=/usr/local/stow/absl \
.. ..
ninja ninja