Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <geo/...>` 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
Expand Down
6 changes: 6 additions & 0 deletions build/bootstrap.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project = libgeo-utils

using config
using test
using dist
using install
5 changes: 5 additions & 0 deletions build/root.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cxx.std = latest

using cxx

hxx{*}: extension = hpp
1 change: 1 addition & 0 deletions buildfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./: include/ doc{README.md LICENSE NOTICE CHANGELOG.md} manifest
1 change: 1 addition & 0 deletions include/buildfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./: geo/
11 changes: 11 additions & 0 deletions include/geo/buildfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
lib{geo-utils}: hxx{**}

# Public include path: consumers do `#include <geo/...>`.
lib{geo-utils}: cxx.export.poptions = "-I$out_root/include" "-I$src_root/include"

# Install headers under <prefix>/include/geo/, preserving the detail/ subdir.
hxx{*}:
{
install = include/geo/
install.subdirs = true
}
17 changes: 17 additions & 0 deletions manifest
Original file line number Diff line number Diff line change
@@ -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
Loading