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.
This commit is contained in:
parent
6bd649d312
commit
e2fad0f0d2
3 changed files with 7 additions and 0 deletions
1
third_party/nix/default.nix
vendored
1
third_party/nix/default.nix
vendored
|
@ -21,6 +21,7 @@ in stdenv.mkDerivation {
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
bison
|
bison
|
||||||
clang-tools
|
clang-tools
|
||||||
|
cmake
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
pkgconfig
|
pkgconfig
|
||||||
|
|
5
third_party/nix/meson.build
vendored
5
third_party/nix/meson.build
vendored
|
@ -19,6 +19,7 @@ add_project_arguments(get_option('cxxflags'), language : 'cpp')
|
||||||
add_project_link_arguments(get_option('ldflags'), language: 'cpp')
|
add_project_link_arguments(get_option('ldflags'), language: 'cpp')
|
||||||
|
|
||||||
pkg = import('pkgconfig')
|
pkg = import('pkgconfig')
|
||||||
|
cmake = import('cmake')
|
||||||
|
|
||||||
config_h = configuration_data()
|
config_h = configuration_data()
|
||||||
|
|
||||||
|
@ -343,6 +344,10 @@ endif
|
||||||
config_h.set('CAN_LINK_SYMLINK', can_link_symlink,
|
config_h.set('CAN_LINK_SYMLINK', can_link_symlink,
|
||||||
description : 'Whether link() works on symlinks')
|
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.
|
# Look for boost, a required dependency.
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
|
|
1
third_party/nix/subprojects/abseil_cpp
vendored
Symbolic link
1
third_party/nix/subprojects/abseil_cpp
vendored
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../abseil_cpp
|
Loading…
Reference in a new issue