Updates executable name and dependency links

Renames the executable to lowercase and updates the corresponding dependency links in CMakeLists.txt.

Introduces a version file to manage the project's version.
This commit is contained in:
Russell Gilbert 2026-02-11 07:43:40 +00:00
parent b2761dd2db
commit 1da934ba3c
3 changed files with 9 additions and 9 deletions

View file

@ -22,7 +22,7 @@ project(Dixon VERSION ${DIXON_VERSION_FROM_FILE} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
# Define the executable and its source files
add_executable(Dixon
add_executable(dixon
main.cpp
DixonNodeState.cpp
DixonNodeState.h
@ -33,21 +33,21 @@ add_executable(Dixon
# 3. Create the Dependency
# This tells CMake: "Before you build Dixon, you MUST run BumpVersion."
add_dependencies(Dixon BumpVersion)
add_dependencies(dixon BumpVersion)
# Generate the header from the template
configure_file(Version.h.in "${CMAKE_CURRENT_BINARY_DIR}/Version.h")
# Consolidated Include Paths
target_include_directories(Dixon PRIVATE
target_include_directories(dixon PRIVATE
"${CMAKE_CURRENT_BINARY_DIR}" # For generated Version.h
"${CMAKE_CURRENT_SOURCE_DIR}/extern/libgpiod/include" # For libgpiod headers
)
# Link the gpiod libraries
target_link_libraries(Dixon PRIVATE
target_link_libraries(dixon PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/extern/libgpiod/aarch64/libgpiodcxx.so.2"
"${CMAKE_CURRENT_SOURCE_DIR}/extern/libgpiod/aarch64/libgpiod.so.3")
# Tell the linker: "Trust me, the Pi has the rest of the C++ and C libraries"
target_link_options(Dixon PRIVATE "-Wl,--allow-shlib-undefined")
target_link_options(dixon PRIVATE "-Wl,--allow-shlib-undefined")

View file

@ -3,10 +3,10 @@
namespace cardio
{
Heart::Heart(const char* chipName, unsigned int lineOffset)
: chip_(std::string("/dev/") + chipName),
Heart::Heart(const char* chipName, const unsigned int lineOffset)
: _lastBeat(std::chrono::steady_clock::now()),
chip_(std::string("/dev/") + chipName),
isOn_(false),
_lastBeat(std::chrono::steady_clock::now()),
request_(get_line_request(chip_, lineOffset))
{
}

View file

@ -1 +1 @@
1.0.7
1.0.10