Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add byte-lite and gsl-lite as per https://github.com/cpp-pm/hunter/pull/499 #504

Merged
merged 1 commit into from
Jan 13, 2022
Merged
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
2 changes: 2 additions & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
@@ -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)
@@ -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)
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.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;
}