Djinni requires the Java Development Kit.
cmake, autogen, autoconf, automake, autogen
- Download and build [email protected]:Loki/superglue-wrap.git
- Copy config.json.example to config.json and modify it to your needs.
- Execute: superglue init
- Execute: superglue external [debug | release]
To update djinni:
- Execute: git subtree pull --prefix djinni [email protected]:dropbox/djinni.git master --squash
To update kitty:
- Execute: git subtree pull --prefix kitty [email protected]:loki-47-6F-64/kitty.git master --squash
- Add a breakpoint at the start of the app.
- Start the app in debug mode.
- Execute: superglue gdb
- Add dependencies: libc++.dylib, Any libs in "$(PROJECT_DIR)/superglue/libs"
- Add search header: "$(PROJECT_DIR)/superglue/include"
In BuildExternal.cmake, simply add include(Module[Name]) Superglue will automatically install the modules in the root folder of your project.
If modules contain views, simply start that view, the module will handle the rest.
in settings.gradle, simply add all modules installed in your root directory.
Add a reference to 'superglue/[ModuleName]/xcodeproj/[ModuleName].xcodeproj' The README.md will specify what must be added in:
- info.plist
- Libraries and frameworks
- Module specific instructions.
- iOS lacks support for Thread Local Storage.
- Android lacks support for std::to_string.
- Generate project files using superglue.
- Open the project in XCode.
- Build using superglue
- Use KDevelop or Clion, they support cmake based project natively.
- Build using superglue
root
cmake <- [Contains cmake files for including the modules]
patch <- [Contains any patches for third party libraries]
djinni <- [The tool to create the glue between c++ and java/objc]
jni <- [Building and installing the layer between superglue and android]
objc <- [Building and installing the layer between superglue and iOS]
src <- [Building superglue]
wrappers <- [Wrappers that simplify or enhance the interfaces for third party libraries]
modules <- [Android studio project, open this if you wish to change any code for modules for android]
superglue <- [Android Studio project where all java files generated by djinni get dumped]
[module] <- [Android Studio project for the module]
djinni <- [Contains any djinni files for the module]
native <- [Contains native code for the module]
xcodeproj <- [Xcode project for the module]
kitty <- [Library containing useful snippets of code]
android.cmake <- [Toolchain file]
iOS.cmake <- [Toolchain file]
run_djinni.sh <- [Script to run djinni]
These cmake files will automatically download and build third party libraries.
- [HEADER_INCLUDE_DIRS]
- [TARGET_LIBRARIES] <- [Any libraries build]
- [WRAPPER_SOURCES] <- [Any wrappers for the library]
Please check the documentation on the library you wish to include on how to build for android and iOS.
If the project is header-only, use DownloadHeaderOnlyDummy.cmake as a reference instead of DownloadDummy.cmake
- In the subfolder cmake copy DownloadDummy.cmake to Download[LIB].cmake
- Modify it to suit your needs.