Skip to content

About

CMake C++ example project using depthai library

Resources

Stars

15 stars

Watchers

10 watching

Forks

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMake C++ example project for depthai-core library

CMake example project which serves as a template on how to quickly get started with C++ and the depthai-core library.

Depthai library dependencies

  • cmake >= 3.20
  • C/C++17 compiler

Prerequisites

OpenCV - optional (for this example only)

OpenCV is required to run the out-of-box example. You can install OpenCV using one of the options below:

Building

Clone and build depthai-core

git clone https://github.com/luxonis/depthai-core.git --recursive && cd depthai-core
cmake -Bbuild -S. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install/dir
cmake --build build --target install --parallel 4

Navigate to your example project's root folder.

Build example project

cmake -Bbuild -S. -DCMAKE_PREFIX_PATH=/path/to/install/dir
cmake --build build --parallel 4

Make sure to change the /path/to/install/dir to a desired location on your filesystem. On Linux-based systems, if the -DCMAKE_INSTALL_PREFIX=/path/to/install/dir option is omited, depthai-core will get installed to /usr/local. In that case, you don't need to specify the -DCMAKE_PREFIX_PATH=/path/to/install/dir option.

Running

To run the example application 'myapp', navigate to build directory and run 'myapp' executable

./myapp

About

CMake C++ example project using depthai library

Resources

Stars

15 stars

Watchers

10 watching

Forks

Releases

Packages

Contributors

Languages