Adding another lib into the productset system

Friedrich W. H. Kossebau kossebau at kde.org
Mon Apr 29 10:23:20 BST 2013


Hi Luke,

I saw on irc that you want to add another library and where wondering how to 
integrate with the productset system.
For a first idea please read cmake/productsets/README

Then this would be the rough guideline what to do:

1. You define your product 
	calligra_define_product(LIB_KOSTEP "libkostep")
2. You add it to the NEEDS or WANTS of other product definitions
   NEEDS if it is a required internal dependency
	WANTS if it would be nice to have it build as well
   (WANTS rather only used for meta products)
   Any WANTS and NEEDS of a product can only be done after it has been defined
3. Turn the product build flag off if external deps are missing
	In the section "Detect which products can be compile" of the toplevel
	CMakeLists.txt add a rule when the build flag should be turned off
4. Wrap everything belonging to the product with the product condition
	if (SHOULD_BUILD_LIB_KOSTEP)
	endif (SHOULD_BUILD_LIB_KOSTEP)

Will see to brush these guidlines up and add them to a proper place, so this 
becomes common knowledge. What would be unclear in the above for now?

Then possibly you might not want to create a separate product for libkostep, 
in case it will be pretty much twisted with the other libs of CALLIGRA_LIBS. 
In that case you just need to make sure all build/install instructions for 
libkostep are also wrapped by if (SHOULD_BUILD_CALLIGRA_LIBS) ... endif()

Cheers
Friedrich



More information about the calligra-devel mailing list