From e2fad0f0d208ff7d24214f010cca2d4a0be79d9e Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 20 May 2020 03:03:08 +0100 Subject: feat(3p/nix): Add Abseil as a CMAKE subproject to Meson Yep. This is accomplished by symlinking the sources into the location expected by Meson for subprojects. --- third_party/nix/default.nix | 1 + third_party/nix/meson.build | 5 +++++ third_party/nix/subprojects/abseil_cpp | 1 + 3 files changed, 7 insertions(+) create mode 120000 third_party/nix/subprojects/abseil_cpp diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix index 263878cea436..288ac60a106b 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 6dbebb99b6ab..abf5b7b427ec 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 000000000000..4909945b3926 --- /dev/null +++ b/third_party/nix/subprojects/abseil_cpp @@ -0,0 +1 @@ +../../abseil_cpp \ No newline at end of file -- cgit 1.4.1