[kdepimlibs] /: Interim hack to make everything which depends on kdepimlibs build again.

Rex Dieter rdieter at math.unl.edu
Sat Dec 22 16:20:20 UTC 2012


Yury G.  Kudryashov wrote:

> Ben Cooksley wrote:
> 
>> On Thu, Dec 20, 2012 at 9:02 PM, Andreas Pakulat <apaku at gmx.de> wrote:
>>> Hi,
>> 
>> Hi,
>> 
>>>
>>> On Thu, Dec 20, 2012 at 1:11 AM, Ben Cooksley <bcooksley at kde.org> wrote:
>>>> Git commit f9ea1c7b4fb351a4da16b386c23f15d6c109728a by Ben Cooksley.
>>>> Committed on 20/12/2012 at 01:11.
>>>> Pushed by bcooksley into branch 'master'.
>>>>
>>>> Interim hack to make everything which depends on kdepimlibs build
>>>> again. A proper solution is needed from the CMake folks, but I don't
>>>> see consensus on that.
>>>
>>> FWIW, I think the change you comitted is almost the right fix, you
>>> forgot a REQUIRED there to ensure that finding kdepimlibs fails if
>> 
>> The ommision of REQUIRED was intentional as kdepimlibs itself does not
>> require Nepomuk Core.
>> 
>>> nepomuk is not found. If kdepimlibs libraries expose Nepomuk API in
>>> their own public API then its a dependency of kdepimlibs, this is
>>> expressed by having nepomuk in the link-interface of the kdepimlibs
>> 
>> Right. I guess the correct fix in this case is an if() block which
>> checks if Nepomuk had previously been found (and if so - adds the line
>> in with REQUIRED) and otherwise skips it.
>> 
>> I'll take a look into that.
> I've missed this thread, and committed
> de3a6c213202e028a97ab5081e94468bc65c9868.
> 
> It adds
> +if(NOT TARGET nepomukcore)
> +   find_package(NepomukCore NO_MODULE)
> +endif()
> to KdepimLibsConfig.cmake.in. NepomukCore is Required by kdepimlibs (look
> at CMakeLists.txt in master and KDE/4.10, not in rc1).
> 
> I don't think that adding REQUIRED is the right thing to do. Probably,
> if(NOT TARGET nepomukcore)
>    if(KdepimLibs_FIND_REQUIRED)
>       find_package(NepomukCore REQUIRED NO_MODULE)
>    else()
>       find_package(NepomukCore NO_MODULE)
>    endif()
> endif()

Indeed, if something like extra stanza is not added, now kdepim-runtime 
fails, with:

CMake Error at 
/usr/lib64/cmake/NepomukCore/NepomukCoreTargetsWithPrefix.cmake:16 
(ADD_LIBRARY):
  add_library cannot create imported target "nepomukcore" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/lib64/cmake/NepomukCore/NepomukCoreConfig.cmake:34 (include)
  CMakeLists.txt:84 (find_package)
...
-- Configuring incomplete, errors occurred!
-- rex




More information about the Kde-buildsystem mailing list