New learnings of CMake (>= 2.8.11) and Qt5

Michi Henning michi.henning at canonical.com
Sat Jun 20 22:56:28 UTC 2015


On 19 Jun 2015, at 0:51 , Pete Woods <pete.woods at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20150621/cbc9f8b7/attachment.html>


More information about the ubuntu-devel mailing list