summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2022-11-01 13:45:12 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-11-22 12:12:02 +0000
commitc301075386ff72d4b8e1672d8cdad2d815a9d4b0 (patch)
tree1473aa5a657c6cc04820946cf03d0e6d42b6f6d9
parentb101cefde93dc8e01d591913df2d5039a14c0289 (diff)
src: Move main to src
Move the main uvc-gadget application to src/ to make it clear there is a separation between library and application code. Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--CMakeLists.txt5
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/main.c (renamed from main.c)0
3 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2cb8c20..5291256 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,11 +7,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Werror"
include_directories(${CMAKE_BINARY_DIR}/generated)
add_subdirectory(lib)
+add_subdirectory(src)
# Generate config.h
configure_file(${CMAKE_SOURCE_DIR}/include/config.h.in
${CMAKE_BINARY_DIR}/generated/config.h)
-
-add_executable(uvc-gadget main.c)
-target_link_libraries(uvc-gadget uvcgadget)
-install(TARGETS uvc-gadget DESTINATION bin)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..9f94788
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_executable(uvc-gadget main.c)
+target_link_libraries(uvc-gadget uvcgadget)
+install(TARGETS uvc-gadget DESTINATION bin)
diff --git a/main.c b/src/main.c
index f0f71ba..f0f71ba 100644
--- a/main.c
+++ b/src/main.c