<div dir="ltr"><div>For quite a while now, I've been using commands like:</div><div><br></div><div><font face="monospace, monospace">find_package(Qt5Core)</font></div><div><span style="font-family:monospace,monospace">// ... define my_target</span><br></div><div><font face="monospace, monospace">qt5_use_modules(my_target Core)</font></div><div><div><font face="monospace, monospace">target_link_libraries(my_target </font><span style="font-family:monospace,monospace">nonQtDep</span><span style="font-family:monospace,monospace">)</span></div></div><div><br></div><div>But recently came across a post on StackOverflow that lead me to the following docs:</div><div><br></div><a href="http://doc.qt.io/qt-5/cmake-manual.html">http://doc.qt.io/qt-5/cmake-manual.html</a><br><div><br></div><div>which says that since CMake 2.8.11 (old hat now) we should be doing the following:</div><div><br></div><div><div><font face="monospace, monospace">find_package(Qt5Core)<br></font></div><div><font face="monospace, monospace">// ... define my_target</font></div><div><font face="monospace, monospace">target_link_libraries(my_target</font></div><div><font face="monospace, monospace">  Qt5::Core</font></div><div><font face="monospace, monospace">  nonQtDep</font></div><div><font face="monospace, monospace">)</font><br></div></div><div><br></div><div>I, for one, think this will make mixed deps between Qt and non-Qt components much more readable in our CMake code.</div><div><br></div><div>Cheers,</div><div>    Pete</div></div>