small rework of product sets: products, features and product sets

* split the old idea of a "product" into "product", "feature" and "productset"
* make no real difference between user-defined productsets and predefined ones
* move the definition of the products into a separate file, for better overview and discoverability
* put the documentation directly into that separate file instead of hiding it away in some README in some subdirectory noones knows about
* generate a file product_deps.dot with the graph of the dependencies, showing also the build state (in DOT notation, see attached SVG file generated from that)
* more patterns for the ids of the products
* allow to have multiple productsets/products/features mentioned in the -DPRODUCTSET flag

CCMAIL: calligra-devel@kde.org

REVIEW: 118510
Thanks boud, jstaniek, ingwa for review
parent 26930e37
This diff is collapsed.
This diff is collapsed.
This directory stores the productsets.
This directory stores additional productsets.
When building Calligra a lot of different things are created and installed.
All these things are grouped into so-called products. Each product is defined in
the toplevel CMakeList.txt by a call of calligra_define_product, with the id of
the product as first parameter.
These product ids are used to generate cmake variables SHOULD_BUILD_${PRODUCT_ID}
which then are used to control if the things belonging to the product are build,
usually with
if(SHOULD_BUILD_SOME_PRODUCT_ID)
[...]
endif(SHOULD_BUILD_SOME_PRODUCT_ID)
.
Dependencies of products on other products are also defined. Using this information
it is also ensured that if an internal dependency cannot be built due to missing
external dependencies, all depending products will also not built.
There can be also meta-products, which simply require a certain set of other
products but are never used directly to control what is build (e.g. WORDS).
At time of writing there are 4 predefined product sets, which you can all see in
this directory: ALL (default), DESKTOP, ACTIVE, CREATIVE.
You can add your own productset by adding a file in this directory and selecting
that productset when calling cmake
How to add my own product set?
==============================
The file must be named with the name of the productset in lowercase and have
the extension ".cmake". The content should be a cmake command that sets the
variable "CALLIGRA_SHOULD_BUILD_PRODUCTS" to the list of products the productset
should consist of.
For the possible products have a look at the list of product definitions in the
toplevel "CMakeLists.txt" file.
Example:
You want a productset "PUREWORDS". For that you add a file name "purewords.cmake"
into this directory, with the content:
--- 8< ---
set( CALLIGRA_SHOULD_BUILD_PRODUCTS
WORDS
)
--- 8< ---
When calling cmake you use the string "PUREWORDS" as value for the parameter
"PRODUCTSET, like this:
cmake -DPRODUCTSET=PUREWORDS [other parameters]
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_, ...) or
postfix (_APP, _PART, ...), whatever is appropriate.
2. Extend that call with NEEDS or WANTS argument sections, if the product has
hard or soft internal dependencies on other products
Products 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" NEEDS P1 P2 WANTS P3)
3. Add a rule when to not build the product, in the section "Detect which
products can be compile" 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 (PLATFORMX OR NOT EXTERNAL_DEP_X_FOUND)
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 (SHOULD_BUILD_MYPRODUCT)
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 NEEDS P1)
Please read the explanation in the toplevel file "CalligraProducts.cmake".
#defines the set of products commonly wanted for Calligra Active
set( CALLIGRA_SHOULD_BUILD_PRODUCTS
ACTIVE
# extras
EXTRA_PROPERTIES
EXTRA_THUMBNAIL
# plugins
PLUGIN_DEFAULTTOOLS
PLUGIN_PATHSHAPES
PLUGIN_VARIABLES
PLUGIN_CHARTSHAPE
PLUGIN_PICTURESHAPE
PLUGIN_TEXTSHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_FORMULASHAPE
PLUGIN_VECTORSHAPE
PLUGIN_VIDEOSHAPE
# filters
FILTER_SHEETS_IMPORT
FILTER_STAGE_IMPORT
FILTER_WORDS_IMPORT
)
#defines the set of products commonly wanted if everything should be build
set( CALLIGRA_SHOULD_BUILD_PRODUCTS
# desktop apps
AUTHOR
BRAINDUMP
FLOW
KARBON
KEXI
KRITA
PLAN
SHEETS
STAGE
WORDS
# PA apps
ACTIVE
# plugins
PLUGIN_COLORENGINES
PLUGIN_MUSICSHAPE
PLUGIN_SPACENAVIGATOR
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_DOCKERS
PLUGIN_TEXTEDITING
PLUGIN_KEXI_SPREADSHEETMIGRATION
PLUGIN_DEFAULTTOOLS
PLUGIN_PATHSHAPES
PLUGIN_VARIABLES
PLUGIN_CHARTSHAPE
PLUGIN_PICTURESHAPE
PLUGIN_TEXTSHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_FORMULASHAPE
PLUGIN_VIDEOSHAPE
PLUGIN_VECTORSHAPE
PLUGIN_REPORTING
PLUGIN_GOOGLEDOCS
PLUGIN_THREEDSHAPE
PLUGIN_SHEETS_PIVOTTABLES
# feature
SCRIPTING
RDF
# extras
CALLIGRA
CONVERTER
DOC
EXTRA_PROPERTIES
EXTRA_THUMBNAIL
EXTRA_QUICKPRINT
EXTRA_FILEMANAGER_TEMPLATES
OKULARODPGENERATOR
OKULARGENERATOR_PPT
OKULARGENERATOR_PPTX
OKULAR_GENERATOR_ODT
OKULAR_GENERATOR_DOC
OKULAR_GENERATOR_DOCX
# developer utils
CSTESTER
DEVTOOLS
)
#defines the set of products commonly wanted by Creationists ;)
set( CALLIGRA_SHOULD_BUILD_PRODUCTS
KARBON
KRITA
CONVERTER
# extras
EXTRA_PROPERTIES
EXTRA_THUMBNAIL
EXTRA_QUICKPRINT
# plugins
PLUGIN_COLORENGINES
PLUGIN_SPACENAVIGATOR
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_DOCKERS
PLUGIN_TEXTEDITING
PLUGIN_DEFAULTTOOLS
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_TEXTSHAPE
calligra_define_productset(CREATIVE "Creative suite"
OPTIONAL
# apps
KARBON
KRITA
# extras
APP_CONVERTER
)
#defines the set of products commonly wanted for classic Desktop environment
set( CALLIGRA_SHOULD_BUILD_PRODUCTS
# apps
AUTHOR
BRAINDUMP
FLOW
KARBON
KEXI
KRITA
PLAN
SHEETS
STAGE
WORDS
# plugins
PLUGIN_COLORENGINES
PLUGIN_MUSICSHAPE
PLUGIN_SPACENAVIGATOR
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_DOCKERS
PLUGIN_TEXTEDITING
PLUGIN_KEXI_SPREADSHEETMIGRATION
PLUGIN_DEFAULTTOOLS
PLUGIN_PATHSHAPES
PLUGIN_VARIABLES
PLUGIN_CHARTSHAPE
PLUGIN_PICTURESHAPE
PLUGIN_TEXTSHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_FORMULASHAPE
PLUGIN_VIDEOSHAPE
PLUGIN_VECTORSHAPE
PLUGIN_REPORTING
PLUGIN_GOOGLEDOCS
PLUGIN_THREEDSHAPE
PLUGIN_SHEETS_PIVOTTABLES
# feature
SCRIPTING
RDF
# extras
CALLIGRA
CONVERTER
DOC
EXTRA_PROPERTIES
EXTRA_THUMBNAIL
EXTRA_QUICKPRINT
EXTRA_FILEMANAGER_TEMPLATES
OKULARODPGENERATOR
OKULARGENERATOR_PPT
OKULARGENERATOR_PPTX
OKULAR_GENERATOR_ODT
OKULAR_GENERATOR_DOC
OKULAR_GENERATOR_DOCX
calligra_define_productset(DESKTOP "Calligra for Desktop"
OPTIONAL
# apps
AUTHOR
BRAINDUMP
FLOW
KARBON
KEXI
KRITA
PLAN
SHEETS
STAGE
WORDS
# features
FEATURE_SCRIPTING
FEATURE_RDF
# extras
APP_CALLIGRA
APP_CONVERTER
FILEMANAGER
OKULAR
# docs
DOC
)
set( CALLIGRA_SHOULD_BUILD_PRODUCTS
KEXI
SHEETS
)
# Kexi for Desktop environment
set( CALLIGRA_SHOULD_BUILD_PRODUCTS
# apps
# AUTHOR
# BRAINDUMP
# FLOW
# KARBON
KEXI
KEXI_APP
# KRITA
# PLAN
# SHEETS
# SHEETS_PART
# STAGE
# WORDS
# plugins
# PLUGIN_COLORENGINES
# PLUGIN_MUSICSHAPE
# PLUGIN_SPACENAVIGATOR
# PLUGIN_ARTISTICTEXTSHAPE
# PLUGIN_DOCKERS
# PLUGIN_TEXTEDITING
# PLUGIN_KEXI_SPREADSHEETMIGRATION
# PLUGIN_DEFAULTTOOLS
# PLUGIN_PATHSHAPES
# PLUGIN_VARIABLES
# PLUGIN_CHARTSHAPE
# PLUGIN_PICTURESHAPE
# PLUGIN_TEXTSHAPE
# PLUGIN_PLUGINSHAPE
# PLUGIN_FORMULASHAPE
# PLUGIN_VIDEOSHAPE
# PLUGIN_VECTORSHAPE
PLUGIN_REPORTING
# PLUGIN_STAGING
# filters
# FILTER_XLSX_TO_ODS
# FILTER_XLS_TO_SHEETS
# FILTER_SHEETS_TO_XLS
# FILTER_CSV_TO_SHEETS
# FILTER_SHEETS_TO_CSV
# FILTER_APPLIXSPREAD_TO_KSPREAD
# FILTER_DBASE_TO_KSPREAD
# FILTER_GNUMERIC_TO_SHEETS
# FILTER_SHEETS_TO_GNUMERIC
# FILTER_OPENCALC_TO_SHEETS
# FILTER_SHEETS_TO_OPENCALC
# FILTER_QUATTROPRO_TO_SHEETS
# FILTER_HTML_TO_ODS
# FILTER_SHEETS_TO_HTML
# FILTER_KSPREAD_TO_LATEX
# FILTER_VISIO_TO_ODG
# FILTER_KPR_TO_OPD
# FILTER_PPT_TO_ODP
# FILTER_PPTX_TO_ODP
# FILTER_DOC_TO_ODT
# FILTER_DOCX_TO_ODT
# FILTER_WORDPERFECT_TO_ODT
# FILTER_WORKS_TO_ODT
# FILTER_APPLIXWORD_TO_ODT
# FILTER_ASCII_TO_WORDS
# FILTER_ODT_TO_ASCII
# FILTER_RTF_TO_ODT
# FILTER_ODT_TO_MOBI
# FILTER_ODT_TO_EPUB2
# FILTER_ODT_TO_HTML
# FILTER_MPXJ_IMPORT
# FILTER_EPS_TO_SVG_AI
# FILTER_XFIG_TO_ODG
# FILTER_PDF_TO_SVG
# FILTER_WPG_TO_SVG
# FILTER_KARBON_TO_IMAGE
# FILTER_KARBON_TO_SVG
# FILTER_SVG_TO_KARBON
# FILTER_KARBON_TO_WMF
# FILTER_WMF_TO_SVG
# FILTER_KARBON1X_TO_KARBON
# feature
SCRIPTING
# extras
# CALLIGRA
# CONVERTER
# DOC
# EXTRA_PROPERTIES
# EXTRA_THUMBNAIL
# EXTRA_QUICKPRINT
# OKULARODPGENERATOR
# libs
LIB_KDCHART
LIB_KOPROPERTY
LIB_KOREPORT
LIB_CALLIGRADB
CALLIGRA_LIBS
)
# Krita-only set of tools
set( CALLIGRA_SHOULD_BUILD_PRODUCTS
KRITA
CONVERTER
# extras
EXTRA_PROPERTIES
EXTRA_THUMBNAIL
EXTRA_QUICKPRINT
# plugins
PLUGIN_COLORENGINES
PLUGIN_SPACENAVIGATOR
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_DOCKERS
PLUGIN_TEXTEDITING
PLUGIN_DEFAULTTOOLS
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_TEXTSHAPE
)
#defines the set of products commonly wanted for classic Desktop environment
#defines the set of products commonly wanted for classic Desktop environment with OS X
# TODO: platform specific things should be handled in toplevel CMakeLists.txt
set( CALLIGRA_SHOULD_BUILD_PRODUCTS
# apps
AUTHOR
FLOW
# KEXI
KRITA
SHEETS
STAGE
WORDS
BRAINDUMP
KARBON
# plugins
PLUGIN_COLORENGINES
PLUGIN_MUSICSHAPE
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_DOCKERS
PLUGIN_TEXTEDITING
# PLUGIN_KEXI_SPREADSHEETMIGRATION
PLUGIN_DEFAULTTOOLS
PLUGIN_PATHSHAPES
PLUGIN_VARIABLES
PLUGIN_CHARTSHAPE
PLUGIN_PICTURESHAPE
PLUGIN_TEXTSHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_FORMULASHAPE
PLUGIN_VECTORSHAPE
# PLUGIN_REPORTING
# extras
CALLIGRA
CONVERTER
EXTRA_PROPERTIES
EXTRA_THUMBNAIL
EXTRA_QUICKPRINT
EXTRA_FILEMANAGER_TEMPLATES
calligra_define_productset(DESKTOP "Calligra for Desktop"
OPTIONAL
# apps
AUTHOR
FLOW
# KEXI
KRITA
SHEETS
STAGE
WORDS
BRAINDUMP
KARBON
# extras
APP_CALLIGRA
APP_CONVERTER
FILEMANAGER
)
set( CALLIGRA_SHOULD_BUILD_PRODUCTS SHEETS)
......@@ -36,9 +36,9 @@ install(TARGETS kritaoraexport DESTINATION ${PLUGIN_INSTALL_DIR})
install( FILES krita_ora_import.desktop krita_ora_export.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install( PROGRAMS krita_ora.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
if(SHOULD_BUILD_EXTRA_THUMBNAIL)
if(SHOULD_BUILD_FILEMANAGER_THUMBNAIL)
install( FILES krita_ora_thumbnail.desktop DESTINATION ${SERVICES_INSTALL_DIR})
endif(SHOULD_BUILD_EXTRA_THUMBNAIL)
endif(SHOULD_BUILD_FILEMANAGER_THUMBNAIL)
install(FILES krita_ora.xml DESTINATION ${XDG_MIME_INSTALL_DIR})
......
if (SHOULD_BUILD_CALLIGRA_LIBS)
if (SHOULD_BUILD_LIB_CALLIGRA)
add_subdirectory( koplugin )
add_subdirectory( widgetutils )
add_subdirectory( widgets )
......@@ -10,11 +10,11 @@ if (SHOULD_BUILD_CALLIGRA_LIBS)
add_subdirectory( pigment )
add_subdirectory( main )
add_subdirectory( kundo2 )
endif (SHOULD_BUILD_CALLIGRA_LIBS)
endif (SHOULD_BUILD_LIB_CALLIGRA)
if (SHOULD_BUILD_SCRIPTING)
if (SHOULD_BUILD_FEATURE_SCRIPTING)
add_subdirectory( kokross )
endif (SHOULD_BUILD_SCRIPTING)
endif (SHOULD_BUILD_FEATURE_SCRIPTING)
if (SHOULD_BUILD_LIB_KOVECTORIMAGE)
add_subdirectory( vectorimage )
......@@ -37,6 +37,6 @@ if (SHOULD_BUILD_LIB_KOREPORT)
add_subdirectory( koreport )
endif (SHOULD_BUILD_LIB_KOREPORT)
if (SHOULD_BUILD_RDF)
if (SHOULD_BUILD_FEATURE_RDF)
add_subdirectory( rdf )
endif (SHOULD_BUILD_RDF)
endif (SHOULD_BUILD_FEATURE_RDF)
......@@ -119,18 +119,18 @@ set(kotext_LIB_SRCS
KoTextCommandBase.cpp
)
if( SHOULD_BUILD_RDF )
if( SHOULD_BUILD_FEATURE_RDF )
set(kotext_LIB_SRCS ${kotext_LIB_SRCS}
KoTextRdfCore.cpp
)
endif( SHOULD_BUILD_RDF )
endif( SHOULD_BUILD_FEATURE_RDF )
kde4_add_library(kotext SHARED ${kotext_LIB_SRCS})
target_link_libraries(kotext flake)
if( SHOULD_BUILD_RDF )
if( SHOULD_BUILD_FEATURE_RDF )
target_link_libraries(kotext ${SOPRANO_LIBRARIES})
endif( SHOULD_BUILD_RDF )
endif( SHOULD_BUILD_FEATURE_RDF )
target_link_libraries(kotext LINK_INTERFACE_LIBRARIES flake)
if( FONTCONFIG_FOUND )
......
......@@ -171,9 +171,9 @@ kde4_add_ui_files(textshape_SRCS
kde4_add_plugin(calligra_shape_text ${textshape_SRCS})
target_link_libraries(calligra_shape_text kotext kotextlayout komain ${EXTRA_LIBS})
if( SHOULD_BUILD_RDF )
if( SHOULD_BUILD_FEATURE_RDF )
target_link_libraries(calligra_shape_text ${SOPRANO_LIBRARIES})
endif( SHOULD_BUILD_RDF )
endif( SHOULD_BUILD_FEATURE_RDF )
install(TARGETS calligra_shape_text DESTINATION ${PLUGIN_INSTALL_DIR})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment