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" 0069 UNPORTED REQUIRES KEXI_CORE_APP) 0070 0071 ############################################# 0072 #### Product set definitions #### 0073 ############################################# 0074 0075 # For defining new productsets see end of this file, 0076 # "How to add another productset?" 0077 0078 # (products sets are defined in cmake/productsets/*.cmake files) 0079 0080 # How to add another product? 0081 # =========================== 0082 # 0083 # 1. Define the product by a call of calligra_define_product, 0084 # e.g. 0085 # 0086 # calligra_define_product(MYPRODUCT "title of product") 0087 # 0088 # For the product id use a proper prefix (LIB_, PLUGIN_, FILTER_, APP_, PART_, 0089 # ...), whatever is appropriate. 0090 # 0091 # 2. Extend that call with a REQUIRES argument section, if the product has 0092 # hard internal build-time dependencies on other products or features. 0093 # Products/features that are listed as dependencies have to be defined before 0094 # (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake) 0095 # E.g. 0096 # 0097 # calligra_define_product(MYPRODUCT "title of product" REQUIRES P1 P2) 0098 # 0099 # 3. Add a rule when to not build the product, in the section "Detect which 0100 # products/features can be compiled" of the toplevel CMakeLists.txt. Each 0101 # product should have their own boolean expression when to set the build flag 0102 # to FALSE, e.g. 0103 # 0104 # if (PLATFORMX OR NOT EXTERNAL_DEP_X_FOUND) 0105 # set(SHOULD_BUILD_MYPRODUCT FALSE) 0106 # endif () 0107 # 0108 # 4. Wrap everything belonging to the product with the build flag of the product. 0109 # Ideally this is done around subdirectory inclusions, results in easier code. 0110 # e.g. 0111 # 0112 # if (SHOULD_BUILD_MYPRODUCT) 0113 # add_subdirectory(myproduct) 0114 # endif () 0115 # 0116 # 5. Tag the product as STAGING, if it is not yet ready for release, but already 0117 # integrated in the master branch, e.g. 0118 # 0119 # calligra_define_product(MYPRODUCT "title of product" STAGING REQUIRES P1) 0120 # 0121 # 6. Add the product to all products, features and product sets which have this 0122 # product as REQUIRED or OPTIONAL dependency. 0123 # 0124 # 0125 # How to add another feature? 0126 # =========================== 0127 # 0128 # 1. Define the feature by a call of calligra_define_feature, 0129 # e.g. 0130 # 0131 # calligra_define_feature(MYFEATURE "title of feature") 0132 # 0133 # For the feature id use a proper prefix (FEATURE_, ...), whatever is 0134 # appropriate. 0135 # 0136 # 2. Extend that call with a REQUIRES argument section, if the feature has 0137 # hard internal build-time dependencies on other products or features. 0138 # Products or features that are listed as dependencies have to be defined 0139 # before 0140 # (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake) 0141 # E.g. 0142 # 0143 # calligra_define_feature(MYFEATURE "title of feature" REQUIRES P1 F1) 0144 # 0145 # 3. Add a rule when to not build the feature, in the section "Detect which 0146 # products/features can be compiled" of the toplevel CMakeLists.txt. Each 0147 # feature should have their own boolean expression when to set the build flag 0148 # to FALSE, e.g. 0149 # 0150 # if (PLATFORMX OR NOT EXTERNAL_DEP_X_FOUND) 0151 # set(SHOULD_BUILD_MYFEATURE FALSE) 0152 # endif () 0153 # 0154 # 4. Wrap everything belonging to the feature with the build flag of the feature. 0155 # Ideally this is done around subdirectory inclusions, results in easier code. 0156 # e.g. 0157 # 0158 # if (SHOULD_BUILD_MYFEATURE) 0159 # add_subdirectory(myproduct) 0160 # endif () 0161 # 0162 # 5. Tag the feature as STAGING, if it is not yet ready for release, but already 0163 # integrated in the master branch, e.g. 0164 # 0165 # calligra_define_product(MYFEATURE "title of feature" STAGING REQUIRES P1 F1) 0166 # 0167 # 6. Add the feature to all products, features and product sets which have this 0168 # product as REQUIRED or OPTIONAL dependency. 0169 # 0170 # 0171 # How to add another productset? 0172 # ============================== 0173 # 0174 # There are two possible places to put a productset definition. The first is to 0175 # add it to this file, which should be done for more generic sets that are 0176 # useful for many people. The second is a file of its own, in the directory 0177 # "cmake/productsets", which should be done for more special ones or for those 0178 # which should not be added to the repository. 0179 # The file must be named with the name of the productset in lowercase and have 0180 # the extension ".cmake". 0181 # 0182 # 1. Define the productset by a call of calligra_define_productset, 0183 # e.g. 0184 # 0185 # calligra_define_productset(MYPRODUCTSET "title of productset") 0186 # 0187 # 2. Extend that call with REQUIRES or OPTIONAL argument sections, if the productset 0188 # has hard or soft internal dependencies on other products, features or 0189 # productsets. 0190 # Products, features or productsets that are listed as dependencies have to 0191 # be defined before 0192 # (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake) 0193 # E.g. 0194 # 0195 # calligra_define_productset(MYPRODUCT "title of product" 0196 # REQUIRES P1 P2 F1 PS1 0197 # OPTIONAL P3 F2 PS2) 0198 # 0199 # 3. Add the productset to all product sets which have this product set as 0200 # REQUIRED or OPTIONAL dependency. 0201 # 0202 # Example for a file-based productset definition: 0203 # You want a productset "MYWORDS". For that you add a file named 0204 # "mywords.cmake" into the directory "cmake/productsets", with the content: 0205 # --- 8< --- 0206 # calligra_define_productset(MYWORDS "My Words" 0207 # REQUIRES 0208 # APP_WORDS 0209 # PLUGIN_DEFAULTTOOLS 0210 # PLUGIN_DOCKERS 0211 # PLUGIN_PATHSHAPES 0212 # PLUGIN_VARIABLES 0213 # PLUGIN_TEXTSHAPE 0214 # PLUGIN_PLUGINSHAPE 0215 # PLUGIN_FORMULASHAPE 0216 # ) 0217 # --- 8< ---