Shipping a find script of a library with the library itself

Andreas Pakulat apaku at gmx.de
Mon Nov 9 18:04:49 CET 2009


On 09.11.09 17:56:37, Stefan Majewsky wrote:
> Hi,
> 
> I want to move my jigsaw puzzle game Palapeli to kdereview very soon. Palapeli 
> builds on libpala, which offers a plugin interface. The headers for libpala 
> are therefore public, so I want to ship some FindLibPala.cmake with the 
> libpala sources, but I think I heard from somebody somewhen that such a 
> distribution method is not good, because CMake will completely fail to locate 
> libpala if it is not installed already, resulting in undetailed fatal errors 
> (IIRC).

Right.
 
> Is that right? What should I do then?

Move the Find-Script "upstream", i.e. in your case kdegames might be good
(unless you don't want to have a dependency on kdegames) or kdelibs.
Obviously the problem with that is the find-script has to be treated like
normal public API and cannot be changed so easily.

Another option would be to ship the find-script within each app/module that
needs to be able to find the library, but not install it at all. Obviously
this can result in duplicated code, but it also means you don't have to
guarantee source compatibility of your find-script.

Andreas

-- 
Don't go surfing in South Dakota for a while.


More information about the Kde-buildsystem mailing list