Skip to content

System libs build#14173

Open
NICourced wants to merge 6 commits into
mavlink:masterfrom
NICourced:system-libs-build
Open

System libs build#14173
NICourced wants to merge 6 commits into
mavlink:masterfrom
NICourced:system-libs-build

Conversation

@NICourced
Copy link
Copy Markdown

Description

Add corresponding CMake flags USE_SYSTEM_ before CPMAddPackage to let build with system build dependencies as brebuilt libs or source packages to make it easier to build without internet connection for distros that do so.
New build flags are:
USE_SYSTEM_MAVLINK
USE_SYSTEM_LIBEVENTS
USE_SYSTEM_ZLIB
USE_SYSTEM_XZ-EMBEDDED
USE_SYSTEM_ZSTD
USE_SYSTEM_LZ4
USE_SYSTEM_BZIP2
USE_SYSTEM_LIBARCHIVE
USE_SYSTEM_GEOGRAPHICLIB
USE_SYSTEM_SHAPE
USE_SYSTEM_SDL3
USE_SYSTEM_SDL_GAMECONTROLLERDB
USE_SYSTEM_QMDNSENGINE
USE_SYSTEM_LIBEXIF
USE_SYSTEM_ULOG_CPP
USE_SYSTEM_PX4-GPSDRIVERS
USE_SYSTEM_PARAMETERS
USE_SYSTEM_PROTOZERO
USE_SYSTEM_LIBOSMIUM
USE_SYSTEM_NANOBENCH
USE_SYSTEM_RAPIDCHECK
USE_SYSTEM_GSTQML6

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/Build changes
  • Other

Testing

  • Tested locally
  • Added/updated unit tests
  • Tested with simulator (SITL)
  • Tested with hardware

Platforms Tested

  • Linux
  • Windows
  • macOS
  • Android
  • iOS

Flight Stacks Tested

  • PX4
  • ArduPilot

Screenshots

Checklist

  • I have read the Contribution Guidelines
  • I have read the Code of Conduct
  • My code follows the project's coding standards
  • I have added tests that prove my fix/feature works
  • New and existing unit tests pass locally

Related Issues

#13906

By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 21, 2026

Build Results

Platform Status

Platform Status Details
Linux Failed View
Windows Failed View
MacOS Failed View
Android Failed View

Some builds failed.

Pre-commit

Check Status Details
pre-commit Failed (non-blocking) View

Pre-commit hooks: 4 passed, 36 failed, 7 skipped.


Updated: 2026-04-17 08:27:15 UTC • Triggered by: Windows

@HTRamsey
Copy link
Copy Markdown
Collaborator

I still don't fully understand why you can't just use CPM_USE_LOCAL_PACKAGES

@NICourced
Copy link
Copy Markdown
Author

There are some packages used from source and some mavlink packages that could be not packed in distro, so, in my opinion, it's better to add options on each package, also it lets using CPM cache for those who want

Each dependency now checks a corresponding USE_SYSTEM_<NAME> flag before
invoking CPMAddPackage, falling back to find_package() or a pre-set
source directory. Affected: mavlink, libevents, zlib, zstd, lz4, bzip2,
libarchive, geographiclib, shapelib, SDL3, SDL_GameControllerDB,
qmdnsengine, libexif, ulog_cpp, px4-gpsdrivers, ArduPilot parameters,
protozero, libosmium, nanobench, rapidcheck, gstqml6gl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants