diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-20T02·03+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-20T02·03+0100 |
commit | e2fad0f0d208ff7d24214f010cca2d4a0be79d9e (patch) | |
tree | a5c605f82093d5bb4da8a7e4eb3ee8de8fd0b4c3 | |
parent | 6bd649d31215c2e92edf8fe8d6926d10c8413076 (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.
-rw-r--r-- | third_party/nix/default.nix | 1 | ||||
-rw-r--r-- | third_party/nix/meson.build | 5 | ||||
l--------- | third_party/nix/subprojects/abseil_cpp | 1 |
3 files changed, 7 insertions, 0 deletions
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 |