Skip to content

Commit b7a70a0

Browse files
authoredJan 13, 2022
Add byte-lite and gsl-lite as per #499 (#504)
1 parent e2424a4 commit b7a70a0

File tree

9 files changed

+136
-0
lines changed

9 files changed

+136
-0
lines changed
 

‎cmake/configs/default.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ hunter_default_version(boost-pba VERSION 1.0.0-p0)
211211
hunter_default_version(botan VERSION 2.11.0-110af9494)
212212
hunter_default_version(breakpad VERSION 0.0.0-12ecff3-p4)
213213
hunter_default_version(bullet VERSION 2.87-p0)
214+
hunter_default_version(byte-lite VERSION 0.3.0-p0)
214215
hunter_default_version(c-ares VERSION 1.14.0-p0)
215216
hunter_default_version(caffe VERSION rc3-p2)
216217
hunter_default_version(catkin VERSION 0.7.17-p0)
@@ -302,6 +303,7 @@ hunter_default_version(glog VERSION 0.4.0)
302303
hunter_default_version(glproto VERSION 1.4.17)
303304
hunter_default_version(glslang VERSION 8.13.3743-9eef54b2-p0)
304305
hunter_default_version(glu VERSION 9.0.1-p1)
306+
hunter_default_version(gsl-lite VERSION 0.40.0-p0)
305307
hunter_default_version(gst_plugins_bad VERSION 1.10.4)
306308
hunter_default_version(gst_plugins_base VERSION 1.10.4)
307309
hunter_default_version(gst_plugins_good VERSION 1.10.4)

‎cmake/projects/byte-lite/hunter.cmake

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2021 Niall Douglas https://www.nedproductions.biz/
2+
# All rights reserved.
3+
4+
# !!! DO NOT PLACE HEADER GUARDS HERE !!!
5+
6+
include(hunter_add_version)
7+
include(hunter_cacheable)
8+
include(hunter_download)
9+
include(hunter_pick_scheme)
10+
11+
hunter_add_version(
12+
PACKAGE_NAME
13+
byte-lite
14+
VERSION
15+
0.3.0-p0
16+
URL
17+
"https://github.com/martinmoene/byte-lite/archive/refs/tags/v0.3.0.tar.gz"
18+
SHA1
19+
8a1d64fa8af6b304a9299cc5a02066b04efa63b8
20+
)
21+
22+
hunter_pick_scheme(DEFAULT url_sha1_cmake)
23+
hunter_cacheable(byte-lite)
24+
hunter_download(PACKAGE_NAME byte-lite)

‎cmake/projects/gsl-lite/hunter.cmake

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2021 Niall Douglas https://www.nedproductions.biz/
2+
# All rights reserved.
3+
4+
# !!! DO NOT PLACE HEADER GUARDS HERE !!!
5+
6+
include(hunter_add_version)
7+
include(hunter_cacheable)
8+
include(hunter_download)
9+
include(hunter_pick_scheme)
10+
11+
hunter_add_version(
12+
PACKAGE_NAME
13+
gsl-lite
14+
VERSION
15+
0.40.0-p0
16+
URL
17+
"https://github.com/gsl-lite/gsl-lite/archive/refs/tags/v0.40.0.tar.gz"
18+
SHA1
19+
4e3820b13fdc414d489d30d445f51baa059aadc7
20+
)
21+
22+
hunter_pick_scheme(DEFAULT url_sha1_cmake)
23+
hunter_cacheable(gsl-lite)
24+
hunter_download(PACKAGE_NAME gsl-lite)

‎docs/packages/pkg/byte-lite.rst

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. spelling::
2+
3+
byte
4+
lite
5+
byte-lite
6+
7+
.. index:: containers ; byte-lite
8+
9+
.. _pkg.byte-lite:
10+
11+
byte-lite
12+
=========
13+
14+
- `Official <https://github.com/martinmoene/byte-lite>`__
15+
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/byte-lite/CMakeLists.txt>`__
16+
17+
.. code-block:: cmake
18+
19+
hunter_add_package(byte-lite)
20+
find_package(byte-lite CONFIG REQUIRED)
21+
target_link_libraries(... nonstd::byte-lite)

‎docs/packages/pkg/gsl-lite.rst

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. spelling::
2+
3+
gsl
4+
lite
5+
gsl-lite
6+
7+
.. index:: containers ; gsl-lite
8+
9+
.. _pkg.gsl-lite:
10+
11+
gsl-lite
12+
========
13+
14+
- `Official <https://github.com/martinmoene/gsl-lite>`__
15+
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/gsl-lite/CMakeLists.txt>`__
16+
17+
.. code-block:: cmake
18+
19+
hunter_add_package(gsl-lite)
20+
find_package(gsl-lite CONFIG REQUIRED)
21+
target_link_libraries(... gsl::gsl-lite)

‎examples/byte-lite/CMakeLists.txt

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2021 Niall Douglas
2+
# All rights reserved.
3+
4+
cmake_minimum_required(VERSION 3.0)
5+
6+
# Emulate HunterGate:
7+
# * https://github.com/cpp-pm/gate
8+
include("../common.cmake")
9+
10+
project(download-byte-lite)
11+
12+
hunter_add_package(byte-lite)
13+
find_package(byte-lite CONFIG REQUIRED)
14+
15+
add_executable(foo foo.cpp)
16+
target_link_libraries(foo PUBLIC nonstd::byte-lite)

‎examples/byte-lite/foo.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <nonstd/byte.hpp>
2+
3+
int main(int argc, char *argv[])
4+
{
5+
return (nonstd::byte *) argv, 0;
6+
}

‎examples/gsl-lite/CMakeLists.txt

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2021 Niall Douglas
2+
# All rights reserved.
3+
4+
cmake_minimum_required(VERSION 3.0)
5+
6+
# Emulate HunterGate:
7+
# * https://github.com/cpp-pm/gate
8+
include("../common.cmake")
9+
10+
project(download-gsl-lite)
11+
12+
hunter_add_package(gsl-lite)
13+
find_package(gsl-lite CONFIG REQUIRED)
14+
15+
add_executable(foo foo.cpp)
16+
target_link_libraries(foo PUBLIC gsl::gsl-lite)

‎examples/gsl-lite/foo.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <gsl/gsl-lite.hpp>
2+
3+
int main(int argc, char *argv[])
4+
{
5+
return gsl::span<int>(&argc, 1).front(), 0;
6+
}

0 commit comments

Comments
 (0)
Please sign in to comment.