Weird cmake 'errors'

Alexander Neundorf neundorf at kde.org
Tue Nov 25 21:39:49 CET 2008


On Tuesday 25 November 2008, Benjamin Reed wrote:
> On Wed, Nov 19, 2008 at 5:27 PM, Marijn Kruisselbrink
>
> <m.kruisselbrink at student.tue.nl> wrote:
> > When I try to compile any module other than kdelibs on Mac OSX, I get
> > lots and lots of "CMake Internal Error (please report a bug) in
> > CMakeLists.txt: GetLibraryNamesInternal called on imported target:
> > kdecore", and similar lines. Fortunately cmake still manages to generate
> > correct Makefiles, but it still is annoying. Is this something that is
> > wrong in our usage of cmake, or
>
> I can confirm this issue with the 4.1.80 packages that were just
> released on the packaging list as well -- kdepimlibs errors out as
> well.
>
> I've made a minimal test-case (attached).  

Is this really minimal ?

I would suspect the following might already be enough ?

----------------------

find_package(KDE4 REQUIRED)

set(failure_LIB_SRCS dummy.cpp)

kde4_add_library(failure SHARED ${failure_LIB_SRCS})
target_link_libraries(failure ${KDE4_KIO_LIBS})

----------------------

Can you please try ?
I guess it's caused by target_link_libraries().
If there are no errors, add the set_target_properties() call again.
I think the install() should be innocent.

Can you get a backtrace from the point where the error message is printed ?
It is in Source/cmTarget.cxxm void cmTarget::GetLibraryNamesInternal()

Alex


More information about the Kde-buildsystem mailing list