Skip to content

Commit

Permalink
Add 'imagequant' package (ruslo#1672)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbsheth authored and ruslo committed Dec 17, 2018
1 parent 44832c3 commit a4d5dd4
Show file tree
Hide file tree
Showing 5 changed files with 69 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 @@ -263,6 +263,7 @@ hunter_default_version(hdf5 VERSION 1.8.15-p1)
hunter_default_version(highwayhash VERSION 0.0.0)
hunter_default_version(http-parser VERSION 2.8.0)
hunter_default_version(ice VERSION 1.0.8)
hunter_default_version(imagequant VERSION 2.12.2-p0)
hunter_default_version(imgui VERSION 1.62)
hunter_default_version(imshow VERSION 1.0.0-p0)
hunter_default_version(inja VERSION 0.1.1)
Expand Down
24 changes: 24 additions & 0 deletions cmake/projects/imagequant/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2016-2018, Ruslan Baratov
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
imagequant
VERSION
2.12.2-p0
URL
"https://github.com/hunter-packages/libimagequant/archive/v2.12.2-p0.tar.gz"
SHA1
95960f65c1e103cc87a2b07e656ce247188ee082
)

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

imagequant

.. index::
single: media ; imagequant

.. _pkg.imagequant:

imagequant
==========

- `Official <https://github.com/ImageOptim/libimagequant>`__
- `Hunterized <https://github.com/hunter-packages/libimagequant>`__
- `Example <https://github.com/ruslo/hunter/blob/master/examples/imagequant/CMakeLists.txt>`__
- Added by `Rahul Sheth <https://github.com/rbsheth>`__ (`pr-1672 <https://github.com/ruslo/hunter/pull/1672>`__)

.. literalinclude:: /../examples/imagequant/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }
18 changes: 18 additions & 0 deletions examples/imagequant/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2016-2018, Ruslan Baratov
# All rights reserved.

cmake_minimum_required(VERSION 3.2)

# Emulate HunterGate:
# * https://github.com/hunter-packages/gate
include("../common.cmake")

project(download-libimagequant)

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

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

int main() {
liq_attr *handle = liq_attr_create();
}

0 comments on commit a4d5dd4

Please sign in to comment.