Skip to content

Create Your Own Project

Andrés Solís Montero edited this page Oct 18, 2015 · 4 revisions

Fork the vivaVideo project

https://github.com/asolis/vivaVideo

Adding files to your project

While developing your project you might want to add files to your vivaVideo clone project. Although you can use your IDE to add files to the project, this is NOT recommended. This makes your project dependent of your Development Environment and difficult to share your solution. Instead you should add the files to your working copy folder and let CMake to regenerate the project.

To accomplish this, you need to add your ".h" and ".cpp" files in the root of your cloned repository (e.g. /Users/username/vivaVideo/), at the same level of the existing main.cpp file.

The specified CMake rules in vivaVideo base project will list and include files with ".h" and ".cpp" extensions and add them to your project solution.

Link to OpenCV libraries

The vivaVideo links the following OpenCV libraries:

  1. opencv_video
  2. opencv_ts
  3. opencv_imgproc
  4. opencv_highgui
  5. opencv_features2d
  6. opencv_core

If you need to link to more OpenCV libraries you should modify the following lines from the CMakeLists.txt file at the root of your working copy.

set(OpenCV_LIBRARIES "opencv_video;opencv_ts;opencv_imgproc;opencv_highgui;opencv_features2d;opencv_core;")

Rebuild the project using the CMake tool.

Change the project name

Modify the CMakeLists.txt file at the root of your clone project.

Look for the following lines and replace the project's name.

# define the project name
set(project_name "vivaVideo")

Rebuild the project using the CMake tool.

Clone this wiki locally