Well, as we now have several repositories and libraries, it should be<br>NepomuCoreConfig.cmake<br>NepomukUiConfig.cmake<br>NepomukSomeOtherModule.cmake and so on<br><br>and this may result in code like<br>find_package(NepomukUI) // Implies finding NepomukCore<br>
find_package(<div class="gmail_quote">NepomukSomeOtherModule) // Implies finding NepomukCore, but doesn't imply finding NepomukUI, so we need previous line<br><br>Good
things is that we can request specific versions for every library( aka
module) and so on. Bad things, as for me, are that when number of
modules more then 3, the code looks dirty - I personally would prefer
one find_package with COMPONENTS in such situation rather then 4 lines
with find_package..<br>
<br>Anyway, currently there are only 2 main modules( aka libraries) so it is not the case.<br><br>CMake
scripting is no problem for me, so I think we can/should choose variant
that best fits our needs and offer good interface for the programmes
using Nepomuk, and I will implement it( if necessary, of course).<br>
<br>P.S. If you are concerned about internals of the script, then
current draft implementation just loads Nepomuk<ModuleName>Config.cmake for every requested component by itself. The question is mainly about interface for the Nepomuk-using programmers.<div><div class="h5"><br>P.P.S. Sorry, forget to send to mailing list.<br>
<br></div></div></div><br><br><div class="gmail_quote">On Sat, Sep 3, 2011 at 12:56 AM, Sebastian Trüg <span dir="ltr"><<a href="mailto:trueg@kde.org">trueg@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
How about just doing it with a NepomukConfig.cmake and a<br>
NepomukConfigVersion.cmake. AFAIK that is the simplest solution and does<br>
not require any fancy script writing.<br>
I am not sure if it is enough in all situations though...<br>
<br>
Examples can be found in sdo, nepomukannotation, scribo, and others, I<br>
think Akonadi does it, too.<br>
<br>
Cheers,<br>
<font color="#888888">Sebastian<br>
</font><div><div></div><div class="h5"><br>
On 09/02/2011 10:24 PM, Artem Serebriyskiy wrote:<br>
> Hi.<br>
><br>
> I am trying to provide a replacement for FIndNepomuk.cmake that will<br>
> work with new Nepomuk layout . And I have a question for desired API of<br>
> the script. In current draft all modules are treated as components.<br>
> Examples:<br>
> 1. find_package(Nepomuk COMPONENTS core ui ) will try to found all<br>
> required components and will set general variables NEPOMUK_FOUND,<br>
> _LIBRARIES, _INCLUDE_DIRS and component-specific variables<br>
> NEPOMUK_${COMPONENT}_FOUND, NEPOMUK_${COMPONENT}_LIBRARY, _INCLUDE_DIRS<br>
> for each component ( expands to NEPOMUK_CORE_LIBRARY,<br>
> NEPOMUK_UI_LIBRARY) etc.<br>
><br>
> 2. find_package(Nepomuk) will try to found all available modules of the<br>
> Nepomuk on the system and for every found module will set variables<br>
> mentioned above. Global ones are combination of all component-specific,<br>
> and NEPOMUK_FOUND is set to true if at least any package was discovered.<br>
><br>
> Downside of this solution is that we loose ability to request version<br>
> for component, so it will require to sync versions at least between main<br>
> modules.<br>
><br>
> Is this acceptable ?<br>
> Any comments and suggestions are welcome.<br>
><br>
> --<br>
> Sincerely yours,<br>
> Artem Serebriyskiy<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sincerely yours,<br>Artem Serebriyskiy<br>