From 9f11b6501b94473624e8241005bced76899870a4 Mon Sep 17 00:00:00 2001 From: Nick Renieris Date: Thu, 4 Oct 2018 03:15:16 +0300 Subject: [cmake/README] Move generic CMake build instructions Move them a directory above. Makes them more visible, they don't need to be in /addons. --- cmake/README.md | 20 ++++++++++++++++++++ cmake/addons/README.md | 22 ++-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) (limited to 'cmake') diff --git a/cmake/README.md b/cmake/README.md index 8637da6031..2febe483dd 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -21,6 +21,26 @@ cmake ... -DENABLE_VAAPI=ON -DENABLE_VDPAU=OFF ... Unfortunately, Kodi's CMake gazillion options are not fully documented yet. For more information and an updated list of options, please check the main **[CMakeLists.txt](../CMakeLists.txt)**. +## Buildsystem variables +The buildsystem uses the following variables (which can be passed into it when executing cmake with the -D`=` format) to manipulate the build process (see READMEs in sub-directories for additional variables): +- `CMAKE_BUILD_TYPE` specifies the type of the build. This can be either *Debug* or *Release* (default is *Release*) +- `CMAKE_TOOLCHAIN_FILE` can be used to pass a toolchain file +- `ARCH_DEFINES` specifies the platform-specific C/C++ preprocessor defines (defaults to empty) + +## Building +To trigger the cmake-based buildsystem the following command must be executed with `` set to this directory (absolute or relative) allowing for in-source and out-of-source builds + +`cmake -G ` + +CMake supports multiple generators. See [here] (https://cmake.org/cmake/help/v3.1/manual/cmake-generators.7.html) for a list. + +In case of additional options the call might look like this: + +cmake `` [-G ``] \ + -DCMAKE_BUILD_TYPE=Release \ + -DARCH_DEFINES="-DTARGET_LINUX" \ + -DCMAKE_INSTALL_PREFIX="`=` format) to manipulate the build process: +The buildsystem uses the following addon-related variables (which can be passed into it when executing cmake with the -D`=` format) to manipulate the build process: - `ADDONS_TO_BUILD` has two variations, which are tested in order: - a quoted, space delimited list of `s` that you want to build (default is *all*) - a regular expression that every `` is matched against (e.g. `ADDONS_TO_BUILD="pvr.*"`) to build all pvr add-ons - `ADDONS_DEFINITION_DIR` points to the directory containing the definitions for the addons to be built - `ADDON_SRC_PREFIX` can be used to override the add-on repository location. It must point to the locally available parent directory of the add-on(s) to build. `` will be appended to this path automatically -- `CMAKE_BUILD_TYPE` specifies the type of the build. This can be either *Debug* or *Release* (default is *Release*) - `CMAKE_INSTALL_PREFIX` points to the directory where the built add-ons and their additional files (addon.xml, resources, ...) will be installed to (defaults to ``) -- `CMAKE_TOOLCHAIN_FILE` can be used to pass a toolchain file into the add-on builds - `ADDON_DEPENDS_PATH` points to the directory containing the *include* and *lib* directories of the add-ons' dependencies. - `CORE_SOURCE_DIR` points to the root directory of the project (default is the absolute representation of ../../.. starting from this directory) - `BUILD_DIR` points to the directory where the add-ons and their dependencies will be downloaded and built - `PACKAGE_ZIP=ON` means that the add-ons will be 'packaged' into a common folder, rather than being placed in `/lib/kodi/addons` and `/share/kodi/addons` - `PACKAGE_DIR` points to the directory where the ZIP archived add-ons will be stored after they have been packaged (defaults to `/zips`) -- `ARCH_DEFINES` specifies the platform-specific C/C++ preprocessor defines (defaults to empty) - `ADDON_TARBALL_CACHING` specifies whether downloaded add-on source tarballs should be cached or not (defaults to *ON*) ## Deprecated buildsystem variables @@ -47,19 +44,4 @@ Buildsystem will print a warning if you use any of the below-listed variables. F ## Building The buildsystem makes some assumptions about the environment which must be met by whoever uses it: -- Any dependencies of the add-ons must already be built and their include and library files must be present in the path pointed to by `` (in *include* and *lib* sub-directories) - -To trigger the cmake-based buildsystem the following command must be executed with `` set to this directory (absolute or relative) allowing for in-source and out-of-source builds - -`cmake -G ` - -CMake supports multiple generators. See [here] (https://cmake.org/cmake/help/v3.1/manual/cmake-generators.7.html) for a list. - -In case of additional options the call might look like this: - -cmake `` [-G ``] \ - -DCMAKE_BUILD_TYPE=Release \ - -DCORE_SOURCE_DIR="``" \ - -DARCH_DEFINES="-DTARGET_LINUX" \ - -DADDON_DEPENDS_PATH=`` \ - -DCMAKE_INSTALL_PREFIX="`` (in *include* and *lib* sub-directories) \ No newline at end of file -- cgit v1.2.3