On Wed, Feb 13, 2008 at 8:06 PM, Alexander Neundorf <<a href="mailto:neundorf@kde.org">neundorf@kde.org</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Wednesday 13 February 2008, you wrote:<br>
> On Feb 12, 2008 6:28 PM, Alexander Neundorf <<a href="mailto:neundorf@kde.org">neundorf@kde.org</a>> wrote:<br>
> > On Tuesday 12 February 2008, Sven Langkamp wrote:<br>
> > > Hi,<br>
> > ><br>
> > > I want to add a dependency for the create-resources package to KOffice,<br>
> > > which contains shared resources from the CREATE project.<br>
> > > How can I check if the package is installed? Note that the package only<br>
> > > contains data and no code.<br>
> ><br>
> > What does this package consist of and where is it typically installed ?<br>
> > You probably need to do something with find_path().<br>
><br>
> On my system it's in /usr/share/create/ and it contains brush, pattern and<br>
> gradient files.<br>
><br>
> I tried to put a FindCreateResources.cmake in koffice/cmake/modules, but<br>
> that doesn't work and is probably not even valid cmake code:<br>
><br>
> if(CREATERESOURCES_INCLUDE_DIR)<br>
><br>
> set(CREATERESOURCES_FOUND TRUE)<br>
><br>
> else(CREATERESOURCES_INCLUDE_DIR)<br>
><br>
> find_path( CREATERESOURCES_INCLUDE_DIR simple.kgr /usr/share/create/ )<br>
> if( CREATERESOURCES_INCLUDE_DIR )<br>
> set( CREATERESOURCES_FOUND TRUE )<br>
> endif( CREATERESOURCES_INCLUDE_DIR )<br>
> endif(CREATERESOURCES_INCLUDE_DIR)<br>
><br>
> find_package(createresources REQUIRED) gives CMake Error:<br>
> createresources_DIR is not set. It must be set to the directory containing<br>
> createresourcesConfig.cmake in order to use createresources.<br>
<br>
</div></div>The filename is FindCreateResources.cmake, so must use exact that case:<br>
find_package(CreateResources)</blockquote><div><br>Thanks, this worked.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I'd suggest to start simple:<br>
<div class="Ih2E3d"><br>
find_path( CREATERESOURCES_INCLUDE_DIR simple.kgr<br>
</div> PATHS<br>
${CMAKE_INSTALL_PREFIX}<br>
/usr /usr/local /usr/pkg<br>
/opt /opt/local /opt/csw<br>
PATH_SUFFIXES share/create )<br>
<div class="Ih2E3d"><br>
if( CREATERESOURCES_INCLUDE_DIR )<br>
set( CREATERESOURCES_FOUND TRUE )<br>
endif( CREATERESOURCES_INCLUDE_DIR )<br>
<br>
</div>(with cmake cvs it wouldn't be necessary to list all these paths, there it has<br>
CMAKE_SYSTEM_PREFIX_PATH which has all these search prefixes)<br>
<br>
Does that project have a homepage ?</blockquote><div><br>Is there a way to see if the package was found? At the moment cmake runs, but I don't get feedback from it.<br>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.<br>
<br>The project homepage is: <a href="http://create.freedesktop.org/wiki/index.php/Main_Page">http://create.freedesktop.org/wiki/index.php/Main_Page</a> <br>(Shared resources)<br><br>Sven<br></div></div><br>