Skip to content

Cache

Resolves the shared FetchContent cache directory used by CMake-based platforms.

cache

Shared FetchContent cache directory resolution.

Provides an OS-appropriate cache path for CMake FetchContent downloads so that multiple gen-dsp projects can share a single copy of fetched SDKs.

get_cache_dir

get_cache_dir() -> Path

Return the OS-appropriate shared cache directory for FetchContent.

  • macOS: ~/Library/Caches/gen-dsp/fetchcontent/
  • Linux: $XDG_CACHE_HOME/gen-dsp/fetchcontent/ (defaults to ~/.cache/)
  • Windows: %LOCALAPPDATA%/gen-dsp/fetchcontent/