[Kde-games-devel] Using libkeclarative

Albert Astals Cid aacid at kde.org
Mon Jun 11 23:17:13 UTC 2012


El Dimarts, 12 de juny de 2012, a les 04:34:27, Viranch Mehta va escriure:
> Hi,

Hi

> I want to use kdeclarative for my qml port of kbreakout, mainly for
> translations. But cmake doesn't find the library.
> 
> I added:
> 
> kbreakout/CMakeLists.txt:
> find_package(KDeclarative REQUIRED)
> 
> kbreakout/src/CMakeLists.txt:
> include_directories(${KDECLARATIVE_INCLUDE_DIR})
> target_link_libraries(kbreakout ..... ${KDECLARATIVE_LIBRARIES})
> 
> I have kbreakout/src/canvaswidget.cpp that uses KDeclarative as follows:
> 
> #include <kdeclarative.h>
> KDeclarative kdeclarative;
> kdeclarative.setDeclarativeEngine(engine());
> kdeclarative.initialize();
> kdeclarative.setupBindings();
> 
> I get this error while compiling: http://paste.kde.org/497690/
> 
> I checked my $KDEDIR/share/apps/cmake/modules directory and it doesn't
> have any FindKDeclarative.cmake (which I think should be there).

Nope, what you want is KDeclarativeConfig.cmake

> > If any of it matters:
> I don't have kdelibs/runtime/workspace compiled from source, using
> kde 4.8.4 distro packages. I've compiled libkdegames and libkmahjongg
> from latest SVN.
> 
> Can someone help me out?

Find the package that provides KDeclarativeConfig.cmake and 
kdeclarative.h for your distro

If you are using a debian derivative you can use 

$ apt-file search kdeclarative.h
kdelibs5-experimental-dev: /usr/include/kdeclarative.h

For other distros check the tools its packaging system provides.

Cheers,
  Albert

> 
> Thanks,
> Viranch


More information about the kde-games-devel mailing list