<div dir="ltr"><div>A better alternative would be to use the command line switch -DCMAKE_PREFIX_PATH=<Qt install location> or similarly via CMake-GUI. Or you could also use the env var. See <a href="https://cmake.org/cmake/help/v3.3/command/find_package.html?highlight=cmake_prefix_path">https://cmake.org/cmake/help/v3.3/command/find_package.html?highlight=cmake_prefix_path</a> for search order.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 18, 2016 at 9:08 AM, Nikita Barawade <span dir="ltr"><<a href="mailto:nikita.barawade@einfochips.com" target="_blank">nikita.barawade@einfochips.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:11pt;color:#000000;background-color:#ffffff;font-family:'Courier New',monospace">
<p><br>
</p>
<p><br>
</p>
<div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<font style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif" color="#000000">Hi,<br>
<br>
My project needs Qt5   . </font></div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<font style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif" color="#000000"><br>
</font></div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<font style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif" color="#000000">Adding  </font></div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<font style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif" color="#000000"></font><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:11pt">find_package (Qt5Widgets)</span></div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">to CMakeLists.txt  could not find Qt</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)"> . </span><br>
</div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<font style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif" color="#000000"><br>
</font></div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<font style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif" color="#000000">So I added,</font></div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<font style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif" color="#000000">
<div>set (CMAKE_PREFIX_PATH </div>
<div><span style="white-space:pre-wrap"></span>"<<span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:14.6667px"> Qt installation  path</span>>")</div>
</font></div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<font style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif" color="#000000"><br>
</font></div>
<div style="font-size:11pt;color:#006fc9;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<font style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif" color="#000000">It is working fine now. But is there any alternative to find qt5 package  without  hardcoding  <span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:14.6667px">CMAKE_PREFIX_PATH
 ?</span><br>
<br>
</font><font color="#000000"><span style="font-family:Calibri,Arial,Helvetica,sans-serif"></span></font>
<div style="font-size:10pt;color:#000000;background-color:#ffffff;font-family:Arial,Helvetica,sans-serif">
<div name="divtagdefaultwrapper">
<div style="margin:0px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-size:11pt"></span><span style="font-size:11pt">Regards,</span><span style="font-size:11pt"></span><span style="font-size:11pt"></span><br style="font-size:11pt">
<span style="font-size:11pt"></span><strong style="font-size:11pt"></strong><strong style="font-size:11pt">Nikita</strong><br>
</span></div>
<div style="color:rgb(33,33,33);font-family:'Segoe UI','Segoe WP','Segoe UI WPC',Tahoma,Arial,sans-serif;font-size:15px;margin:0px;background-color:rgb(255,255,255)">
</div>
</div>
</div>
</div>
</div>
</div>
************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended
 solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you
 are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please
 delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused
 by any virus transmitted by this email. *************************************************************************************************************************************************************
</div>

<br>--<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="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Guillaume Dumont<br>=========================<br><a href="mailto:dumont.guillaume@gmail.com" target="_blank">dumont.guillaume@gmail.com</a></div>
</div>