From 55ddc71fd801e06115ad6e33098b0eed2517daab Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 5 Nov 2019 13:16:21 +0200 Subject: Add support for automatic importing of libbuild2 of installed case --- libbuild2/buildfile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libbuild2/buildfile') diff --git a/libbuild2/buildfile b/libbuild2/buildfile index 325d54a..545ccba 100644 --- a/libbuild2/buildfile +++ b/libbuild2/buildfile @@ -117,9 +117,19 @@ cross = ($cxx.target.cpu != $build.host.cpu || \ $cxx.target.system != $build.host.system) if! $cross +{ {obja objs}{context}: cxx.poptions += \ -DBUILD2_IMPORT_PATH=\"$regex.replace($out_root, '\\', '\\\\')\" + # While this object file should only be linked when we are installing, it + # will be compiled even in the uninstalled case. + # + if ($install.root != [null]) + {obja objs}{utility-installed}: cxx.poptions += \ + -DBUILD2_INSTALL_LIB=\"$regex.replace(\ + $install.resolve($install.lib), '\\', '\\\\')\" +} + if ($cxx.target.class != 'windows') { libul{build2}: cxx.libs += -lpthread -- cgit v1.1