summaryrefslogtreecommitdiff
path: root/lib/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r--lib/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644
index 0000000..c798d3b
--- /dev/null
+++ b/lib/CMakeLists.txt
@@ -0,0 +1,17 @@
+file(GLOB SOURCES "*.c" "*.h")
+file(GLOB HEADERS "../include/uvcgadget/*.h")
+
+add_library(uvcgadget ${SOURCES})
+
+set_target_properties(uvcgadget PROPERTIES PUBLIC_HEADER "${HEADERS}")
+target_include_directories(uvcgadget
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include/uvcgadget>
+ $<INSTALL_INTERFACE:include>
+ PRIVATE
+ ${KERNEL_INCLUDE_DIR})
+
+install(TARGETS uvcgadget
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ PUBLIC_HEADER DESTINATION include/uvcgadget)