about summary refs log tree commit diff
path: root/third_party
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-20T02·03+0100
committerVincent Ambo <tazjin@google.com>2020-05-20T02·03+0100
commite2fad0f0d208ff7d24214f010cca2d4a0be79d9e (patch)
treea5c605f82093d5bb4da8a7e4eb3ee8de8fd0b4c3 /third_party
parent6bd649d31215c2e92edf8fe8d6926d10c8413076 (diff)
feat(3p/nix): Add Abseil as a CMAKE subproject to Meson r/784
Yep.

This is accomplished by symlinking the sources into the location
expected by Meson for subprojects.
Diffstat (limited to 'third_party')
-rw-r--r--third_party/nix/default.nix1
-rw-r--r--third_party/nix/meson.build5
l---------third_party/nix/subprojects/abseil_cpp1
3 files changed, 7 insertions, 0 deletions
diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix
index 263878cea4..288ac60a10 100644
--- a/third_party/nix/default.nix
+++ b/third_party/nix/default.nix
@@ -21,6 +21,7 @@ in stdenv.mkDerivation {
   nativeBuildInputs = with pkgs; [
     bison
     clang-tools
+    cmake
     meson
     ninja
     pkgconfig
diff --git a/third_party/nix/meson.build b/third_party/nix/meson.build
index 6dbebb99b6..abf5b7b427 100644
--- a/third_party/nix/meson.build
+++ b/third_party/nix/meson.build
@@ -19,6 +19,7 @@ add_project_arguments(get_option('cxxflags'), language : 'cpp')
 add_project_link_arguments(get_option('ldflags'), language: 'cpp')
 
 pkg = import('pkgconfig')
+cmake = import('cmake')
 
 config_h = configuration_data()
 
@@ -343,6 +344,10 @@ endif
 config_h.set('CAN_LINK_SYMLINK', can_link_symlink,
 description : 'Whether link() works on symlinks')
 
+# Import the Abseil cmake project from the (symlinked) depot sources.
+# This will need to change if //third_party/nix is every split out as
+# a subtree.
+absl = cmake.subproject('abseil_cpp')
 
 # Look for boost, a required dependency.
 #--------------------------------------------------
diff --git a/third_party/nix/subprojects/abseil_cpp b/third_party/nix/subprojects/abseil_cpp
new file mode 120000
index 0000000000..4909945b39
--- /dev/null
+++ b/third_party/nix/subprojects/abseil_cpp
@@ -0,0 +1 @@
+../../abseil_cpp
\ No newline at end of file