Install CMake projects as simple as:
cmake-easyinstall git+https://github.com/org/repo.git
curl -L -o cmake-easyinstall https://raw.githubusercontent.com/ax3l/cmake-easyinstall/main/cmake-easyinstall
chmod a+x cmake-easyinstall
cmake-easyinstall [--prefix=<dir>] git+<https-url>.git[@branch] [cmake-options]
Just export CEI_<option>=<value>
to change some defaults:
CEI_CMAKE
: path or alias for the cmake command (default:cmake
)CEI_CONFIG
: the build configuration (default:RelWithDebInfo
)CEI_PARALLEL
: maximum number of concurrent build processes (default:2
)CEI_PREFIX
: installation prefix (default: CMake default)CEI_SUDO
: set to"sudo"
for privileged installation (default: "")CEI_TMP
: build in a unique or fixed-location directory (default: a uniquemktemp
directory)
--prefix=<dir>
: installation prefix (default: CMake default)
Note: cmake-options
take precedence over --prefix
takes precedence over environment options.
- bash
- cmake 3.15.0+
- git
- ninja, make, or any other native build system