From 00f574b1ece813ae4bcf8f36c0d638d5bf49ed4c Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 31 Jul 2019 12:17:03 +0200 Subject: [PATCH 1/2] Add 'libxdg-basedir' package --- cmake/configs/default.cmake | 1 + cmake/projects/libxdg-basedir/hunter.cmake | 27 ++++++++++++++++++++++ docs/packages/pkg/libxdg-basedir.rst | 21 +++++++++++++++++ examples/libxdg-basedir/CMakeLists.txt | 13 +++++++++++ examples/libxdg-basedir/example.cpp | 8 +++++++ 5 files changed, 70 insertions(+) create mode 100644 cmake/projects/libxdg-basedir/hunter.cmake create mode 100644 docs/packages/pkg/libxdg-basedir.rst create mode 100644 examples/libxdg-basedir/CMakeLists.txt create mode 100644 examples/libxdg-basedir/example.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index f627602915..915676f5cf 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -329,6 +329,7 @@ hunter_default_version(libsodium VERSION 1.0.16-p0) hunter_default_version(libunibreak VERSION 4.0) hunter_default_version(libusb VERSION 1.0.22) hunter_default_version(libuv VERSION 1.24.0-p1) +hunter_default_version(libxdg-basedir VERSION 1.2.0) hunter_default_version(libxml2 VERSION 2.9.7) hunter_default_version(libyuv VERSION 1514-p3) hunter_default_version(libzip VERSION 1.5.2-d68a667-p0) diff --git a/cmake/projects/libxdg-basedir/hunter.cmake b/cmake/projects/libxdg-basedir/hunter.cmake new file mode 100644 index 0000000000..a90f62ae9e --- /dev/null +++ b/cmake/projects/libxdg-basedir/hunter.cmake @@ -0,0 +1,27 @@ +include(hunter_add_version) +include(hunter_configuration_types) +include(hunter_pick_scheme) +include(hunter_download) +include(hunter_cacheable) +include(hunter_cmake_args) + +hunter_add_version( + PACKAGE_NAME libxdg-basedir + VERSION "1.2.0" + URL "https://github.com/devnev/libxdg-basedir/archive/libxdg-basedir-1.2.0.tar.gz" + SHA1 e671b01b17c8cf785d95dd3aefa93e7cf31e56a5 + ) + +hunter_configuration_types(libxdg-basedir CONFIGURATION_TYPES Release) +hunter_pick_scheme(DEFAULT url_sha1_autogen_autotools) +hunter_cacheable(libxdg-basedir) + +hunter_cmake_args( + libxdg-basedir + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=libxdg-basedir + ) + +hunter_download(PACKAGE_NAME libxdg-basedir + PACKAGE_INTERNAL_DEPS_ID "1" # Increment for each new pull request + PACKAGE_UNRELOCATABLE_TEXT_FILES lib/pkgconfig/libxdg-basedir.pc) diff --git a/docs/packages/pkg/libxdg-basedir.rst b/docs/packages/pkg/libxdg-basedir.rst new file mode 100644 index 0000000000..f6bcf157d8 --- /dev/null +++ b/docs/packages/pkg/libxdg-basedir.rst @@ -0,0 +1,21 @@ +.. spelling:: + + libxdg + basedir + +.. index:: + single: Filesystem ; libxdg-basedir + +.. _pkg.libxdg-basedir: + +libxdg-basedir +============== + +- `Official `__ +- `Example `__ +- Added by `tastytea `__ (`pr-N `__) + +.. literalinclude:: /../examples/libxdg-basedir/CMakeLists.txt + :language: cmake + :start-after: # DOCUMENTATION_START { + :end-before: # DOCUMENTATION_END } diff --git a/examples/libxdg-basedir/CMakeLists.txt b/examples/libxdg-basedir/CMakeLists.txt new file mode 100644 index 0000000000..2161a8096a --- /dev/null +++ b/examples/libxdg-basedir/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.2) + +include("../common.cmake") + +project(download-libxdg-basedir) + +# DOCUMENTATION_START { +hunter_add_package(libxdg-basedir) +find_package(libxdg-basedir CONFIG REQUIRED) + +add_executable(example example.cpp) +target_link_libraries(example PUBLIC PkgConfig::libxdg-basedir) +# DOCUMENTATION_END } diff --git a/examples/libxdg-basedir/example.cpp b/examples/libxdg-basedir/example.cpp new file mode 100644 index 0000000000..413e0465df --- /dev/null +++ b/examples/libxdg-basedir/example.cpp @@ -0,0 +1,8 @@ +#include + +int main() +{ + xdgHandle xdg; + xdgInitHandle(&xdg); + xdgWipeHandle(&xdg); +} From 52f13205413f6357e403a2368c1efe2a79b585d3 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 31 Jul 2019 14:03:49 +0200 Subject: [PATCH 2/2] Pull request number --- docs/packages/pkg/libxdg-basedir.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/packages/pkg/libxdg-basedir.rst b/docs/packages/pkg/libxdg-basedir.rst index f6bcf157d8..628d6f8258 100644 --- a/docs/packages/pkg/libxdg-basedir.rst +++ b/docs/packages/pkg/libxdg-basedir.rst @@ -13,7 +13,7 @@ libxdg-basedir - `Official `__ - `Example `__ -- Added by `tastytea `__ (`pr-N `__) +- Added by `tastytea `__ (`pr-1924 `__) .. literalinclude:: /../examples/libxdg-basedir/CMakeLists.txt :language: cmake