Ticket #903: qt-cmake.patch

File qt-cmake.patch, 930 bytes (added by pini, 10 years ago)
  • CMakeLists.txt

    Description: Fix cmake Qt4 detection
     This detection was broken by the unknown option OPTIONAL.
    Author: Gilles Filippini <pini@debian.org>
    Bug-Debian: http://bugs.debian.org/634522
    Forwarded: http://trac.navit-project.org/ticket/903
    Last-Update: 2011-07-22
    old new  
    8282SET(QT_USE_QTSVG TRUE)
    8383SET(QT_USE_QTXML TRUE)
    8484SET(QT_USE_QTDECLARATIVE TRUE)
    85 find_package(Qt4 COMPONENTS QtCore QtGui QtXml QtDeclarative QtSvg OPTIONAL)
     85if (graphics/qt_qpainter)
     86   find_package(Qt4 COMPONENTS QtCore QtGui QtXml QtDeclarative QtSvg REQUIRED)
     87else()
     88   find_package(Qt4 COMPONENTS QtCore QtGui QtXml QtDeclarative QtSvg)
     89endif()
    8690#pkg-config based detection
    8791find_package(PkgConfig)
    8892if(PKG_CONFIG_FOUND)