Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
ruslo committed Jul 25, 2016
1 parent ec959de commit 7fe0efa
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docs/overview/anything.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ You can manage anything that can be downloaded by ``URL`` and checked with
* C/C++ packages

.. code-block:: cmake
:emphasize-lines: 2, 5
hunter_add_package(Boost)
find_package(Boost CONFIG REQUIRED)
Expand All @@ -19,6 +20,7 @@ You can manage anything that can be downloaded by ``URL`` and checked with
* CMake modules

.. code-block:: cmake
:emphasize-lines: 2
hunter_add_package(Sugar)
include("${SUGAR_ROOT}/cmake/Sugar")
Expand All @@ -29,6 +31,7 @@ You can manage anything that can be downloaded by ``URL`` and checked with
* Additional sources (`OpenCV example <https://github.com/hunter-packages/opencv/blob/e91796b4c52994fcec5a8eafeacc618d54d31d8d/CMakeLists.txt#L449>`__):

.. code-block:: cmake
:emphasize-lines: 4
set(OPENCV_EXTRA_MODULES_PATH "" CACHE PATH "Where to look for additional OpenCV modules")
if(OPENCV_WITH_EXTRA_MODULES)
Expand All @@ -39,6 +42,7 @@ You can manage anything that can be downloaded by ``URL`` and checked with
* Resources (pictures, data for testing, ...)

.. code-block:: cmake
:emphasize-lines: 3-4
hunter_add_package(MyData)
Expand Down
12 changes: 11 additions & 1 deletion docs/overview/compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Turn Hunter off by adding one option `HUNTER_ENABLED=NO`_ to use your old
settings. For example:

.. code-block:: cmake
:emphasize-lines: 1
hunter_add_package(OpenSSL)
Expand All @@ -17,6 +18,7 @@ settings. For example:
by default this code will trigger download and build of OpenSSL:

.. code-block:: bash
:emphasize-lines: 9-10
> rm -rf _builds
> cmake -H. -B_builds -DCMAKE_VERBOSE_MAKEFILE=YES
Expand All @@ -34,6 +36,7 @@ but adding ``HUNTER_ENABLED=NO`` make it skip all Hunter instructions and
system library will be used instead:

.. code-block:: bash
:emphasize-lines: 2, 9-10
> rm -rf _builds
> cmake -H. -B_builds -DCMAKE_VERBOSE_MAKEFILE=YES -DHUNTER_ENABLED=NO
Expand All @@ -48,7 +51,8 @@ system library will be used instead:
``HUNTER_ENABLED=NO`` can be set by default using CMake ``option``:

.. code-block:: bash
.. code-block:: cmake
:emphasize-lines: 2
# before HunterGate
option(HUNTER_ENABLED "Enable Hunter package manager" NO)
Expand All @@ -63,3 +67,9 @@ package. It means that if package released with ``HUNTER_ENABLED=NO`` by default
it still can be used in Hunter, no extra modifications needed.

.. _HUNTER_ENABLED=NO: https://github.com/ruslo/hunter/wiki/usr.variables#hunter_enabled

.. warning::

Using old-style ``FOO_LIBRARIES`` variable instead of imported ``Foo::foo``
targets will make your project nonrelocatable because of full paths, so
probably you have to change this code to ``Foo::foo`` anyway.
5 changes: 3 additions & 2 deletions docs/overview/customization/hunter-id.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Message in logs:
-- [hunter] [ Hunter-ID: 1eae623 | Config-ID: ... | Toolchain-ID: ... ]
-- [hunter] [ Hunter-ID: e07a124 | Config-ID: ... | Toolchain-ID: ... ]

.. admonition:: GitHub
.. admonition:: Hunter

* `Releases <https://github.com/ruslo/hunter/releases>`_
* `Releases <https://github.com/ruslo/hunter/releases>`__
* `Atom feed <https://github.com/ruslo/hunter/releases.atom>`__
11 changes: 9 additions & 2 deletions docs/overview/customization/toolchain-id.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,12 @@ Message in logs:

.. admonition:: Examples on GitHub

* `Collection of toolchains <https://github.com/ruslo/polly>`_
* `Android example <https://github.com/forexample/android-cmake>`_
* `Android example <https://github.com/forexample/android-cmake>`__

.. admonition:: CGold

* `Platforms <http://cgold.readthedocs.io/en/latest/platforms.html>`__

.. admonition:: Polly

* `Collection of toolchains <https://github.com/ruslo/polly>`__
2 changes: 2 additions & 0 deletions docs/quick-start/boost-components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ to the ``HUNTER_ROOT`` directory (it means that there is **no need to clone
this repository** in general, see `notes`_):

.. code-block:: cmake
:emphasize-lines: 2, 3
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.10.9.tar.gz"
Expand Down Expand Up @@ -53,6 +54,7 @@ Hunter part is done, now well known CMake-style kung-fu (see `pkg.boost`_):
Summarize:

.. code-block:: cmake
:emphasize-lines: 5-6, 11
cmake_minimum_required(VERSION 3.0)
Expand Down

0 comments on commit 7fe0efa

Please sign in to comment.