This repository has been archived by the owner on Apr 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 651
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1878 from rbsheth/pr.zip
Add 'zip' package
- Loading branch information
Showing
5 changed files
with
79 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,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 | ||
zip | ||
VERSION | ||
0.1.15 | ||
URL | ||
"https://github.com/kuba--/zip/archive/v0.1.15.tar.gz" | ||
SHA1 | ||
f65b4fde71963de6c019413628022d316098c8d1 | ||
) | ||
|
||
hunter_cmake_args( | ||
zip | ||
CMAKE_ARGS | ||
CMAKE_DISABLE_TESTING=ON | ||
) | ||
|
||
hunter_pick_scheme(DEFAULT url_sha1_cmake) | ||
hunter_cacheable(zip) | ||
hunter_download(PACKAGE_NAME zip) |
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:: | ||
|
||
zip | ||
|
||
.. index:: | ||
single: compression ; zip | ||
|
||
.. _pkg.zip: | ||
|
||
zip | ||
=== | ||
|
||
- `Official <https://https://github.com/kuba--/zip>`__ | ||
- `Example <https://github.com/ruslo/hunter/blob/master/examples/zip/CMakeLists.txt>`__ | ||
- Added by `Rahul Sheth <https://github.com/rbsheth>`__ (`pr-1878 <https://github.com/ruslo/hunter/pull/1878>`__) | ||
|
||
.. literalinclude:: /../examples/zip/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-zip) | ||
|
||
# DOCUMENTATION_START { | ||
hunter_add_package(zip) | ||
find_package(zip CONFIG REQUIRED) | ||
|
||
add_executable(boo boo.cpp) | ||
target_link_libraries(boo PUBLIC zip::zip) | ||
# 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 <zip/zip.h> | ||
|
||
int main() { | ||
struct zip_t *zip = zip_open("dummy", ZIP_DEFAULT_COMPRESSION_LEVEL, 'w'); | ||
|
||
zip_close(zip); | ||
|
||
return 0; | ||
} |