Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1837 from FredrikAppelros/pr.yajl
Browse files Browse the repository at this point in the history
Add 'YAJL' package
  • Loading branch information
ruslo authored Apr 24, 2019
2 parents 5ec96c4 + 2dce4ec commit e2acd28
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ hunter_default_version(Washer VERSION 0.1.2)
hunter_default_version(WebKit VERSION 0.0.2-p0)
hunter_default_version(WebP VERSION 1.0.2-p3)
hunter_default_version(WinSparkle VERSION 0.4.0)
hunter_default_version(YAJL VERSION 2.1.0-p0)
hunter_default_version(ZLIB VERSION 1.2.11-p0)
hunter_default_version(ZMQPP VERSION 4.2.0-p0)
hunter_default_version(ZeroMQ VERSION 4.2.3-p1)
Expand Down
31 changes: 31 additions & 0 deletions cmake/projects/YAJL/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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
YAJL
VERSION
2.1.0-p0
URL
"https://github.com/hunter-packages/yajl/archive/v2.1.0-p0.tar.gz"
SHA1
d2dc11da34efb5148e6b84f43ba08783f1aefef4
)

hunter_cmake_args(
YAJL
CMAKE_ARGS
YAJL_BUILD_TOOLS=OFF
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(YAJL)
hunter_download(PACKAGE_NAME YAJL)
21 changes: 21 additions & 0 deletions docs/packages/pkg/YAJL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. spelling::

YAJL

.. index::
single: json ; YAJL

.. _pkg.YAJL:

YAJL
====

- `Official <https://github.com/lloyd/yajl>`__
- `Hunterized <https://github.com/hunter-packages/yajl>`__
- `Example <https://github.com/ruslo/hunter/blob/master/examples/yajl/CMakeLists.txt>`__
- Added by `Fredrik Appelros <https://github.com/FredrikAppelros>`__ (`pr-1837 <https://github.com/ruslo/hunter/pull/1837>`__)

.. literalinclude:: /../examples/YAJL/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }
18 changes: 18 additions & 0 deletions examples/YAJL/CMakeLists.txt
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-YAJL)

# DOCUMENTATION_START {
hunter_add_package(YAJL)
find_package(YAJL CONFIG REQUIRED)

add_executable(boo boo.cpp)
target_link_libraries(boo PUBLIC YAJL::yajl)
# DOCUMENTATION_END }
4 changes: 4 additions & 0 deletions examples/YAJL/boo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include <yajl/yajl_common.h>

int main() {
}

0 comments on commit e2acd28

Please sign in to comment.