libcamera: include/libcamera/internal/source_paths.h File Reference

libcamera v0.0.2 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
Namespaces | Functions
source_paths.h File Reference

Identify the build and source path of a not-yet-installed library. More...

`#include <string>`
Include dependency graph for source_paths.h:

Go to the source code of this file.

## Namespaces
namespace | libcamera
| Top-level libcamera namespace.

## Functions
std::string | libcamera::utils::libcameraBuildPath ()
| Retrieve the path to the build directory. More...
std::string | libcamera::utils::libcameraSourcePath ()
| Retrieve the path to the source directory. More...

## Detailed Description

Identify the build and source path of a not-yet-installed library.

## Function Documentation

## ◆ libcameraBuildPath()

std::string libcamera::utils::libcameraBuildPath | ( |  | ) |

Retrieve the path to the build directory.

During development, it is useful to run libcamera binaries directly from the build directory without installing them. This function helps components that need to locate resources in the build tree, such as IPA modules or IPA proxy workers, by providing them with the path to the root of the build directory. Callers can then use it to complement or override searches in system-wide directories.

If libcamera has been installed, the build directory path is not available and this function returns an empty string.

Returns
  The path to the build directory if running from a build, or an empty string otherwise

## ◆ libcameraSourcePath()

std::string libcamera::utils::libcameraSourcePath | ( |  | ) |

Retrieve the path to the source directory.

During development, it is useful to run libcamera binaries directly from the build directory without installing them. This function helps components that need to locate resources in the source tree, such as IPA configuration files, by providing them with the path to the root of the source directory. Callers can then use it to complement or override searches in system-wide directories.

If libcamera has been installed, the source directory path is not available and this function returns an empty string.

Returns
  The path to the source directory if running from a build directory, or an empty string otherwise