summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-12-04 23:38:48 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-12-06 16:34:01 +0200
commit913b3ee817a34bd78d5a8dc4fc9025920202db09 (patch)
treef8d4bde59d0df93d2e8002dd38b35fe1e8199e38 /src
parent0713202dc00df8aa4d2101d923546bff18d51921 (diff)
Overhaul the directory structure
In order to match the directory structure of traditional projects, rename the top-level lib/ directory to src/libcamera/. Other libraries developed as part of the project will later find a home in src/. Split the libcamera header files in three categories: public headers describing the public API in include/libcamera/, internal headers describing the internal API in src/libcamera/include/, and private headers local to one or a small number of compilation units along the corresponding .cpp files. As no internal header exists yet the src/libcamera/include/ directory is created empty as the build system would fail otherwise. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/include/.keep_empty0
-rw-r--r--src/libcamera/main.cpp17
-rw-r--r--src/libcamera/meson.build11
-rw-r--r--src/meson.build1
4 files changed, 29 insertions, 0 deletions
diff --git a/src/libcamera/include/.keep_empty b/src/libcamera/include/.keep_empty
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/libcamera/include/.keep_empty
diff --git a/src/libcamera/main.cpp b/src/libcamera/main.cpp
new file mode 100644
index 00000000..0059e0c9
--- /dev/null
+++ b/src/libcamera/main.cpp
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2018, Google Inc.
+ *
+ * main.cpp - libcamera main class
+ */
+
+#include <iostream>
+#include <libcamera/libcamera.h>
+
+using std::cout;
+using std::endl;
+
+void libcamera::init_lib(void)
+{
+ cout << "Lib Camera Init" << endl;
+}
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
new file mode 100644
index 00000000..07d9cd44
--- /dev/null
+++ b/src/libcamera/meson.build
@@ -0,0 +1,11 @@
+sources = ['main.cpp']
+
+includes = [
+ libcamera_includes,
+ include_directories('include'),
+]
+
+libcamera = shared_library('camera',
+ sources,
+ install : true,
+ include_directories : includes)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 00000000..4ce9668c
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1 @@
+subdir('libcamera')