Hi,

On Fri, Jan 6, 2017 at 6:41 PM,  <da...@daryllee.com> wrote:
> As it turns out, no, I can't use Qt5.  In fact, I'd love to hear from anyone
> who actually has.  I find this in Modules/FindQt.make:

That module is specifically only for applications wanting to support
Qt3 and Qt4 at the same time.

> ===========================
> if (Qt_FIND_VERSION)
>   if (Qt_FIND_VERSION MATCHES "^([34])(\\.[0-9]+.*)?$")
>     set(DESIRED_QT_VERSION ${CMAKE_MATCH_1})
>   else ()
>     message(FATAL_ERROR "FindQt was called with invalid version
> '${Qt_FIND_VERSION}'. Only Qt major versions 3 or 4 are supported. If you do
> not need to support both Qt3 and Qt4 in your source consider calling
> find_package(Qt3) or find_package(Qt4) instead of find_package(Qt)
> instead.")
>   endif ()
> endif ()
> ===========================
>
> So I re-installed Qt4, rebuilt CMake (./bootstrap --qt-gui, make, sudo make
> install) and still got the same runtime failure.

Well, Qt5 isn't found through a find-module but rather through the
module-mode (or whatever it was called). Qt5 ships with cmake-specific
files that allow cmake to find it as long as its installed in a common
prefix (like /usr) or the installation directory is specified via
CMAKE_PREFIX_PATH. I suspect if you look at the CMakeLists.txt file
you'll see some logic to lookup Qt5 with something like
find_package(Qt5 MODULES QtCore QtGui QtWidgets) and a fallback for
finding with FindQt4 like find_package(Qt4 MODULES QtCore QtGui
QtWidgets). I don't think you'll find usage of the FindQt module in
the cmake sources as the code likely won't build with Qt3.

Andreas
-- 

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