Skip to content

Commit

Permalink
doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
sagi-z committed Jun 28, 2017
1 parent 1248814 commit 434c66e
Showing 8 changed files with 176 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -109,7 +109,8 @@ if(BUILD_DOCUMENTATION)
# CMAKE_DOXYGEN_HTML_HEADER
# CMAKE_GIT_REPO
# CPACK_PACKAGE_VERSION
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxygen_in/install.md.in ${CMAKE_CURRENT_SOURCE_DIR}/doxygen_in/install.md @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxygen_in/Doxyfile.in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile @ONLY)

# Allow html header changes
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxygen_header.html.in")
2 changes: 1 addition & 1 deletion Doxyfile.in → doxygen_in/Doxyfile.in
Original file line number Diff line number Diff line change
@@ -743,7 +743,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = doxygen_main.md src
INPUT = doxygen_in src

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
10 changes: 10 additions & 0 deletions doxygen_in/doxygen_main.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CanvasCV documentation {#mainpage}
======================
CanvasCV gives you a non intrusive, simple and extendable GUI system for OpenCV, based on OpenCV.
It is released under the same license terms as OpenCV, so you can basically use it for anything.

Table of contents
* @ref nutshell
* @ref install
* @ref multithreading
* @ref tutorials
75 changes: 75 additions & 0 deletions doxygen_in/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Installation {#install}
============

Build and install
-----------------
## Linux Building / Installing
### Build dependencies
Make sure these are installed first and that their executables are **in your path**:
* **cmake** - should already be installed since you built OpenCV by yourself.
* **git** (optional) - you can also download the sources from GitHub.

### Prepare to build

```
git clone https://github.com/sagi-z/CanvasCV.git
cd CanvasCV
git checkout tags/1.0.0
mkdir build
cd build
```

### By default cmake is building without the C++ examples

```
cmake ..
make
```

### Here is how to build the examples

```
cmake -DBUILD_EXAMPLES=ON ..
make
```

### Install option 1 for Linux (from the build directory):

```
sudo make install
```

### C++ Install option 2 for Linux - cleaner (from the build directory):

```
cpack -G DEB
sudo dpkg -i ./canvascv-1.0.0-Linux.deb
```

C++ Usage
---------
### Linux
Assuming installation in '/usr/local', add to cflags '-I/usr/local/include' and to link flags '-L/usr/local/lib -lcanvascv'

Here is a minimal *CMakeLists.txt* example:
```
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(myapp)
FIND_PACKAGE(OpenCV 3.1.0 REQUIRED)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS} "/usr/local/include")
ADD_EXECUTABLE(myapp main.cpp)
FIND_LIBRARY(CanvasCV_LIB canvascv "/usr/local/lib")
TARGET_LINK_LIBRARIES (myapp ${CanvasCV_LIB} ${OpenCV_LIBS})
```

### Windows
make sure the include path and link path and library are set correctly.

### C++ code example
See example files in the doxygen Docs

75 changes: 75 additions & 0 deletions doxygen_in/install.md.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Installation {#install}
============

Build and install
-----------------
## Linux Building / Installing
### Build dependencies
Make sure these are installed first and that their executables are **in your path**:
* **cmake** - should already be installed since you built OpenCV by yourself.
* **git** (optional) - you can also download the sources from GitHub.

### Prepare to build

```
git clone https://github.com/sagi-z/CanvasCV.git
cd CanvasCV
git checkout tags/@CPACK_PACKAGE_VERSION@
mkdir build
cd build
```

### By default cmake is building without the C++ examples

```
cmake ..
make
```

### Here is how to build the examples

```
cmake -DBUILD_EXAMPLES=ON ..
make
```

### Install option 1 for Linux (from the build directory):

```
sudo make install
```

### C++ Install option 2 for Linux - cleaner (from the build directory):

```
cpack -G DEB
sudo dpkg -i ./canvascv-@[email protected]
```

C++ Usage
---------
### Linux
Assuming installation in '/usr/local', add to cflags '-I/usr/local/include' and to link flags '-L/usr/local/lib -lcanvascv'

Here is a minimal *CMakeLists.txt* example:
```
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(myapp)

FIND_PACKAGE(OpenCV 3.1.0 REQUIRED)

INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS} "/usr/local/include")

ADD_EXECUTABLE(myapp main.cpp)

FIND_LIBRARY(CanvasCV_LIB canvascv "/usr/local/lib")
TARGET_LINK_LIBRARIES (myapp ${CanvasCV_LIB} ${OpenCV_LIBS})
```

### Windows
make sure the include path and link path and library are set correctly.

### C++ code example
See example files in the doxygen Docs

5 changes: 5 additions & 0 deletions doxygen_in/multithreading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Multithreading {#multithreading}
==============
As GUI toolkits go, they are mostly not multithreaded.
The other threads do they work and then GUI handling (update/paint/callbacks) is done in a dedicated thread.
* [see a related example in this blog post](https://www.theimpossiblecode.com/blog/faster-opencv-smiles-tbb "dedicated GUI thread").
4 changes: 2 additions & 2 deletions doxygen_main.md → doxygen_in/nutshell.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

Usage in a nutshell
Usage in a nutshell {#nutshell}
===================
~~~~~~~{.cpp}
#include <opencv2/highgui.hpp>
@@ -41,3 +40,4 @@ int main()
return 0;
}
~~~~~~~

6 changes: 6 additions & 0 deletions doxygen_in/tutorials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CanvasCV Tutorials {#tutorials}
==================
(see also the examples section)
* @subpage on screen text tutorial
* @subpage using buttons
* [More tutorials which haven't made it into the official documentation yet](https://sagi-z.github.io/CanvasCV/tutorials "more tutorials").

0 comments on commit 434c66e

Please sign in to comment.