clickable.json Format

Example:

{
    "template": "cmake",
    "scripts": {
        "test": "make test"
    },
    "dependencies": [
        "libpoppler-qt5-dev"
    ]
}

clickable_minimum_required

Optional, a minimum Clickable version number required to build the project. Ex: "4" or "5.4.0"

arch

Optional, the default is armhf. You may also specify this as a cli arg (ex: --arch="armhf")

prebuild

Optional, a custom command to run before a build.

template

Optional, see build template for the full list of options. If left blank the template will be auto detected.

build

Optional, a custom command to run instead of the default build. If using the custom template this is required.

postbuild

Optional, a custom command to execute after build and before click build.

launch

Optional, a custom command to launch the app.

dir

Optional, a custom build directory. Defaults to ./build/

kill

Optional, a custom process name to kill (useful for killing the running app, then relaunching it). If left blank the process name will be assumed.

scripts

Optional, an object detailing custom commands to run. For example:

{
    "test": "make test",
    "echo": "echo Hello World"
}

lxd

Optional, whether or not to use a lxd container to build the app. Default is to use docker to build the app. LXD is deprecated and its support will be removed in a future version of clickable.

default

Optional, a list of space separated sub-commands to run when no sub-commands are specified. Defaults to clean build click-build install launch.

dependencies

Optional, a list of dependencies that will be installed in the build container. These will be assumed to be dependencie:arch unless specificDependencies is set to true.

docker_image

Optional, the name of a docker image to use. When building a custom docker image it’s recommended to use one of the Clickable images as a base. You can find them on Docker Hub.

ignore

Optional, a list of files to ignore when building a pure template Example:

"ignore": [
    ".clickable",
    ".git",
    ".gitignore",
    ".gitmodules"
]

make_jobs

Optional, the number of jobs to use when running make, equivalent to make’s -j option. If left blank this defaults to the number of cpus your computer has.

gopath

Optional, the gopath on the host machine. If left blank, the GOPATH env var will be used.

cargo_home

Optional, the Cargo home path (usually ~/.cargo) on the host machine. If left blank, the CARGO_HOME env var will be used.

build_args

Optional, arguments to pass to qmake or cmake. When using –debug-build, CONFIG+=debug is appended for qmake and -DCMAKE_BUILD_TYPE=Debug for cmake builds. Ex: CONFIG+=ubuntu

make_args

Optional, arguments to pass to make, e.g. a target name. To avoid configuration conflicts, the number of make jobs should not be specified here, but by the make_jobs param instead.

dirty

Optional, whether or not do a dirty build, avoiding to clean the build directory before building. You may also specify this as a cli arg (--dirty). The default is False.

libraries

Optional, libraries to be build in the docker container by calling clickable build-libs. It’s a list of dictionaries basically looking like the clickable.json itself. Example:

"libraries": [
    {
        "name": "opencv",
        "template": "cmake",
        "make_jobs": "4",
        "build_args": "-DCMAKE_BUILD_TYPE=Release -DBUILD_LIST=core,imgproc,highgui,imgcodecs -DBUILD_SHARED_LIBS=OFF",
        "prebuild": "git submodule update --init --recursive"
    }
]

The keywords prebuild, build, postbuild, postmake, make_jobs, docker_image, build_args, dependencies and specificDependencies can be used for a library the same way as described above for the app. The libraries are compiled for the same architecture as specified for the app itself.

template

Required, but only cmake, qmake and custom are allowed.

name

Required, name of the library, which is used to set source dir (src_dir) and build dir (dir), if not specified explicitly. A single library can be build by specifying its name as clickable build-libs lib1 to build the library with the name lib1.

src_dir

Optional, library source directory. Must be relative to the project root. If not specified it defaults to libs/<name>

dir

Optional, library build directory. Must be relative to the project root. If not specified it defaults to build/<name>. The architecture triplet is appended, so that builds for different architectures can exist in parallel (arm-linux-gnueabihf for armhf and x86_64-linux-gnu for amd64).