QPM is a package manager designed specifically for Quest/Beat Saber mods development. It streamlines the process of creating, sharing, and including dependencies in C++ projects.
-
Package Creation & Management: Create packages and manage dependencies between mods
-
Version Control: Handle package versions and their dependencies
-
Build Integration: Seamlessly integrate with build systems
-
NDK Management: Download and configure Android NDK for Quest development
-
qpm version updateUpdates qpm to a newer version -
qpm s/scripts buildScript system similar to NPM for configuring workspaces -
qpm ndk download/list/availableNDK management tooling -
qpm download cmake/ninjaSimplified build tool setup -
qpm doctorConfiguration diagnostics -
qpm templatrBuilt-in templating
Improvements over Qpm v1
qpm version updateUpdates qpm to a newer versionqpm s/scripts buildScript system similar to NPM for configuring workspacesqpm ndk download/list/availableNDK management toolingqpm download cmake/ninjaSimplified build tool setupqpm doctorConfiguration diagnosticsqpm templatrBuilt-in templating
# Change QPM cache location (useful for dev drives)
qpm config cache path
# Set up NDK
qpm ndk resolve -d # Auto-downloads and configures NDK# Check NDK configuration
qpm doctor
# List available NDK versions
qpm ndk available
# Download specific NDK version
qpm ndk download 26
# Pin project to NDK version
qpm ndk pin 26 --online
# List installed NDKs
qpm ndk list
# Auto-resolve NDK requirements
qpm ndk resolve -d # -d flag downloads if neededQPM locates the NDK using (in priority order):
- Project's
ndkpath.txtfile - Environment variables (
ANDROID_NDK_HOMEorANDROID_NDK_LATEST_HOME)
# Set custom NDK path
qpm config ndk-path <your-preferred-path>
# Use existing NDK (e.g., from Android Studio)
qpm config ndk-path <path-to-existing-ndk>Specify NDK requirements in qpm.json:
"workspace": {
"ndk": "^26.0.0"
}QPM generates these files during dependency resolution:
extern.cmake: Configures dependenciesqpm_defines.cmake: Sets up NDK paths and build variables
Include in your CMakeLists.txt:
include(${CMAKE_CURRENT_LIST_DIR}/qpm_defines.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/extern.cmake)If NDK paths aren't working:
- Run
qpm doctorto check configuration - Use
qpm ndk listto verify installed NDKs - Run
qpm ndk resolve -dto automatically fix issues
For CI environments:
# Option 1: Set environment variable
env:
ANDROID_NDK_HOME: /path/to/android-ndk
# Option 2: Automate setup in workflow
- name: Setup NDK
run: qpm ndk resolve -d