3 This directory contains the cmake-based buildsystem for addons. It looks into
4 the "addons" sub-directory and parses all *.txt files. Each addon must have its
5 own <addon-id>.txt file which must follow the defined format:
6 <addon-id> <git-base-url> <git-revision>
8 * <addon-id> must be identical to the addon's ID as defined in the addon's
10 * <git-base-url> must be the base URL (i.e. the URL must not contain the name
11 of the git repository itself) of the git repository containing the addon.
12 The repository name of the addon must be <addon-id>.
13 * <git-revision> must be a valid git tag/branch/commit in the addon's git
14 repository which will be used for the build.
16 The buildsystem uses the following variables (which can be passed into it when
17 executing cmake with the -D<variable-name>=<value> option) to e.g. access
19 * ADDONS_TO_BUILD is a quoted, space delimited list of <addon-id>s that
20 you want to build (default is "all").
21 * CMAKE_BUILD_TYPE specifies the type of the build. This can be either "Debug"
22 or "Release" (default is "Release").
23 * CMAKE_INSTALL_PREFIX points to the directory where the built addons and their
24 additional files (addon.xml, resources ...) will be installed to (defaults
26 * CMAKE_TOOLCHAIN_FILE can be used to pass a toolchain file into the add-on
28 * DEPENDS_PATH points to the directory containing the "include" and "lib"
29 directories of the addons' dependencies.
30 * XBMCROOT points to the root directory of the xbmc project (default is the
31 absolute representation of ../../.. starting from this directory).
32 * PACKAGE_ZIP=1 will mean the add-ons will be 'packaged' into a common folder,
33 rather than being placed in <CMAKE_INSTALL_PREFIX>/lib/xbmc/addons and
34 <CMAKE_INSTALL_PREFIX>/share/xbmc/addons.
35 * ARCH_DEFINES specifies the platform-specific C/C++ preprocessor defines
38 The buildsystem makes some assumptions about the environment which must be met
40 * Any dependencies of the addons must already be built and their include and
41 library files must be present in the path pointed to by <CMAKE_PREFIX_PATH> (in
42 "include" and "lib" sub-directories).
44 To trigger the cmake-based buildsystem the following command must be executed
45 with <path> being the path to this directory (absolute or relative, allowing for
46 in-source and out-of-source builds).
48 cmake <path> -G <generator>
50 cmake supports multiple generators, see
51 http://www.cmake.org/cmake/help/v2.8.8/cmake.html#section_Generators for a list.
53 In case of additional options the call might look like this
55 cmake <path> [-G <generator>] \
56 -DCMAKE_BUILD_TYPE=Release \
57 -DXBMCROOT="<path-to-xbmc-root>" \
58 -DARCH_DEFINES="-DTARGET_LINUX" \
59 -DDEPENDS_PATH="<path-to-built-depends>" \
60 -DCMAKE_INSTALL_PREFIX="<path-to-install-directory"