forked from cpp-pm/hunter
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ruslo#1924 from tastytea/pr.libxdg-basedir
Add 'libxdg-basedir' package
- Loading branch information
Showing
5 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. spelling:: | ||
|
||
libxdg | ||
basedir | ||
|
||
.. index:: | ||
single: Filesystem ; libxdg-basedir | ||
|
||
.. _pkg.libxdg-basedir: | ||
|
||
libxdg-basedir | ||
============== | ||
|
||
- `Official <https://github.com/devnev/libxdg-basedir>`__ | ||
- `Example <https://github.com/ruslo/hunter/blob/master/examples/libxdg-basedir/CMakeLists.txt>`__ | ||
- Added by `tastytea <https://github.com/tastytea>`__ (`pr-1924 <https://github.com/ruslo/hunter/pull/1924>`__) | ||
|
||
.. literalinclude:: /../examples/libxdg-basedir/CMakeLists.txt | ||
:language: cmake | ||
:start-after: # DOCUMENTATION_START { | ||
:end-before: # DOCUMENTATION_END } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <basedir.h> | ||
|
||
int main() | ||
{ | ||
xdgHandle xdg; | ||
xdgInitHandle(&xdg); | ||
xdgWipeHandle(&xdg); | ||
} |