summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/camera_manager.cpp8
-rw-r--r--src/libcamera/meson.build1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
index cf881ce2..c5da46b4 100644
--- a/src/libcamera/camera_manager.cpp
+++ b/src/libcamera/camera_manager.cpp
@@ -9,6 +9,7 @@
#include <libcamera/camera.h>
#include <libcamera/event_dispatcher.h>
+#include <libcamera/version.h>
#include "device_enumerator.h"
#include "event_dispatcher_poll.h"
@@ -26,6 +27,11 @@ namespace libcamera {
LOG_DEFINE_CATEGORY(Camera)
/**
+ * \brief The library global version string
+ */
+const std::string version(LIBCAMERA_VERSION);
+
+/**
* \class CameraManager
* \brief Provide access and manage all cameras in the system
*
@@ -79,6 +85,8 @@ int CameraManager::start()
if (enumerator_)
return -EBUSY;
+ LOG(Camera, Info) << "libcamera " << version;
+
enumerator_ = DeviceEnumerator::create();
if (!enumerator_ || enumerator_->enumerate())
return -ENODEV;
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 8075b1f6..336f4f06 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -80,6 +80,7 @@ control_types_cpp = custom_target('control_types_cpp',
libcamera_sources += control_types_cpp
libcamera_deps = [
+ declare_dependency(sources : version_h),
cc.find_library('dl'),
libudev,
]