Saturday 20 June 2015

Re: New learnings of CMake (>= 2.8.11) and Qt5


On 19 Jun 2015, at 0:51 , Pete Woods <pete.woods@canonical.com> wrote:

which says that since CMake 2.8.11 (old hat now) we should be doing the following:

find_package(Qt5Core)
// ... define my_target
target_link_libraries(my_target
  Qt5::Core
  nonQtDep
)

I, for one, think this will make mixed deps between Qt and non-Qt components much more readable in our CMake code.

Nice one, thanks!

I just tried this and found that it also gets rid of a lots of policy 28 warnings.

Cheers,

Michi.