-
-
Notifications
You must be signed in to change notification settings - Fork 168
Libraries
Libraries have to be added in your project's khafile.js:
project.addLibrary("Kha2D");
project.addLibrary("zui");
Khamake will then search for these libraries in a folder inside of your project and in your local haxelib installation. When a specific library exists in both places, the library in the local subdirectory will be preferred.
By default the local folder is Libraries
. You can use project.localLibraryPath
to set a different one before adding your libraries.
project.localLibraryPath = 'libs';
A library has it's own Sources folder where you can place Haxe sources. When your project also contains assets, it additionally needs a khafile.js (that is then merged with the project's khafile.js). When your project also contains native code, it needs a kincfile.js file.
A minimal example library that will bring up a sharing dialog on iOS/Android is available here.
Some of these are ported from existing Haxe solutions(see repositories), some are made from scratch. A single library always aims to provide support for as much targets as possible while keeping the interface similar.
- Introduction
- Getting Started
- Breaking Changes
- FAQ
- System targets
- Graphics targets
- Documentation
- API package descriptions