Warning, /office/kexi/KexiProducts.cmake is written in an unsupported language. File is not indexed.
0001 ### DEFINITION OF PRODUCTS, FEATURES AND PRODUCTSETS 0002 #################################################### 0003 0004 # When building Kexi a lot of different things are created and installed. To 0005 # describe them and their internal dependencies the concepts of "product", 0006 # "feature" and "product set" are used. 0007 0008 # A "product" is the smallest functional unit which can be created in the build 0009 # and which is useful on its own when installed. Examples are e.g. libraries, 0010 # plugins or executables. Products have external and internal required 0011 # dependencies at build-time. Internal dependencies are noted in terms of other 0012 # products or features (see below) and could be e.g. other libraries to link 0013 # against or build tools needed to generate source files. 0014 # A product gets defined by setting an identifier, a descriptive fullname and 0015 # the needed internal build-time requirements. Any other product or feature 0016 # listed as requirement must have been defined before. 0017 0018 # A "feature" is not a standalone product, but adds abilities to one or multiple 0019 # given products. One examples is e.g. scriptability. Features have external and 0020 # internal required dependencies at build-time. Internal dependencies are noted 0021 # in terms of other products or features and could be e.g. other libraries to 0022 # link against or build tools needed to generate source files. 0023 # A feature gets defined by setting an identifier, a descriptive fullname and 0024 # the needed internal build-time requirements. Any other product or feature 0025 # listed as requirement must have been defined before. 0026 0027 # A "productset" is a selection of products and features which should be build 0028 # together. The products and features can be either essential or optional to the 0029 # set. If essential (REQUIRES), the whole productset will not be build if a 0030 # product or feature is missing another internal or external dependency. If 0031 # optional (OPTIONAL), the rest of the set will still be build in that case. 0032 # The products and features to include in a set can be listed directly or 0033 # indirectly: they can be named explicitly, but also by including other 0034 # productsets in a set, whose products and features will then be part of the 0035 # first set as well. 0036 # Products, features and productsets can be listed as dependencies in multiple 0037 # product sets. As with dependencies for products or features, they must have 0038 # been defined before. 0039 0040 # Products, features and product sets are in the same namespace, so a given 0041 # identifier can be only used either for a product or for a feature or for a 0042 # product set. 0043 0044 # The ids of products and features (but not sets) are used to generate cmake 0045 # variables SHOULD_BUILD_${ID}, which then are used to control what is build and 0046 # how. 0047 0048 0049 ############################################# 0050 #### Product definitions #### 0051 ############################################# 0052 0053 # For defining new products see end of this file, "How to add another product?" 0054 0055 # IDEA: also add headers/sdk for all the libs ("_DEVEL"?) 0056 # IDEA: note external deps for products, so they are only checked if needed 0057 # There can be required or optional external deps, required will also result 0058 # in automatic disabling of product building 0059 # TODO: some products have multiple optional requirements, but need at least one. 0060 # See APP_CONVERTER, FILEMANAGER_* 0061 0062 # products 0063 calligra_define_product(KEXI_CORE_APP "Kexi core app" REQUIRES) 0064 calligra_define_product(KEXI_DESKTOP_APP "Kexi for desktop" REQUIRES KEXI_CORE_APP) 0065 calligra_define_product(KEXI_MOBILE_APP "Kexi for mobile" REQUIRES KEXI_CORE_APP) 0066 0067 # more plugins 0068 calligra_define_product(PLUGIN_KEXI_SPREADSHEETMIGRATION "Import from ODS plugin for Kexi" UNPORTED REQUIRES KEXI_CORE_APP) 0069 0070 ############################################# 0071 #### Product set definitions #### 0072 ############################################# 0073 0074 # For defining new productsets see end of this file, 0075 # "How to add another productset?" 0076 0077 # (products sets are defined in cmake/productsets/*.cmake files) 0078 0079 # How to add another product? 0080 # =========================== 0081 # 0082 # 1. Define the product by a call of calligra_define_product, 0083 # e.g. 0084 # 0085 # calligra_define_product(MYPRODUCT "title of product") 0086 # 0087 # For the product id use a proper prefix (LIB_, PLUGIN_, FILTER_, APP_, PART_, 0088 # ...), whatever is appropriate. 0089 # 0090 # 2. Extend that call with a REQUIRES argument section, if the product has 0091 # hard internal build-time dependencies on other products or features. 0092 # Products/features that are listed as dependencies have to be defined before 0093 # (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake) 0094 # E.g. 0095 # 0096 # calligra_define_product(MYPRODUCT "title of product" REQUIRES P1 P2) 0097 # 0098 # 3. Add a rule when to not build the product, in the section "Detect which 0099 # products/features can be compiled" of the toplevel CMakeLists.txt. Each 0100 # product should have their own boolean expression when to set the build flag 0101 # to FALSE, e.g. 0102 # 0103 # if (PLATFORMX OR NOT EXTERNAL_DEP_X_FOUND) 0104 # set(SHOULD_BUILD_MYPRODUCT FALSE) 0105 # endif () 0106 # 0107 # 4. Wrap everything belonging to the product with the build flag of the product. 0108 # Ideally this is done around subdirectory inclusions, results in easier code. 0109 # e.g. 0110 # 0111 # if (SHOULD_BUILD_MYPRODUCT) 0112 # add_subdirectory(myproduct) 0113 # endif () 0114 # 0115 # 5. Tag the product as STAGING, if it is not yet ready for release, but already 0116 # integrated in the master branch, e.g. 0117 # 0118 # calligra_define_product(MYPRODUCT "title of product" STAGING REQUIRES P1) 0119 # 0120 # 6. Add the product to all products, features and product sets which have this 0121 # product as REQUIRED or OPTIONAL dependency. 0122 # 0123 # 0124 # How to add another feature? 0125 # =========================== 0126 # 0127 # 1. Define the feature by a call of calligra_define_feature, 0128 # e.g. 0129 # 0130 # calligra_define_feature(MYFEATURE "title of feature") 0131 # 0132 # For the feature id use a proper prefix (FEATURE_, ...), whatever is 0133 # appropriate. 0134 # 0135 # 2. Extend that call with a REQUIRES argument section, if the feature has 0136 # hard internal build-time dependencies on other products or features. 0137 # Products or features that are listed as dependencies have to be defined 0138 # before 0139 # (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake) 0140 # E.g. 0141 # 0142 # calligra_define_feature(MYFEATURE "title of feature" REQUIRES P1 F1) 0143 # 0144 # 3. Add a rule when to not build the feature, in the section "Detect which 0145 # products/features can be compiled" of the toplevel CMakeLists.txt. Each 0146 # feature should have their own boolean expression when to set the build flag 0147 # to FALSE, e.g. 0148 # 0149 # if (PLATFORMX OR NOT EXTERNAL_DEP_X_FOUND) 0150 # set(SHOULD_BUILD_MYFEATURE FALSE) 0151 # endif () 0152 # 0153 # 4. Wrap everything belonging to the feature with the build flag of the feature. 0154 # Ideally this is done around subdirectory inclusions, results in easier code. 0155 # e.g. 0156 # 0157 # if (SHOULD_BUILD_MYFEATURE) 0158 # add_subdirectory(myproduct) 0159 # endif () 0160 # 0161 # 5. Tag the feature as STAGING, if it is not yet ready for release, but already 0162 # integrated in the master branch, e.g. 0163 # 0164 # calligra_define_product(MYFEATURE "title of feature" STAGING REQUIRES P1 F1) 0165 # 0166 # 6. Add the feature to all products, features and product sets which have this 0167 # product as REQUIRED or OPTIONAL dependency. 0168 # 0169 # 0170 # How to add another productset? 0171 # ============================== 0172 # 0173 # There are two possible places to put a productset definition. The first is to 0174 # add it to this file, which should be done for more generic sets that are 0175 # useful for many people. The second is a file of its own, in the directory 0176 # "cmake/productsets", which should be done for more special ones or for those 0177 # which should not be added to the repository. 0178 # The file must be named with the name of the productset in lowercase and have 0179 # the extension ".cmake". 0180 # 0181 # 1. Define the productset by a call of calligra_define_productset, 0182 # e.g. 0183 # 0184 # calligra_define_productset(MYPRODUCTSET "title of productset") 0185 # 0186 # 2. Extend that call with REQUIRES or OPTIONAL argument sections, if the productset 0187 # has hard or soft internal dependencies on other products, features or 0188 # productsets. 0189 # Products, features or productsets that are listed as dependencies have to 0190 # be defined before 0191 # (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake) 0192 # E.g. 0193 # 0194 # calligra_define_productset(MYPRODUCT "title of product" 0195 # REQUIRES P1 P2 F1 PS1 0196 # OPTIONAL P3 F2 PS2) 0197 # 0198 # 3. Add the productset to all product sets which have this product set as 0199 # REQUIRED or OPTIONAL dependency. 0200 # 0201 # Example for a file-based productset definition: 0202 # You want a productset "MYWORDS". For that you add a file named 0203 # "mywords.cmake" into the directory "cmake/productsets", with the content: 0204 # --- 8< --- 0205 # calligra_define_productset(MYWORDS "My Words" 0206 # REQUIRES 0207 # APP_WORDS 0208 # PLUGIN_DEFAULTTOOLS 0209 # PLUGIN_DOCKERS 0210 # PLUGIN_PATHSHAPES 0211 # PLUGIN_VARIABLES 0212 # PLUGIN_TEXTSHAPE 0213 # PLUGIN_PLUGINSHAPE 0214 # PLUGIN_FORMULASHAPE 0215 # ) 0216 # --- 8< ---