diff --git a/.gitignore b/.gitignore index ce379f0..17b5e37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,9 @@ -build/ +# Ignore CMake/build2 out-of-tree build artifacts under build/, but keep +# the tracked build2 metadata files (build/bootstrap.build, build/root.build). +build/* +!build/bootstrap.build +!build/root.build +!build/export.build # Compiled Object files *.slo diff --git a/README.md b/README.md index cd122d0..dc66790 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,34 @@ target("your_target") add_packages("geo-utils-cpp") ``` +### build2 / bpkg / cppget + +> **Package name note:** in the build2 ecosystem (cppget.org) this library +> follows the build2 `libfoo` convention and is published as **`libgeo-utils`**. +> Everywhere else — GitHub project, CMake, vcpkg, Conan, xrepo — it is named +> **`geo-utils-cpp`**. Both names refer to the same library, same headers, same +> `#include ` API. + +Add the dependency to your package's `manifest`: + +``` +depends: libgeo-utils ^1.0.1 +``` + +And in the consuming `buildfile`: + +``` +import libs = libgeo-utils%lib{geo-utils} + +exe{hello}: cxx{hello} $libs +``` + +To install it into a build2 configuration directly: + +```sh +bpkg build libgeo-utils +``` + ### find_package ```cmake diff --git a/build/bootstrap.build b/build/bootstrap.build new file mode 100644 index 0000000..441d6c9 --- /dev/null +++ b/build/bootstrap.build @@ -0,0 +1,6 @@ +project = libgeo-utils + +using config +using test +using dist +using install diff --git a/build/root.build b/build/root.build new file mode 100644 index 0000000..e29cf15 --- /dev/null +++ b/build/root.build @@ -0,0 +1,5 @@ +cxx.std = latest + +using cxx + +hxx{*}: extension = hpp diff --git a/buildfile b/buildfile new file mode 100644 index 0000000..6143bca --- /dev/null +++ b/buildfile @@ -0,0 +1 @@ +./: include/ doc{README.md LICENSE NOTICE CHANGELOG.md} manifest diff --git a/include/buildfile b/include/buildfile new file mode 100644 index 0000000..c2ccdd8 --- /dev/null +++ b/include/buildfile @@ -0,0 +1 @@ +./: geo/ diff --git a/include/geo/buildfile b/include/geo/buildfile new file mode 100644 index 0000000..7322ef1 --- /dev/null +++ b/include/geo/buildfile @@ -0,0 +1,11 @@ +lib{geo-utils}: hxx{**} + +# Public include path: consumers do `#include `. +lib{geo-utils}: cxx.export.poptions = "-I$out_root/include" "-I$src_root/include" + +# Install headers under /include/geo/, preserving the detail/ subdir. +hxx{*}: +{ + install = include/geo/ + install.subdirs = true +} diff --git a/manifest b/manifest new file mode 100644 index 0000000..702fc08 --- /dev/null +++ b/manifest @@ -0,0 +1,17 @@ +: 1 +name: libgeo-utils +version: 1.0.1 +project: geo-utils-cpp +language: c++ +summary: Header-only C++17 geographic geometry utilities +license: Apache-2.0 +topics: geography, geometry, spherical, distance, header-only +description-file: README.md +description-type: text/markdown +changes-file: CHANGELOG.md +changes-type: text/markdown +url: https://github.com/gistrec/geo-utils-cpp +src-url: https://github.com/gistrec/geo-utils-cpp +package-url: https://github.com/gistrec/geo-utils-cpp +email: gistrec@gmail.com +requires: c++17