Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-115446

qcocoanativeinterface.mm:4:10: fatal error: 'QtGui/private/qopenglcontext_p.h' file not found

    XMLWordPrintable

Details

    • macOS
    • 2b6270af2 (dev), 192c34358 (6.6), 170154704 (6.5)

    Description

      the fix in QTBUG-112656 was not enough

      qcocoanativeinterface.mm still does not build  after being guarded by QT_NO_OPENGL

      because this macro is not actually passed to the compiler

      here is a possible patch to pass the define when opengl is disabled:

      diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt 
      index 0e04b722b4..f3cf558dd8 100644 
      — a/qtbase/src/gui/CMakeLists.txt 
      +++ b/qtbase/src/gui/CMakeLists.txt 
      @@ -360,7 +360,7 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_opengl 
              rhi/qrhigles2_p_p.h 
      ) 
       
      -qt_internal_extend_target(Gui CONDITION MACOS 
      +qt_internal_extend_target(Gui CONDITION MACOS AND QT_FEATURE_opengl 
          SOURCES 
              platform/macos/qcocoanativeinterface.mm 
          LIBRARIES 
      @@ -370,6 +370,18 @@ qt_internal_extend_target(Gui CONDITION MACOS 
              ${FWAppKit} 
      ) 
       
      +qt_internal_extend_target(Gui CONDITION MACOS AND NOT QT_FEATURE_opengl 
      +    SOURCES 
      +        platform/macos/qcocoanativeinterface.mm 
      +    LIBRARIES 
      +        ${FWAppKit} 
      +        ${FWCarbon} 
      +    PUBLIC_LIBRARIES 
      +        ${FWAppKit} 
      +    DEFINES 
      +        QT_NO_OPENGL 
      +) 
      + 
      qt_internal_extend_target(Gui CONDITION APPLE 
          SOURCES 
              image/qimage_darwin.mm

       maybe we could use target_compile_definitions here instead of having 2 rules ?

      cc semlanik 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            semlanik Alexey Edelev
            jschueller Julien Schueller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes