Function portal_install_game¶
Configures installation rules for a Portal Engine game executable with platform-specific runtime dependency handling.
This function sets up comprehensive installation rules for game executables, including the binary, runtime dependencies (DLLs/shared libraries), settings files, and resources. It handles platform-specific RPATH configuration and excludes system libraries appropriately.
Synopsis¶
portal_install_game(<target_name>)
Arguments¶
<target_name>Name of the game executable target to install.
Behavior¶
The function performs the following operations:
Executable Installation: Installs the target binary and creates a runtime dependency set for automatic dependency resolution.
Platform-Specific RPATH (Linux/macOS)
Runtime Dependency Installation
Settings File Installation: If the target has a
PORTAL_SETTINGS_PATHproperty, installssettings.jsonto the root installation directory.Resource Installation: Installs all resources from both
PORTAL_RESOURCES(added via portal_add_resources) andPORTAL_ADDITIONAL_RESOURCES(added via portal_fetch_resources) toresources/.
Installation Layout¶
The installed game directory structure:
install/
├── <executable> # Game binary (Windows/Linux)
├── <executable>.app/ # macOS bundle (if MAKE_STANDALONE)
├── settings.json # Settings file (if present)
├── lib/ # Shared libraries (Linux/macOS)
│ ├── libvulkan.so.1
│ └── ...
└── resources/ # Game resources
├── textures/
├── models/
└── ...
On Windows, DLLs are installed in the root alongside the executable.
Example Usage¶
Typically called internally by portal_add_game:
portal_install_game(my-game)
Install the game manually:
cmake --install build/ninja-multi --component my-game
Notes¶
This is an internal function typically called by portal_add_game
Uses CMake’s
RUNTIME_DEPENDENCY_SETfor automatic dependency discoveryResources from both
PORTAL_RESOURCESandPORTAL_ADDITIONAL_RESOURCESare installed
See Also¶
portal_add_game: Creates Portal Engine game executables
portal_package_game: Package game for distribution with CPack
portal_add_resources: Add local resources
portal_fetch_resources: Fetch resources from dependencies