For our project we set QT_BINARY_DIR which finds most of the Qt5XXX ones (it is 
defined in the FindQt5.cmake).
We however also added the non-standard QT_LIBRARY_CMAKE_DIR to search for the 
Qt5XXXX when they are not installed in the default location (the default we put 
is ${QT_BINARY_DIR}/../lib/cmake/ but for instance on some linux installation 
they may be somewhere else).

Thomas

From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Nikita Barawade
Sent: 18 January 2016 14:08
To: cmake@cmake.org
Subject: [CMake] Alternative to CMAKE_PREFIX_PATH

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 
-- 

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

Reply via email to