This repository has been archived by the owner on Apr 15, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
64 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,21 @@ | ||
# !!! 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 jansson | ||
VERSION "2.11.0" | ||
URL "https://github.com/hunter-packages/jansson/archive/v2.11-p0.tar.gz" | ||
SHA1 "4f5855dac698e9658fd94620b64f8430f265be1d") | ||
|
||
hunter_cmake_args(jansson CMAKE_ARGS | ||
JANSSON_BUILD_DOCS=OFF | ||
JANSSON_EXAMPLES=OFF | ||
JANSSON_WITHOUT_TESTS=ON) | ||
hunter_pick_scheme(DEFAULT url_sha1_cmake) | ||
hunter_cacheable(jansson) | ||
hunter_download(PACKAGE_NAME jansson) |
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:: | ||
|
||
jansson | ||
|
||
.. index:: serialize ; jansson | ||
|
||
.. _pkg.jansson: | ||
|
||
jansson | ||
======= | ||
|
||
- `Official <https://github.com/akheron/jansson>`__ | ||
- `Hunterized <https://github.com/hunter-packages/jansson>`__ | ||
- `Example <https://github.com/ruslo/hunter/blob/master/examples/jansson/CMakeLists.txt`__ | ||
- Added by `Isaac Hier <https://github.com/isaachier>`__ (`pr-1372 <https://github.com/ruslo/hunter/pull/1372>`) | ||
|
||
.. literalinclude:: /../examples/jansson/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
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,12 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
|
||
include("../common.cmake") | ||
|
||
project(download-jansson) | ||
|
||
# DOCUMENTATION_START { | ||
hunter_add_package(jansson) | ||
find_package(jansson CONFIG REQUIRED) | ||
add_executable(main main.c) | ||
target_link_libraries(main jansson::jansson) | ||
# 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,9 @@ | ||
#include <jansson.h> | ||
|
||
int main() | ||
{ | ||
json_malloc_t malloc_fn; | ||
json_free_t free_fn; | ||
json_get_alloc_funcs(&malloc_fn, &free_fn); | ||
return 0; | ||
} |