agentleFS
realsenseairealsenseai/librealsense/.claude/skills/build/SKILL.md

build

Skill9.1k starsChanged 27 days agoApache-2.0View on GitHub

Build librealsense with CMake on Windows, Linux or macOS - configure, compile, build flags, specific targets, Python bindings, DDS. Use before configuring or compiling the project.

169 other projects use a version of this.

Trending

Steady talk.about the whole repository

Dec 2025: 1 mentionJan 2026: 3 mentionsFeb 2026: 1 mentionMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 3 mentionsJul 2026: 5 mentionsAug 2026: 6 mentionsSep 2026: 6 mentionsOct 2026: 6 mentionsNov 2026: 2 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the realsenseai/librealsense repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about realsenseai/librealsense

The biggest 5 of 34 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 34

Talked about on GitHub (34 times).

On GitHub · 34

29 more on GitHub

Used with

Projects with it also use backprop, finances and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • JuliusBrusseeSkill

    backprop

    Bug → spec protocol. When a bug is found or a test fails, trace the cause, decide whether a new §V invariant would catch recurrence, append to §B. This is the one non-obvious thing SDD does that plan-then-execute doesn't. Triggers on test failure, bug report, post-mortem, or explicit user ask.

    Also in 4 projects that use this

  • GerardoRdz96Skill

    finances

    Use when Gera talks about his money — logging an expense ("I spent X on Y"), checking where he stands this pay-period, closing a period, planning debt payoff, onboarding his financial picture, or asking for budgeting/finance opinions. Servy's financial brain. Triggers — "I spent", "log this expense", "where am I this period", "close the period", "how's my budget", "debt plan", "should I pay off", "finances onboard", "/finances".

    Also in 3 projects that use this

  • cpiprintSkill

    favicon

    Generate favicons from a source image

    Also in 3 projects that use this

  • madeehahassanSkill

    Go-Live

    Pre-launch checklist. Use before making any app public, sharing a link externally, or announcing a product launch. Adapts to Claude Code, claude.ai, and Cowork.

    Also in 3 projects that use this

  • JuliusBrusseeSkill

    deepen

    Optional design-improvement pass for when you have spare usage to drain. Finds the shallowest modules in the code the spec touches, researches a deeper design, and proposes refactors that shrink interfaces and hide decisions — behavior held constant, tests green before and after. Proposes §I/§V/§T edits, never silent rewrites. Triggers when the user says "deepen this", "improve the design", "this module feels shallow", "pull complexity down", "use spare budget on the codebase", or invokes /ck:deepen. Leans on the codebase-design skill's deep-module vocabulary when present.

    Also in 3 projects that use this

  • synaptiaiSkill

    gate

    Create a BDSK review_gate artifact. Defines a checkpoint that controls whether generated output may proceed toward acceptance. Use when defining quality, security, or scope gates for execution plans.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 154 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Note: Always use --parallel flag on Windows for faster parallel builds.

    line 41
  2. Very specific:

    All flags are defined in CMake/lrs_options.cmake.

    line 160

“Common” is measured: kept by at least 6 in 10 of the 154 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Building librealsense

Prerequisites

Minimum Versions

  • CMake: 3.10 (3.16.3 if using -DBUILD_WITH_DDS=ON)
  • C++ Standard: The core library requires C++14; the public API/interface requires only C++11
    • Defined in CMake/lrs_macros.cmake via target_compile_features(... PRIVATE cxx_std_14) and INTERFACE cxx_std_11
    • The internal rsutils library (under third-party/rsutils/) also requires C++14

Platform-Specific Requirements

PlatformCompiler / ToolchainNotes
Windows 10/11Visual Studio 2019 or 2022 (MSVC)CI uses windows-2025 runners
Ubuntu 20.04GCCSupported
Ubuntu 22.04GCCPrimary Linux target
Ubuntu 24.04GCCAlso tested in CI
Ubuntu 26.04GCCSupported
macOS 15+Clang (Xcode)Tested in CI on macos-15
NVIDIA JetsonGCC (ARM64, L4T)See doc/installation_jetson.md
Raspberry PiGCC (ARM)See doc/installation_raspbian.md
AndroidNDK (r20b+)Cross-compilation; see doc/android.md

Windows Build (Visual Studio)

Full Build

mkdir build; cd build
cmake .. -G "Visual Studio 17 2022" -A x64
cmake --build . --config Release --parallel
# Or open build/realsense2.sln in Visual Studio

