CMake: how to get find_package to work with different versions of Qt?
-
I have a project that needs to support Qt4.8 and Qt5, and build with CMake.
In my CMake I have:find_package(Qt5 COMPONENTS Core Gui Widget Xml REQUIRED)But how do I generalise this so that it will work with either Qt4 or 5?
(Our build pipeline has one machine with Qt4 installed, and another with 5). -
Hi,
You might be able to do something along the lines of the version less cmake targets used for Qt 5 and 6.
-
Hi,
You might be able to do something along the lines of the version less cmake targets used for Qt 5 and 6.