CMake check for create-resources
Sven Langkamp
sven.langkamp at gmail.com
Fri Feb 15 22:54:13 CET 2008
On Wed, Feb 13, 2008 at 8:06 PM, Alexander Neundorf <neundorf at kde.org>
wrote:
> On Wednesday 13 February 2008, you wrote:
> > On Feb 12, 2008 6:28 PM, Alexander Neundorf <neundorf at kde.org> wrote:
> > > On Tuesday 12 February 2008, Sven Langkamp wrote:
> > > > Hi,
> > > >
> > > > I want to add a dependency for the create-resources package to
> KOffice,
> > > > which contains shared resources from the CREATE project.
> > > > How can I check if the package is installed? Note that the package
> only
> > > > contains data and no code.
> > >
> > > What does this package consist of and where is it typically installed
> ?
> > > You probably need to do something with find_path().
> >
> > On my system it's in /usr/share/create/ and it contains brush, pattern
> and
> > gradient files.
> >
> > I tried to put a FindCreateResources.cmake in koffice/cmake/modules, but
> > that doesn't work and is probably not even valid cmake code:
> >
> > if(CREATERESOURCES_INCLUDE_DIR)
> >
> > set(CREATERESOURCES_FOUND TRUE)
> >
> > else(CREATERESOURCES_INCLUDE_DIR)
> >
> > find_path( CREATERESOURCES_INCLUDE_DIR simple.kgr /usr/share/create/ )
> > if( CREATERESOURCES_INCLUDE_DIR )
> > set( CREATERESOURCES_FOUND TRUE )
> > endif( CREATERESOURCES_INCLUDE_DIR )
> > endif(CREATERESOURCES_INCLUDE_DIR)
> >
> > find_package(createresources REQUIRED) gives CMake Error:
> > createresources_DIR is not set. It must be set to the directory
> containing
> > createresourcesConfig.cmake in order to use createresources.
>
> The filename is FindCreateResources.cmake, so must use exact that case:
> find_package(CreateResources)
Thanks, this worked.
>
> I'd suggest to start simple:
>
> find_path( CREATERESOURCES_INCLUDE_DIR simple.kgr
> PATHS
> ${CMAKE_INSTALL_PREFIX}
> /usr /usr/local /usr/pkg
> /opt /opt/local /opt/csw
> PATH_SUFFIXES share/create )
>
> if( CREATERESOURCES_INCLUDE_DIR )
> set( CREATERESOURCES_FOUND TRUE )
> endif( CREATERESOURCES_INCLUDE_DIR )
>
> (with cmake cvs it wouldn't be necessary to list all these paths, there it
> has
> CMAKE_SYSTEM_PREFIX_PATH which has all these search prefixes)
>
> Does that project have a homepage ?
Is there a way to see if the package was found? At the moment cmake runs,
but I don't get feedback from it.
Also looking for a single file like simple.kgr might be wrong, as the
package is collection of resource files from gimp, karbon, krita etc. and
the files are maybe not unique.
The project homepage is:
http://create.freedesktop.org/wiki/index.php/Main_Page
(Shared resources)
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-buildsystem/attachments/20080215/9d8cc507/attachment.html
More information about the Kde-buildsystem
mailing list