apothecary of openFrameworks https://github.com/openframeworks/openframeworks/

August 15, 2026 · View on GitHub

build-vs2022-64 build-macos build-ios build-android build-emscripten

apothecary is the openFrameworks library apothecary — a Bash/CMake/Make build system that downloads, builds, and packages the C/C++ library dependencies ("potions") openFrameworks needs, on every platform it supports.

Each library has its own formula script that abstracts the download, prepare, build, copy, and clean steps, inspired by Homebrew. The main apothecary engine reads a formula, runs the right steps for your target platform/architecture, and drops the result in the right place. This means library binaries don't need to live in the OF core repo — anyone building from git just runs apothecary once to produce them.

./apo update core

or, using the underlying engine directly:

./apothecary/apothecary -t ios -a arm64 update core

Libraries

Core OF formulas currently in apothecary/formulas, with the version each currently pins:

angle, assimp, boost, brotli, cairo, curl, dawn, fmod, fmodex, fmt, FreeImage, freetype, glew, glon12, glfw, glm, gstreamer, json, kiss, libpng, libssh2, libusb, libxml2, metalangle, opencv, openssl, pixman, poco, portaudio, pugixml, rtAudio, shaderc, svgtiny, tess2, uriparser, utf8, videoInput, zlib

Run ./apo formulas (or apothecary/apothecary -h) to list what's available in your checkout — this list (and the versions) changes as formulas are updated.

Automation

Libraries are built on GitHub Actions and published with .pkg hashes alongside each release.

  • Bleeding (latest openFrameworks): releases/tag/bleeding — fetched in openFrameworks via scripts/<platform>/download_latest_libs.sh
  • Nightly (stable openFrameworks 0.12): releases/tag/nightly — fetched in openFrameworks via scripts/<platform>/download_libs.sh

Build status

PlatformStatusInfoExtra Info
Windows x86_64 (VS2022)build-vs2022-64VS2022C++2b, C17
Windows x86_64 (VS2026)build-vs2026-64VS2026C++2b, C17
Windows arm64build-vs2022-arm64VS2022C++2b, C17
Windows arm64ECbuild-vs2022-arm64ecVS2022C++2b, C17
Windows (MSYS2)build-msys2MINGW32/64C++2b, C17
Linux x86_64build-linuxMake, VSCodeC++2b, C17, Package Manager
Linux arm64 (cross)build-linux-crossMakeC++2b, C17, Package Manager
Linux armv6 / armv7 (RPi)build-linux-rpiMakeC++2b, C17, Package Manager
macOS x86_64 / arm64build-macosXcode, VSCode.xcFrameworks, C++2b, C17
macOS Catalyst arm64 / x86_64build-macosXcode, VSCode.xcFrameworks, C++2b
xcframeworksbuild-xcframeworksXcode, VSCode.xcFrameworks, C++2b, C17
iOS arm64 / Simulatorbuild-iosXcode, VSCode.xcFrameworks, C++2b
tvOS arm64 / Simulatorbuild-tvosXcode, VSCode.xcFrameworks, C++2b
visionOS (xrOS) arm64 / Simulatorbuild-xrosXcode, VSCode.xcFrameworks, C++2b
watchOS arm64 / Simulatorbuild-watchosXcode, VSCode.xcFrameworks, C++2b
emscripten / memory64build-emscriptenMakeC++17, C17
Android arm64 / armv7 / x86 / x86_64build-androidNDK 23, Android StudioCMake

Requirements

  • Bash shell environment with: curl, tar, unzip, patch, sed, make, automake
  • C/C++ compiler: gcc and/or llvm (macOS)
  • CMake
  • git
  • Xcode + iOS SDK (to build for iOS/tvOS/visionOS/watchOS)
  • Android SDK + NDK (to build for Android)

macOS and Linux ship with Bash already. On Windows:

Quick start

Paths below are relative to the base openFrameworks dir when used from an OF checkout.

LocationPath
Core OF formulasscripts/apothecary/formulas
Addon formulasaddons/ofxAddonName/scripts/formulas
Default build dirscripts/apothecary/build
Default core libs destlibs
# update a single core library
./apo update poco

# update all core libraries
./apo update core

# update an addon / all addons
./apo update ofxAssimpModelLoader
./apo update addons

# cross-compile for another platform
./apo -t ios update core          # or: TYPE=ios ./apo update core
./apo -t android -a arm64 update core

# see everything apothecary can do
./apo --help

./apo is the friendly CLI front-end (scripts/apo.sh) — use it for day-to-day and scripted/agent use (see scripts/AGENTS.md for the full non-interactive command contract). It wraps the underlying engine at apothecary/apothecary, which you can also call directly with the classic flag syntax:

./apothecary/apothecary -t osx -a arm64 -j 6 update opencv

Commands

CommandDescription
updatedownload, build, and copy library files
downloaddownload the library source
buildbuild the library
prepareprepare the library source for building
copycopy library files into the libs dir
cleanclean the library build
removeremove the library from the build cache
remove-libremove the library from the libs dir
remove-allremove the library from the build cache and libs dir

Options

OptionDescription
-tbuild type: osx, macos, ios, tvos, xros, watchos, catos, android, linux, vs, msys2, emscripten (auto-detected from host if omitted)
-aarchitecture, e.g. arm64, x86_64 (target-dependent)
-bbuild dir (default: $APOTHECARY_DIR/build)
-dcompiled libs destination dir (default: OF core libs dir, or addons/addonName/libs for addons)
-vverbose mode
-ggit mode — prefer git over source tarballs where possible
-sgit tag to select a custom library version (requires -g)
-husage help

All options must be given before the command.

Docker

For local testing without waiting on CI, prebuilt Dockerfiles for Linux, Android, and emscripten are in docker/.

Writing formulas

Start from apothecary/doc/formula_template.sh, which is fully commented, and look at an existing formula for the platform/build system you're targeting. Full documentation on the formula API, variables, dependencies, and conventions lives in apothecary/README.md.


2014 openFrameworks team 2013 Dan Wilcox <danomatika@gmail.com>, supported by the CMU Studio for Creative Inquiry 2024–2026 Dan Rosser