1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
|
### DEFINITION OF PRODUCTS, FEATURES AND PRODUCTSETS
####################################################
# When building Kexi a lot of different things are created and installed. To
# describe them and their internal dependencies the concepts of "product",
# "feature" and "product set" are used.
# A "product" is the smallest functional unit which can be created in the build
# and which is useful on its own when installed. Examples are e.g. libraries,
# plugins or executables. Products have external and internal required
# dependencies at build-time. Internal dependencies are noted in terms of other
# products or features (see below) and could be e.g. other libraries to link
# against or build tools needed to generate source files.
# A product gets defined by setting an identifier, a descriptive fullname and
# the needed internal build-time requirements. Any other product or feature
# listed as requirement must have been defined before.
# A "feature" is not a standalone product, but adds abilities to one or multiple
# given products. One examples is e.g. scriptability. Features have external and
# internal required dependencies at build-time. Internal dependencies are noted
# in terms of other products or features and could be e.g. other libraries to
# link against or build tools needed to generate source files.
# A feature gets defined by setting an identifier, a descriptive fullname and
# the needed internal build-time requirements. Any other product or feature
# listed as requirement must have been defined before.
# A "productset" is a selection of products and features which should be build
# together. The products and features can be either essential or optional to the
# set. If essential (REQUIRES), the whole productset will not be build if a
# product or feature is missing another internal or external dependency. If
# optional (OPTIONAL), the rest of the set will still be build in that case.
# The products and features to include in a set can be listed directly or
# indirectly: they can be named explicitely, but also by including other
# productsets in a set, whose products and features will then be part of the
# first set as well.
# Products, features and productsets can be listed as dependencies in multiple
# product sets. As with dependencies for products or features, they must have
# been defined before.
# Products, features and product sets are in the same namespace, so a given
# identifier can be only used either for a product or for a feature or for a
# product set.
# The ids of products and features (but not sets) are used to generate cmake
# variables SHOULD_BUILD_${ID}, which then are used to control what is build and
# how.
#############################################
#### Product definitions ####
#############################################
# For defining new products see end of this file, "How to add another product?"
# IDEA: also add headers/sdk for all the libs ("_DEVEL"?)
# IDEA: note external deps for products, so they are only checked if needed
# There can be required or optional external deps, required will also result
# in automatic disabling of product building
# TODO: some products have multiple optional requirements, but need at least one.
# See APP_CONVERTER, FILEMANAGER_*
# products
calligra_define_product(KEXI_CORE_APP "Kexi core app" REQUIRES)
calligra_define_product(KEXI_DESKTOP_APP "Kexi for desktop" REQUIRES KEXI_CORE_APP)
calligra_define_product(KEXI_MOBILE_APP "Kexi for mobile" REQUIRES KEXI_CORE_APP)
# more plugins
calligra_define_product(PLUGIN_KEXI_SPREADSHEETMIGRATION "Import from ODS plugin for Kexi" UNPORTED REQUIRES KEXI_CORE_APP)
#############################################
#### Product set definitions ####
#############################################
# For defining new productsets see end of this file,
# "How to add another productset?"
# (products sets are defined in cmake/productsets/*.cmake files)
# How to add another product?
# ===========================
#
# 1. Define the product by a call of calligra_define_product,
# e.g.
#
# calligra_define_product(MYPRODUCT "title of product")
#
# For the product id use a proper prefix (LIB_, PLUGIN_, FILTER_, APP_, PART_,
# ...), whatever is appropriate.
#
# 2. Extend that call with a REQUIRES argument section, if the product has
# hard internal build-time dependencies on other products or features.
# Products/features that are listed as dependencies have to be defined before
# (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake)
# E.g.
#
# calligra_define_product(MYPRODUCT "title of product" REQUIRES P1 P2)
#
# 3. Add a rule when to not build the product, in the section "Detect which
# products/features can be compiled" of the toplevel CMakeLists.txt. Each
# product should have their own boolean expression when to set the build flag
# to FALSE, e.g.
#
# if (PLATFORMX OR NOT EXTERNAL_DEP_X_FOUND)
# set(SHOULD_BUILD_MYPRODUCT FALSE)
# endif ()
#
# 4. Wrap everything belonging to the product with the build flag of the product.
# Ideally this is done around subdirectory inclusions, results in easier code.
# e.g.
#
# if (SHOULD_BUILD_MYPRODUCT)
# add_subdirectory(myproduct)
# endif ()
#
# 5. Tag the product as STAGING, if it is not yet ready for release, but already
# integrated in the master branch, e.g.
#
# calligra_define_product(MYPRODUCT "title of product" STAGING REQUIRES P1)
#
# 6. Add the product to all products, features and product sets which have this
# product as REQUIRED or OPTIONAL dependency.
#
#
# How to add another feature?
# ===========================
#
# 1. Define the feature by a call of calligra_define_feature,
# e.g.
#
# calligra_define_feature(MYFEATURE "title of feature")
#
# For the feature id use a proper prefix (FEATURE_, ...), whatever is
# appropriate.
#
# 2. Extend that call with a REQUIRES argument section, if the feature has
# hard internal build-time dependencies on other products or features.
# Products or features that are listed as dependencies have to be defined
# before
# (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake)
# E.g.
#
# calligra_define_feature(MYFEATURE "title of feature" REQUIRES P1 F1)
#
# 3. Add a rule when to not build the feature, in the section "Detect which
# products/features can be compiled" of the toplevel CMakeLists.txt. Each
# feature should have their own boolean expression when to set the build flag
# to FALSE, e.g.
#
# if (PLATFORMX OR NOT EXTERNAL_DEP_X_FOUND)
# set(SHOULD_BUILD_MYFEATURE FALSE)
# endif ()
#
# 4. Wrap everything belonging to the feature with the build flag of the feature.
# Ideally this is done around subdirectory inclusions, results in easier code.
# e.g.
#
# if (SHOULD_BUILD_MYFEATURE)
# add_subdirectory(myproduct)
# endif ()
#
# 5. Tag the feature as STAGING, if it is not yet ready for release, but already
# integrated in the master branch, e.g.
#
# calligra_define_product(MYFEATURE "title of feature" STAGING REQUIRES P1 F1)
#
# 6. Add the feature to all products, features and product sets which have this
# product as REQUIRED or OPTIONAL dependency.
#
#
# How to add another productset?
# ==============================
#
# There are two possible places to put a productset definition. The first is to
# add it to this file, which should be done for more generic sets that are
# useful for many people. The second is a file of its own, in the directory
# "cmake/productsets", which should be done for more special ones or for those
# which should not be added to the repository.
# The file must be named with the name of the productset in lowercase and have
# the extension ".cmake".
#
# 1. Define the productset by a call of calligra_define_productset,
# e.g.
#
# calligra_define_productset(MYPRODUCTSET "title of productset")
#
# 2. Extend that call with REQUIRES or OPTIONAL argument sections, if the productset
# has hard or soft internal dependencies on other products, features or
# productsets.
# Products, features or productsets that are listed as dependencies have to
# be defined before
# (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake)
# E.g.
#
# calligra_define_productset(MYPRODUCT "title of product"
# REQUIRES P1 P2 F1 PS1
# OPTIONAL P3 F2 PS2)
#
# 3. Add the productset to all product sets which have this product set as
# REQUIRED or OPTIONAL dependency.
#
# Example for a file-based productset definition:
# You want a productset "MYWORDS". For that you add a file named
# "mywords.cmake" into the directory "cmake/productsets", with the content:
# --- 8< ---
# calligra_define_productset(MYWORDS "My Words"
# REQUIRES
# APP_WORDS
# PLUGIN_DEFAULTTOOLS
# PLUGIN_DOCKERS
# PLUGIN_PATHSHAPES
# PLUGIN_VARIABLES
# PLUGIN_TEXTSHAPE
# PLUGIN_PLUGINSHAPE
# PLUGIN_FORMULASHAPE
# )
# --- 8< ---
|