summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/CMakeLists.txt18
-rw-r--r--lib/compat/CMakeLists.txt12
-rw-r--r--lib/meson.build31
3 files changed, 31 insertions, 30 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
deleted file mode 100644
index eacfb9c..0000000
--- a/lib/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-file(GLOB SOURCES "*.c" "*.h")
-file(GLOB HEADERS "../include/uvcgadget/*.h")
-
-add_subdirectory(compat)
-
-add_library(uvcgadget ${SOURCES})
-
-set_target_properties(uvcgadget PROPERTIES PUBLIC_HEADER "${HEADERS}")
-target_include_directories(uvcgadget
- PUBLIC
- $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
- $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include/uvcgadget>
- $<INSTALL_INTERFACE:include>)
-
-install(TARGETS uvcgadget
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- PUBLIC_HEADER DESTINATION include/uvcgadget)
diff --git a/lib/compat/CMakeLists.txt b/lib/compat/CMakeLists.txt
deleted file mode 100644
index 5fd6db4..0000000
--- a/lib/compat/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-include(CheckFunctionExists)
-include(CheckIncludeFile)
-
-check_include_file(dirent.h HAVE_DIRENT_H)
-
-check_function_exists(glob HAVE_GLOB)
-if(NOT HAVE_GLOB)
- set(SOURCES "${SOURCES}"
- "${CMAKE_CURRENT_SOURCE_DIR}/glob.c"
- "${CMAKE_SOURCE_DIR}/include/compat/glob.h"
- PARENT_SCOPE)
-endif()
diff --git a/lib/meson.build b/lib/meson.build
new file mode 100644
index 0000000..7db7519
--- /dev/null
+++ b/lib/meson.build
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: CC0-1.0
+
+libuvcgadget_sources = files([
+ 'configfs.c',
+ 'events.c',
+ 'stream.c',
+ 'uvc.c',
+ 'v4l2.c',
+ 'v4l2-source.c',
+ 'video-buffers.c',
+ 'video-source.c',
+])
+
+libuvcgadget = shared_library('uvcgadget',
+ libuvcgadget_sources,
+ version : uvc_gadget_version,
+ install : true,
+ include_directories : includes)
+
+libuvcgadget_dep = declare_dependency(sources : [
+ uvcgadget_public_headers,
+ ],
+ include_directories : includes,
+ link_with : libuvcgadget)
+
+pkg_mod = import('pkgconfig')
+pkg_mod.generate(libuvcgadget,
+ description : 'UVC Gadget support library',
+ subdirs : 'uvcgadget')
+
+meson.override_dependency('uvcgadget', libuvcgadget_dep)