View Single Post
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#69
Originally Posted by vcproj2cmake View Post
http://www.kdab.com/using-cmake-with-qt-5/
shows some find_package() samples.

http://eiskaltdc.googlecode.com/svn-...CMakeLists.txt
has a find_package() QtDeclarative variant (not sure whether that one applies here - depends on the Qt version you use).

Given a successful result, then do something like:
target_link_libraries(my_target ${QT_something_LIBRARIES})
(see the FindQt.cmake file content on which libraries result variable it provides).

HTH!
Applauncherd already has this:
Code:
target_link_libraries(mdeclarativecache ${LIBDL} ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${X11_LIBRARIES})
The linking error happens with both Qt 4.7.0 and 4.7.4

EDIT:
Code:
target_link_libraries(mdeclarativecache ${LIBDL} ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${X11_LIBRARIES} QtDeclarative)
works like charm! It builds flawlessly! Debs & autobuilder coming soon.
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here

Last edited by marmistrz; 2012-07-25 at 18:11.
 

The Following 2 Users Say Thank You to marmistrz For This Useful Post: