forked from cpp-pm/hunter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adds nng to hunter * adds hunter_cmake_args * adds nng.rst to docs * fix example * inserts PR number and removes developer name * adds developer name again
- Loading branch information
Showing
5 changed files
with
77 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,33 @@ | ||
# Copyright (c) 2016-2019, Ruslan Baratov | ||
# All rights reserved. | ||
|
||
# !!! DO NOT PLACE HEADER GUARDS HERE !!! | ||
|
||
include(hunter_add_version) | ||
include(hunter_cacheable) | ||
include(hunter_cmake_args) | ||
include(hunter_download) | ||
include(hunter_pick_scheme) | ||
|
||
hunter_add_version( | ||
PACKAGE_NAME | ||
nng | ||
VERSION | ||
1.1.1 | ||
URL | ||
"https://github.com/nanomsg/nng/archive/v1.1.1.tar.gz" | ||
SHA1 | ||
6194ae1187df0ebb2907bb17a8a724496a763bf5 | ||
) | ||
|
||
hunter_cmake_args( | ||
nng | ||
CMAKE_ARGS | ||
NNG_TOOLS=OFF | ||
NNG_TESTS=OFF | ||
NNG_ENABLE_NNGCAT=OFF | ||
) | ||
|
||
hunter_pick_scheme(DEFAULT url_sha1_cmake) | ||
hunter_cacheable(nng) | ||
hunter_download(PACKAGE_NAME nng) |
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:: | ||
|
||
nng | ||
|
||
.. index:: | ||
single: unsorted ; nng | ||
|
||
.. _pkg.nng: | ||
|
||
nng | ||
=== | ||
|
||
- `Official <https://nanomsg.github.io/nng/index.html>`__ | ||
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/nng/CMakeLists.txt>`__ | ||
- Added by `tnixeu <https://github.com/tnixeu>`__ (`pr-45 <https://github.com/cpp-pm/hunter/pull/45>`__) | ||
|
||
.. literalinclude:: /../examples/nng/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) 2016-2019, Ruslan Baratov | ||
# All rights reserved. | ||
|
||
cmake_minimum_required(VERSION 3.2) | ||
|
||
# Emulate HunterGate: | ||
# * https://github.com/hunter-packages/gate | ||
include("../common.cmake") | ||
|
||
project(download-nng) | ||
|
||
# DOCUMENTATION_START { | ||
hunter_add_package(nng) | ||
find_package(nng CONFIG REQUIRED) | ||
|
||
add_executable(boo boo.cpp) | ||
target_link_libraries(boo PUBLIC nng::nng) | ||
# 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,5 @@ | ||
#include <nng/nng.h> | ||
#include <iostream> | ||
int main() { | ||
std::cout << nng_version() << std::endl; | ||
} |