[CMake] Alternative to CMAKE_PREFIX_PATH

Thomas Richard Thomas.Richard at imgtec.com
Mon Jan 18 09:49:24 EST 2016


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-bounces at cmake.org] On Behalf Of Nikita Barawade
Sent: 18 January 2016 14:08
To: cmake at 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 


More information about the CMake mailing list