Sets up the initial project structure for the Dixon robot, including core components and build configurations. This commit lays the foundation for future development by: - Adding necessary `.idea` files for IDE configuration, including `.gitignore`, `aws.xml`, `modules.xml`, `vcs.xml`, `editor.xml`, and `encodings.xml` - Creating `Heart` component for managing heart beat with GPIO. - Setting up CMakeLists.txt to define project dependencies and configurations, including specifying C++20 standard and linking necessary libraries.
20 lines
No EOL
655 B
CMake
20 lines
No EOL
655 B
CMake
# Sets the minimum CMake version required to handle modern C++ features
|
|
cmake_minimum_required(VERSION 4.1)
|
|
|
|
# Defines the project name (used for internal variable naming and IDE display
|
|
project(Dixon)
|
|
|
|
# Forces the compiler to use C++20 features (required for modern libgpiod)
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
# Define the executable and its source files
|
|
add_executable(Dixon main.cpp
|
|
DixonNodeState.cpp
|
|
DixonNodeState.h
|
|
DixonBrain.cpp
|
|
DixonBrain.h
|
|
CardioCenter/Heart.cpp
|
|
CardioCenter/Heart.h)
|
|
|
|
# 2. Tell the linker what libraries to "glue" to that executable
|
|
target_link_libraries(Dixon PRIVATE gpiodcxx gpiod) |