From cf17f2bc98b51f8ef8eb600de125659056d36983 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 12 Jun 2018 14:08:15 +0200 Subject: Add support for install, other minor tweaks --- buildfile | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) (limited to 'buildfile') diff --git a/buildfile b/buildfile index 9dde155..b21fc4e 100644 --- a/buildfile +++ b/buildfile @@ -13,13 +13,11 @@ vcpkg/ # .edit, as a specified extension (because the pattern machinery will # remove .cpp from matches that it has added to the pattern). # - # @@ Not clear what's the right place for the excutable. - # vcpkg/exe{vcpkg}: cxx{src/vcpkg/**.cpp +src/vcpkg} \ - hxx{include/vcpkg/**.h +include/pch} \ - fsdir{vcpkg/} + hxx{include/vcpkg/**.h +include/pch} - cxx.poptions =+ -DDISABLE_METRICS=1 "-I$src_base/include" + cxx.poptions =+ "-I$src_base/include" -DDISABLE_METRICS=1 \ +-DVCPKG_VERSION="+$version.revision-build2" # Currently upstream is full of warnings, so disable for now. # @@ -36,4 +34,42 @@ vcpkg/ if ($cxx.target.class == 'windows') cxx.libs += bcrypt.lib } + + # The goal here is to distribute pretty much the entire vcpkg repository so + # that the resulting package can be used in the same way as a repository + # clone (which is the "standard" way of using vcpkg). + # + ./: docs/file{**} \ + ports/file{**} \ + scripts/file{** -bootstrap.*} \ + triplets/file{**} \ + file{.vcpkg-root} \ + doc{LICENSE.txt CHANGELOG.md README.md} +} + +# Standard install doesn't make much sense with the way vcpkg works so we are +# going to repurpose it to create a "vcpkg build root" (which should contain +# all the ports, script, etc). In other words, you should be able to do: +# +# b install config.install.root=/tmp/vcpkg +# vcpkg install --vcpkg-root /tmp/vcpkg libfoo +# +manifest@./: install = root/ + +vcpkg/ +{ + # Only install what we explicitly list. + # + file{*}: install = false + + file{.vcpkg-root}@./: install = root/ + + ports/file{*}: install = root/ports/ + ports/file{*}: install.subdirs = true + + scripts/file{*}: install = root/scripts/ + scripts/file{*}: install.subdirs = true + + triplets/file{*}: install = root/triplets/ + triplets/file{*}: install.subdirs = true } -- cgit v1.1