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..628d6f8258 --- /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-1924 `__) + +.. 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); +}