[CMake] Alternative to CMAKE_PREFIX_PATH

Guillaume Dumont dumont.guillaume at gmail.com
Mon Jan 18 09:46:37 EST 2016


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
https://cmake.org/cmake/help/v3.3/command/find_package.html?highlight=cmake_prefix_path
for search order.

On Mon, Jan 18, 2016 at 9:08 AM, Nikita Barawade <
nikita.barawade at einfochips.com> wrote:

>
>
> Hi,
>
> My project needs Qt5   .
>
> Adding
> find_package (Qt5Widgets)
> to CMakeLists.txt  could not find Qt .
>
> So I added,
> set (CMAKE_PREFIX_PATH
> "< Qt installation  path>")
>
> It is working fine now. But is there any alternative to find qt5 package
>  without  hardcoding  CMAKE_PREFIX_PATH ?
>
> Regards,
> *Nikita*
> *************************************************************************************************************************************************************
> 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.
> *************************************************************************************************************************************************************
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Guillaume Dumont
=========================
dumont.guillaume at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160118/15c11261/attachment-0001.html>


More information about the CMake mailing list