Skip to content

Commit

Permalink
Add byte-lite and gsl-lite as per cpp-pm#499
Browse files Browse the repository at this point in the history
  • Loading branch information
ned14 committed Jan 6, 2022
1 parent e2424a4 commit 2390309
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ hunter_default_version(boost-pba VERSION 1.0.0-p0)
hunter_default_version(botan VERSION 2.11.0-110af9494)
hunter_default_version(breakpad VERSION 0.0.0-12ecff3-p4)
hunter_default_version(bullet VERSION 2.87-p0)
hunter_default_version(byte-lite VERSION 0.3.0-p0)
hunter_default_version(c-ares VERSION 1.14.0-p0)
hunter_default_version(caffe VERSION rc3-p2)
hunter_default_version(catkin VERSION 0.7.17-p0)
Expand Down Expand Up @@ -302,6 +303,7 @@ hunter_default_version(glog VERSION 0.4.0)
hunter_default_version(glproto VERSION 1.4.17)
hunter_default_version(glslang VERSION 8.13.3743-9eef54b2-p0)
hunter_default_version(glu VERSION 9.0.1-p1)
hunter_default_version(gsl-lite VERSION 0.40.0-p0)
hunter_default_version(gst_plugins_bad VERSION 1.10.4)
hunter_default_version(gst_plugins_base VERSION 1.10.4)
hunter_default_version(gst_plugins_good VERSION 1.10.4)
Expand Down
24 changes: 24 additions & 0 deletions cmake/projects/byte-lite/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2021 Niall Douglas https://www.nedproductions.biz/
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
byte-lite
VERSION
0.3.0-p0
URL
"https://github.com/martinmoene/byte-lite/archive/refs/tags/v0.3.0.tar.gz"
SHA1
8a1d64fa8af6b304a9299cc5a02066b04efa63b8
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(byte-lite)
hunter_download(PACKAGE_NAME byte-lite)
24 changes: 24 additions & 0 deletions cmake/projects/gsl-lite/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2021 Niall Douglas https://www.nedproductions.biz/
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
gsl-lite
VERSION
0.40.0-p0
URL
"https://github.com/gsl-lite/gsl-lite/archive/refs/tags/v0.40.0.tar.gz"
SHA1
4e3820b13fdc414d489d30d445f51baa059aadc7
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(gsl-lite)
hunter_download(PACKAGE_NAME gsl-lite)
21 changes: 21 additions & 0 deletions docs/packages/pkg/byte-lite.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. spelling::

byte
lite
byte-lite

.. index:: containers ; byte-lite

.. _pkg.byte-lite:

byte-lite
=========

- `Official <https://github.com/martinmoene/byte-lite>`__
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/byte-lite/CMakeLists.txt>`__

.. code-block:: cmake
hunter_add_package(byte-lite)
find_package(byte-lite CONFIG REQUIRED)
target_link_libraries(... nonstd::byte-lite)
21 changes: 21 additions & 0 deletions docs/packages/pkg/gsl-lite.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. spelling::

gsl
lite
gsl-lite

.. index:: containers ; gsl-lite

.. _pkg.gsl-lite:

gsl-lite
========

- `Official <https://github.com/martinmoene/gsl-lite>`__
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/gsl-lite/CMakeLists.txt>`__

.. code-block:: cmake
hunter_add_package(gsl-lite)
find_package(gsl-lite CONFIG REQUIRED)
target_link_libraries(... gsl::gsl-lite)
16 changes: 16 additions & 0 deletions examples/byte-lite/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2021 Niall Douglas
# All rights reserved.

cmake_minimum_required(VERSION 3.0)

# Emulate HunterGate:
# * https://github.com/cpp-pm/gate
include("../common.cmake")

project(download-byte-lite)

hunter_add_package(byte-lite)
find_package(byte-lite CONFIG REQUIRED)

add_executable(foo foo.cpp)
target_link_libraries(foo PUBLIC nonstd::byte-lite)
6 changes: 6 additions & 0 deletions examples/byte-lite/foo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <nonstd/byte-lite.hpp>

int main(int argc, char *argv[])
{
return (nonstd::byte *) argv, 0;
}
16 changes: 16 additions & 0 deletions examples/gsl-lite/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2021 Niall Douglas
# All rights reserved.

cmake_minimum_required(VERSION 3.0)

# Emulate HunterGate:
# * https://github.com/cpp-pm/gate
include("../common.cmake")

project(download-gsl-lite)

hunter_add_package(gsl-lite)
find_package(gsl-lite CONFIG REQUIRED)

add_executable(foo foo.cpp)
target_link_libraries(foo PUBLIC gsl::gsl-lite)
6 changes: 6 additions & 0 deletions examples/gsl-lite/foo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <gsl/gsl-lite.hpp>

int main(int argc, char *argv[])
{
return gsl::span<int>(&argc, 1).front(), 0;
}

0 comments on commit 2390309

Please sign in to comment.