forked from ruslo/hunter
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit * First working build. * Add offical url * Add PR number
- Loading branch information
Showing
5 changed files
with
86 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,36 @@ | ||
# !!! DO NOT PLACE HEADER GUARDS HERE !!! | ||
|
||
include(hunter_add_version) | ||
include(hunter_cacheable) | ||
include(hunter_cmake_args) | ||
include(hunter_configuration_types) | ||
include(hunter_download) | ||
include(hunter_pick_scheme) | ||
|
||
hunter_add_version( | ||
PACKAGE_NAME | ||
uuid | ||
VERSION | ||
1.0.3 | ||
URL | ||
"https://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz/download" | ||
SHA1 | ||
46eaedb875ae6e63677b51ec583656199241d597 | ||
) | ||
|
||
hunter_cmake_args( | ||
uuid | ||
CMAKE_ARGS | ||
PKGCONFIG_EXPORT_TARGETS=uuid | ||
) | ||
|
||
hunter_configuration_types(uuid CONFIGURATION_TYPES Release) | ||
hunter_pick_scheme(DEFAULT url_sha1_autotools) | ||
hunter_cacheable(uuid) | ||
hunter_download( | ||
PACKAGE_NAME uuid | ||
PACKAGE_INTERNAL_DEPS_ID "1" | ||
PACKAGE_UNRELOCATABLE_TEXT_FILES | ||
"lib/libuuid.la" | ||
"lib/pkgconfig/uuid.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,20 @@ | ||
.. spelling:: | ||
|
||
uuid | ||
|
||
.. index:: | ||
single: unsorted ; uuid | ||
|
||
.. _pkg.uuid: | ||
|
||
uuid | ||
==== | ||
|
||
- `Official <https://sourceforge.net/projects/libuuid/>`__ | ||
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/uuid/CMakeLists.txt>`__ | ||
- Added by `Joerg-Christian Boehme <https://github.com/Bjoe>`__ (`pr-193 <https://github.com/cpp-pm/hunter/pull/193>`__) | ||
|
||
.. literalinclude:: /../examples/uuid/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,18 @@ | ||
# Copyright (c) | ||
# All rights reserved. | ||
|
||
cmake_minimum_required(VERSION 3.2) | ||
|
||
# Emulate HunterGate: | ||
# * https://github.com/cpp-pm/gate | ||
include("../common.cmake") | ||
|
||
project(uuid) | ||
|
||
# DOCUMENTATION_START { | ||
hunter_add_package(uuid) | ||
find_package(uuid CONFIG REQUIRED) | ||
|
||
add_executable(boo boo.cpp) | ||
target_link_libraries(boo PUBLIC PkgConfig::uuid) | ||
# 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,11 @@ | ||
#include <uuid.h> | ||
#include <iostream> | ||
|
||
int main() { | ||
char sguid[37]; | ||
uuid_t uuid = {0}; | ||
uuid_generate(uuid); | ||
uuid_unparse(uuid, sguid); | ||
std::cout << sguid << std::endl; | ||
return 0; | ||
} |