about summary refs log tree commit diff
path: root/third_party/abseil_cpp/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/abseil_cpp/CMakeLists.txt')
-rw-r--r--third_party/abseil_cpp/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/third_party/abseil_cpp/CMakeLists.txt b/third_party/abseil_cpp/CMakeLists.txt
index 47670454ad9d..1ef35cfd224c 100644
--- a/third_party/abseil_cpp/CMakeLists.txt
+++ b/third_party/abseil_cpp/CMakeLists.txt
@@ -51,6 +51,9 @@ list(APPEND CMAKE_MODULE_PATH
   ${CMAKE_CURRENT_LIST_DIR}/absl/copts
 )
 
+# Linking Abseil to shared libraries (such as Nix) requires PIC.
+set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+
 include(AbseilInstallDirs)
 include(CMakePackageConfigHelpers)
 include(AbseilDll)