<div dir="ltr"><div dir="ltr"><div>Hi Romain, <br></div><div><br></div><div>> How can I add this simple example inside the CMake example/tutorial?</div><div><br></div><div>I suggest to add them to the cmake community wiki.</div><div>See <a href="https://gitlab.kitware.com/cmake/community/wikis/home">https://gitlab.kitware.com/cmake/community/wikis/home</a></div><div><br></div><div>Jc<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 9, 2018 at 11:27 AM Romain LEGUAY <<a href="mailto:romain.leguay@gmail.com">romain.leguay@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">I found the solution!!<div><br></div><div>I just add the plugins attached to the Qt Component (in my case Qt5Widgets) and install it:</div><div><br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;line-height:18px;white-space:pre-wrap"><div><span style="color:#569cd6">set</span>(qtplugins)</div><div><span style="color:#569cd6">foreach</span>(plugin <span style="color:#569cd6">${Qt5Widgets_PLUGINS}</span>)</div><div><span style="color:#569cd6"> get_target_property</span>(_loc <span style="color:#569cd6">${plugin}</span> LOCATION)</div><div><span style="color:rgb(86,156,214)"> list</span>(APPEND qtplugins <span style="color:rgb(86,156,214)">${_loc}</span>)</div><div><span style="color:#569cd6">endforeach</span>()</div><br><div>install_qt5_executable(<span style="color:#ce9178">"${exe}"</span> <span style="color:#ce9178">"${qtplugins}"</span> <span style="color:#ce9178">""</span> <span style="color:#ce9178">"${dirs}"</span> <span style="color:#ce9178">""</span>)</div></div></div><div><br></div><div>I found a part of the solution in the Qt documentation (<a href="http://doc.qt.io/qt-5/cmake-manual.html#imported-targets" target="_blank">http://doc.qt.io/qt-5/cmake-manual.html#imported-targets</a>).</div><div><br></div><div>How can I add this simple example inside the CMake example/tutorial?</div><div><br></div><div>Romain</div></div>-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>