On Wednesday, November 02, 2011 15:06:29 you wrote: > Being able to just state "my target Foo uses packages Bar and Blub" is > already since quite some time on the TODO for cmake, i.e. so that Foo will > then link against Bar and Blub, and also get the include directories for > Bar and Blub (and probably also necessary macros). > > I'd say this shouldn't be pushed into a Qt5Config.cmake, but we should use > what will be in cmake (and if possible help with getting it into cmake). >
I imagined something like this: macro(qt5_add_module _target _modulename) find_package(Qt5${_modulename}) target_link_libraries(${_target} ${Qt5${_modulename}_LIBRARY}) # Warning: Imaginary cmake command: target_include_directories(${_target} ${Qt5${_modulename}_INCLUDE_DIRS}) set_target_properties(${_target} PROPERTIES COMPILE_FLAGS ${Qt5${_modulename}_DEFINITIONS}) endmacro() If cmake in the future gets something for doing that all in one go, fair enough, but it's not a blocker at any rate. <snip> > > > > The easiest way is set(CMAKE_AUTOMOC ON), which will work for Qt5 in > > CMake 2.8.7 (cmake 2.8.6 checks for Qt4). > > Yes. CMake will need a small modification to support Qt5 too, but if the > behaviour of moc stays the same this will be simply to not only check for > QT4_FOUND, but also QT5_FOUND. > See the qt5_automoc branch in cmake stage. Thanks, -- Stephen Kelly <step...@kdab.com> | Software Engineer KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-Independent Software Solutions
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development