From: Nils Forssén Date: Wed, 12 Jun 2024 21:35:41 +0000 (+0200) Subject: Created project structure X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=f098a72154e292f33bc794457bd517d54662f57c;p=flygplan.git Created project structure --- f098a72154e292f33bc794457bd517d54662f57c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8179d18 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +out/ +bin/ +.vscode/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..74538e1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.0.0) +project(client VERSION 0.1.0 LANGUAGES CXX) + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) + +add_subdirectory(src) +add_subdirectory(lib/mavlink) \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..869e79f --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "configurePresets": [ + { + "name": "client_toolchain", + "displayName": "Configure preset using toolchain file", + "description": "Sets Ninja generator, build and install directory", + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_TOOLCHAIN_FILE": "", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" + } + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..18ff068 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Installation + +Enable fan pin 20 through raspi-config + +``` +sudo apt install -y cmake build-essential checkinstall zlib1g-dev libssl-dev python3 python3-pip ninja-build git + + +``` \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..195c2cb --- /dev/null +++ b/build.sh @@ -0,0 +1,4 @@ +#!/usr/bin/bash + +cd $(dirname "$0")/out/build/client_toolchain +ninja \ No newline at end of file diff --git a/include/test.h b/include/test.h new file mode 100644 index 0000000..34889fd --- /dev/null +++ b/include/test.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/lib/mavlink b/lib/mavlink new file mode 160000 index 0000000..5575efc --- /dev/null +++ b/lib/mavlink @@ -0,0 +1 @@ +Subproject commit 5575efc01ea280e2f5d8a655a5ee1387f4b46f30 diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..72c9097 --- /dev/null +++ b/run.sh @@ -0,0 +1,4 @@ +#!/usr/bin/bash + +cd $(dirname "$0")/bin +./client \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..3d4149b --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,7 @@ +add_executable(client + main.cpp +) + +target_include_directories(client PRIVATE ${CMAKE_SOURCE_DIR}/include) + +target_link_libraries(client PUBLIC MAVLink) diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..2a94894 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,9 @@ +#include +#include "test.h" +#include + +int main(int, char**){ + printf("Hello, from clientcamera!\n"); + + return 0; +}