Skip to content

Commit 5f48c81

Browse files
authored
Merge pull request #183 from alicevision/doc/conanFirst
[doc] add conan documentation
2 parents 3367d96 + 1c512e9 commit 5f48c81

File tree

4 files changed

+42
-33
lines changed

4 files changed

+42
-33
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11+
- Added documentation for conan [PR](https://github.com/alicevision/CCTag/pull/183)
1112

1213
### Changed
1314

INSTALL.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Building instructions
44

5+
For a detailed guide on building the library check the [online documentation](https://cctag.readthedocs.io/).
56

67
Required tools:
78
* CMake >= 3.14 to build the code
@@ -14,12 +15,6 @@ Optional tool:
1415
* CUDA >= 9.0
1516
Note: On Windows, there are compatibility issues to build the GPU part due to conflicts between msvc/nvcc/thrust/eigen/boost.
1617

17-
### Getting the sources:
18-
19-
```shell
20-
$ git clone https://github.com/alicevision/CCTag.git
21-
```
22-
2318
### Dependencies
2419

2520
Most of the dependencies can be installed from the common repositories (apt, yum etc):
@@ -29,30 +24,6 @@ Most of the dependencies can be installed from the common repositories (apt, yum
2924
- OpenCV >= 3.1
3025
- TBB >= 4.0
3126

32-
On a recent Ubuntu-like distribution (e.g. 14.04), you may want to try to run:
33-
```shell
34-
$ sudo apt-get install g++ git-all libpng12-dev libjpeg-dev libeigen3-dev libboost-atomic-dev libboost-chrono-dev libboost-date-time-dev libboost-dev libboost-program-options-dev libboost-exception-dev libboost-filesystem-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev libboost-timer-dev libtbb-dev
35-
```
36-
37-
OpenCV need to be compiled separately and installed in some `OPENCV_INSTALL` path. Then, when running cmake you need to provide the path to the location where `OpenCVConfig.cmake` is installed, usually `${OPENCV_INSTALL}/share/share/OpenCV/` (see below).
38-
39-
CCTag contains code optimized for AVX2 instruction set, which significantly increases detection performance. You can enable it with the option: `cmake -DCCTAG_ENABLE_SIMD_AVX2=ON`.
40-
41-
----------
42-
43-
### Run the building process
44-
45-
You now just need to be in the CCTag folder and run cmake:
46-
```bash
47-
$ mkdir build && cd build
48-
$ cmake .. -DOpenCV_DIR=${OPENCV_INSTALL}/share/share/OpenCV/
49-
$ make -j `nproc`
50-
```
51-
52-
Use `-DCCTAG_WITH_CUDA:BOOL=ON` to enable (default) or disable the cuda support. On Windows, it must be set to `OFF` if the Eigen version is < 3.3.9
53-
54-
If you want to install the library to, say, a CCTAG_INSTALL path, just add `-DCMAKE_INSTALL_PREFIX=$CCTAG_INSTALL` at cmake command line.
55-
If you want to build CCTag as a shared library: `-DBUILD_SHARED_LIBS=ON`.
5627

5728
----------
5829

doc/sphinx/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def configure_doxyfile(input_dir, output_dir):
5252
# Add any Sphinx extension module names here, as strings. They can be
5353
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
5454
# ones.
55-
extensions = ['breathe', 'sphinxcontrib.bibtex']
55+
extensions = ['breathe', 'sphinxcontrib.bibtex', 'sphinx.ext.autosectionlabel']
5656
bibtex_bibfiles = ['biblio.bib']
5757

5858
# Add any paths that contain templates here, relative to this directory.

doc/sphinx/source/install/install.rst

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ CCTag depends on the following libraries:
4747

4848
------------
4949

50+
CCTag can be installed from the following package managers.
5051

5152
vcpkg
5253
=====
@@ -63,6 +64,22 @@ where :code:`cuda` and :code:`apps` are the options to build the library with th
6364

6465
------------
6566

67+
68+
conan
69+
=====
70+
71+
`conan <https://conan.io/>`_ is a decentralized and multi-platform package manager.
72+
73+
Since v1.0.1, you can install CCTag from conan by running:
74+
75+
.. code:: shell
76+
77+
conan install cctag/1.0.1@
78+
79+
where :code:`1.0.1@` is the version you want to install. See :ref:`CCTag as third party` for how to use CCTag as third party in your project.
80+
81+
------------
82+
6683
Building the library
6784
====================
6885

@@ -214,7 +231,7 @@ So if you do not want to build the Cuda part, you have to pass :code:`-DCCTAG_WI
214231

215232
------------
216233

217-
234+
.. _how-to-use:
218235
CCTag as third party
219236
====================
220237

@@ -241,6 +258,26 @@ Then, in order to build just pass the location of :code:`CCTagConfig.cmake` from
241258
242259
cmake .. -DCCTag_DIR=$CCTAG_INSTALL/lib/cmake/CCTag/
243260
261+
If you are using conan for your project then you need to add cctag to your :code:`conanfile.txt`:
262+
263+
.. code::
264+
265+
[requires]
266+
cctag/1.0.1
267+
268+
[generators]
269+
CMakeToolchain
270+
CMakeDeps
271+
272+
and when building you may need to follow these steps:
273+
274+
.. code:: shell
275+
276+
mkdir build
277+
cd build
278+
conan install .. -s build_type=Release
279+
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
280+
cmake --build . --config Release
244281
245282
------------
246283

@@ -267,7 +304,7 @@ For example to create the dependency image based on ubuntu 18.04 with cuda 8.0 f
267304
268305
docker build --build-arg CUDA_TAG=8.0 --tag alicevision/cctag-deps:cuda8.0-ubuntu18.04 -f Dockerfile_deps .
269306
270-
The complete list of available tags can be found on the nvidia [dockerhub page](https://hub.docker.com/r/nvidia/cuda/)
307+
The complete list of available tags can be found on the nvidia `dockerhub page <https://hub.docker.com/r/nvidia/cuda/>`_
271308

272309

273310
Building the CCTag image

0 commit comments

Comments
 (0)