Note: Always use --parallel flag on Windows for faster parallel builds.

Build Specific Target

To build only a specific target:

cmake --build . --config Release --parallel --target <target-name>

Examples:

# Build only the core library
cmake --build . --config Release --parallel --target realsense2

# Build only the viewer
cmake --build . --config Release --parallel --target realsense-viewer

Install

cmake --build . --config Release --parallel --target install

Linux Build

Full Build

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)

Build Specific Target

To build only a specific target:

make <target-name>
# Or with cmake:
cmake --build . --target <target-name>

Examples:

# Build only the core library
make realsense2

# Build only the viewer
make realsense-viewer

List Available Targets

make help

Install

sudo make install

macOS Build

Note: macOS requires FORCE_RSUSB_BACKEND=ON.

Full Build

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DFORCE_RSUSB_BACKEND=ON
make -j$(sysctl -n hw.ncpu)

Build Specific Target

To build only a specific target:

make <target-name>
# Or with cmake:
cmake --build . --target <target-name>

Examples:

# Build only the core library
make realsense2

# Build only the viewer
make realsense-viewer

List Available Targets

make help

Install

sudo make install

Common Target Reference

TargetDescription
realsense2Core library only
realsense-viewerViewer application
rs-enumerate-devicesDevice enumeration tool
rs-fw-updateFirmware update tool
pyrealsense2Python bindings

Common CMake Build Flags

All flags are defined in CMake/lrs_options.cmake.

Rule: When adding a new CMake build flag, always declare it with option() in CMake/lrs_options.cmake — never inline in a subdirectory CMakeLists.txt. This keeps all flags discoverable in one place and ensures they appear in cmake-gui/ccmake regardless of which subdirectory is being configured.

FlagDefaultDescription
BUILD_SHARED_LIBSONBuild as shared library (OFF for static)
BUILD_EXAMPLESONBuild example applications
BUILD_GRAPHICAL_EXAMPLESONBuild viewer & graphical tools (requires GLFW)
BUILD_UNIT_TESTSOFFBuild unit tests (requires Python 3, downloads test data)
BUILD_PYTHON_BINDINGSOFFBuild Python bindings (pybind11)
BUILD_CSHARP_BINDINGSOFFBuild C# (.NET) bindings
BUILD_WITH_DDSOFFEnable DDS (FastDDS) support; requires CMake 3.16.3
FORCE_RSUSB_BACKENDOFFUse RS USB backend (required for macOS/Android, optional for Linux)
BUILD_TOOLSONBuild tools (fw-updater, enumerate-devices, etc.)
BUILD_WITH_CUDAOFFEnable CUDA support
BUILD_EASYLOGGINGPPONBuild EasyLogging++ for logging
BUILD_WITH_STATIC_CRTONLink against static CRT (Windows/MSVC)
CHECK_FOR_UPDATESON (OFF on macOS)Enable checking for SDK updates
ENABLE_CCACHEONUse ccache if available
BUILD_GLSL_EXTENSIONSONBuild GLSL extensions API
BUILD_RS2_ALLONBuild realsense2-all static bundle (when BUILD_SHARED_LIBS=OFF)
BUILD_ASANOFFEnable AddressSanitizer
ENABLE_SECURITY_FLAGSOFFEnable additional compiler security flags
BUILD_WITH_CLOSE_RANGE_DEPTHOFFEnable Improved Close Range Depth in viewer (Jetson only); requires librealsense2-enhanced-depth installed on every system that runs the binary — do not distribute this binary to systems without the package

Example: Build with Python Bindings and Tests

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
         -DBUILD_PYTHON_BINDINGS=ON \
         -DBUILD_UNIT_TESTS=ON
cmake --build . --config Release

On Windows, always add --parallel:

cmake --build . --config Release --parallel

Example: Build with DDS Support

cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_DDS=ON

Requires CMake >= 3.16.3. FastDDS and its dependencies will be automatically downloaded and built.

Key Build Outputs

  • Library: librealsense2.so / realsense2.dll / librealsense2.dylib
  • Viewer: realsense-viewer (when BUILD_GRAPHICAL_EXAMPLES=ON)
  • Python module: pyrealsense2.*.pyd / pyrealsense2.*.so (when BUILD_PYTHON_BINDINGS=ON)
  • Test executables: Various test-* binaries under the build directory (when BUILD_UNIT_TESTS=ON)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.