diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 6d730eee1b3..e53ee4fb0e9 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -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) diff --git a/cmake/projects/byte-lite/hunter.cmake b/cmake/projects/byte-lite/hunter.cmake new file mode 100644 index 00000000000..2ebe0cbbcd6 --- /dev/null +++ b/cmake/projects/byte-lite/hunter.cmake @@ -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) diff --git a/cmake/projects/gsl-lite/hunter.cmake b/cmake/projects/gsl-lite/hunter.cmake new file mode 100644 index 00000000000..b9384551155 --- /dev/null +++ b/cmake/projects/gsl-lite/hunter.cmake @@ -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) diff --git a/docs/packages/pkg/byte-lite.rst b/docs/packages/pkg/byte-lite.rst new file mode 100644 index 00000000000..d90acc47995 --- /dev/null +++ b/docs/packages/pkg/byte-lite.rst @@ -0,0 +1,21 @@ +.. spelling:: + + byte + lite + byte-lite + +.. index:: containers ; byte-lite + +.. _pkg.byte-lite: + +byte-lite +========= + +- `Official `__ +- `Example `__ + +.. code-block:: cmake + + hunter_add_package(byte-lite) + find_package(byte-lite CONFIG REQUIRED) + target_link_libraries(... nonstd::byte-lite) diff --git a/docs/packages/pkg/gsl-lite.rst b/docs/packages/pkg/gsl-lite.rst new file mode 100644 index 00000000000..4b26fc5febb --- /dev/null +++ b/docs/packages/pkg/gsl-lite.rst @@ -0,0 +1,21 @@ +.. spelling:: + + gsl + lite + gsl-lite + +.. index:: containers ; gsl-lite + +.. _pkg.gsl-lite: + +gsl-lite +======== + +- `Official `__ +- `Example `__ + +.. code-block:: cmake + + hunter_add_package(gsl-lite) + find_package(gsl-lite CONFIG REQUIRED) + target_link_libraries(... gsl::gsl-lite) diff --git a/examples/byte-lite/CMakeLists.txt b/examples/byte-lite/CMakeLists.txt new file mode 100644 index 00000000000..43d69a56809 --- /dev/null +++ b/examples/byte-lite/CMakeLists.txt @@ -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) diff --git a/examples/byte-lite/foo.cpp b/examples/byte-lite/foo.cpp new file mode 100644 index 00000000000..141d45d7244 --- /dev/null +++ b/examples/byte-lite/foo.cpp @@ -0,0 +1,6 @@ +#include + +int main(int argc, char *argv[]) +{ + return (nonstd::byte *) argv, 0; +} diff --git a/examples/gsl-lite/CMakeLists.txt b/examples/gsl-lite/CMakeLists.txt new file mode 100644 index 00000000000..343dd18b7c5 --- /dev/null +++ b/examples/gsl-lite/CMakeLists.txt @@ -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) diff --git a/examples/gsl-lite/foo.cpp b/examples/gsl-lite/foo.cpp new file mode 100644 index 00000000000..b1de76ad905 --- /dev/null +++ b/examples/gsl-lite/foo.cpp @@ -0,0 +1,6 @@ +#include + +int main(int argc, char *argv[]) +{ + return gsl::span(&argc, 1).front(), 0; +}