This project now supports building proper DEB packages for both Release and Debug configurations with semantic date-based versioning.
The project uses a semantic date-based versioning system:
- Major Version: Year (e.g., 2025)
- Minor Version: Month (01-12)
- Patch Version: Day (01-31)
- Build Metadata: Git commit ID and repository status
- Release:
2025.07.19+git.4e1de90(clean repository) - Release (dirty):
2025.07.19+git.4e1de90.dirty(uncommitted changes) - Debug:
2025.07.19+git.4e1de90.debug(debug build) - Debug (dirty):
2025.07.19+git.4e1de90.dirty.debug(debug with uncommitted changes)
The build system creates the following packages:
- libaasdk: Runtime library package containing the shared library
- libaasdk-dev: Development package containing headers and CMake configuration files
- libaasdk-dbg: Debug runtime library package with debugging symbols
- libaasdk-dbg-dev: Debug development package
- libaasdk-src: Source code package for distribution
The build system generates a Version.hpp header file that provides version and build information to the application:
#include <aasdk/Version.hpp>
// Access version components
unsigned int major = aasdk::Version::MAJOR; // 2025
unsigned int minor = aasdk::Version::MINOR; // 07
unsigned int patch = aasdk::Version::PATCH; // 19
// Access full version string
const char* version = aasdk::Version::STRING; // "2025.07.19+git.4e1de90.dirty"
// Access git information
const char* commit = aasdk::Version::GIT_COMMIT; // "4e1de90"
const char* branch = aasdk::Version::GIT_BRANCH; // "newdev"
bool isDirty = aasdk::Version::isDirty(); // true if uncommitted changes
// Helper methods
std::string semantic = aasdk::Version::getSemanticVersion(); // "2025.07.19"
bool isClean = aasdk::Version::isCleanBuild(); // false if dirtyYou can use the following VS Code tasks (Ctrl+Shift+P → "Tasks: Run Task"):
- Build All Packages: Builds both release and debug packages plus source package
- Create Release DEB Packages: Creates only release packages
- Create Debug DEB Packages: Creates only debug packages
- Install Release Package: Installs the built release packages
- Install Debug Package: Installs the built debug packages
# Configure and build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make -j$(nproc)
# Create packages
cpack --config CPackConfig.cmake# Configure and build
mkdir -p build-debug
cd build-debug
cmake -DCMAKE_BUILD_TYPE=Debug ../
make -j$(nproc)
# Create packages
cpack --config CPackConfig.cmakecd build
cpack --config CPackSourceConfig.cmakesudo dpkg -i build/libaasdk_*.deb build/libaasdk-dev_*.debsudo dpkg -i build-debug/libaasdk-dbg_*.deb build-debug/libaasdk-dbg-dev_*.deb# Add repository (when available)
sudo apt update
sudo apt install libaasdk libaasdk-devThe packages automatically handle the following dependencies:
- libusb-1.0-0 (>= 1.0.0)
- libboost-system1.81.0 | libboost-system1.74.0 (compatible with both versions)
- libboost-log1.81.0 | libboost-log1.74.0 (compatible with both versions)
- libssl3 (>= 3.0.0)
- libprotobuf32 (>= 3.21.0)
/usr/local/lib/libaasdk.so*- Shared library files
/usr/local/include/aasdk/- Header files/usr/local/lib/cmake/aasdk/- CMake configuration files- Depends on the corresponding runtime package
# Remove development package first
sudo dpkg -r libaasdk-dev
# Remove runtime package
sudo dpkg -r libaasdk
# Or for debug packages
sudo dpkg -r libaasdk-dbg-dev libaasdk-dbgThe build system supports:
- amd64 (x86_64)
- armhf (ARM 32-bit)
- Automatically detects architecture or uses TARGET_ARCH environment variable
For cross-compilation, set the TARGET_ARCH environment variable:
export TARGET_ARCH=armhf
cmake -DCMAKE_BUILD_TYPE=Release ../If you encounter dependency issues, install them manually:
sudo apt update
sudo apt install libusb-1.0-0-dev libboost-all-dev libssl-dev libprotobuf-dev protobuf-compilerIf you have conflicting packages installed:
# List installed aasdk packages
dpkg -l | grep aasdk
# Remove conflicting packages
sudo dpkg -r package-name