Parameters

The same CMake project will build targets with different language bridge and different platform specific code (if any). Use Scapix project parameters to configure build target:

  • SCAPIX_BRIDGE - bridge language to use: cpp, java, objc, python. Default: cpp. Value ‘cpp’ means there is no language bridge - use this on platforms where platform specific part of your project (UI) is also written in C++ (for example: Win32 API on Windows).
  • SCAPIX_PLATFORM (optional) - one of the folders inside source/<project>/platform/: ios, android, macos, windows, linux, etc. Default: generic.
  • SCAPIX_JAVA_API (optional) - one of the folders inside scapix/java_api/: jdk-11.0.2, android-28, etc. Default: jdk-11.0.2. You can generate additional java_api C++ headers from any (compiled) java code using scapix_java utility.

Only SCAPIX_BRIDGE parameter is required, the other parameters simplify writing platform dependent code inside shared C++ code base, but this isn’t necessary in many applications.

Example CMake invocations:

$ cmake -DSCAPIX_BRIDGE=objc -DSCAPIX_PLATFORM=ios
$ cmake -DSCAPIX_BRIDGE=java -DSCAPIX_PLATFORM=android -DSCAPIX_JAVA_API=android-28