<div>Mine is a bit similar, also adds the syntax required to use a designer generated ui file and resources. Pasted below. I tend to create an eclipse makefile project to work with it (I don't even worry about the qt plugin as this is like directly working with code anyway).<br>
</div><div><br></div><div>Not sure what you mean by importing multiple packages as a single project - you mean the ability to build multiple qt programs in one ros package? I haven't tried it yet, but the cmake qt macros should enable that following similar calls as that given below.</div>
<div><br></div><div>I've also got a mate here who's starting to build a library of qt-opengl widgets we can use as an ros library package. He tends to build them at a much lower level though (no designer generated ui's), but follows a similar approach.</div>
<div><br></div><div>**************************************************************************</div><div><br></div><div>##############################################################################<br># Required 3rd party<br>
##############################################################################<br># <a href="http://qtnode.net/wiki/Qt4_with_cmake">http://qtnode.net/wiki/Qt4_with_cmake</a><br><br>find_package(Qt4)<br>include(${QT_USE_FILE})<br>
# This is necessary as all ui files etc will get dumped in the bottom of the<br># binary directory.<br>include_directories(${CMAKE_CURRENT_BINARY_DIR})<br><br>##############################################################################<br>
# Sections<br>##############################################################################<br><br>file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)<br>file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)<br>
file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/local/*.hpp)<br><br>QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})<br>QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})<br>QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})<br>
<br>##############################################################################<br># Sources<br>##############################################################################<br><br>file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/*.cpp)<br>
<br>##############################################################################<br># Binaries<br>##############################################################################<br><br>rosbuild_add_executable(qgoo ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})<br>
target_link_libraries(qgoo ${QT_LIBRARIES})<br></div><div><br></div><div>-- <br></div>Phone : +82-10-5400-3296 (010-5400-3296)<br>Home: <a href="http://snorriheim.dnsdojo.com/">http://snorriheim.dnsdojo.com/</a><br>Yujin Robot: <a href="http://www.yujinrobot.com/">http://www.yujinrobot.com/</a><br>
Embedded Control Libraries: <a href="http://snorriheim.dnsdojo.com/redmine/wiki/ecl">http://snorriheim.dnsdojo.com/redmine/wiki/ecl</a><br>