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

Link missing frameworks/libraries in OSX CMake for static Qt

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.5.0, 5.11
    • Fix Version/s: 5.13
    • Component/s: Build System: CMake
    • Labels:
      None
    • Environment:
      OSX
    • Platform/s:
      macOS

      Description

      Similar to bug #47336 but for static variant of Qt on OS X platform.

      Next libraries should be set to INTERFACE_LINK_LIBRARIES property of Qt5::Widgets target to avoid repetition of this code in every user's application.

      Frameworks:

      "-framework Carbon"
      "-framework Cocoa"
      "-framework IOKit"
      "-framework OpenGL"
      

      3rd party libraries:

      "z"
      "cups"
      

      Qt imported libraries:

      Qt5::PrintSupport
      Qt5::QCocoaIntegrationPlugin
      

      Qt libraries (+ debug variant):

      "libqtharfbuzzng.a"
      "libqtpcre.a"
      "libQt5PlatformSupport.a"
      

      Additionaly extra source file have to be added with one line of C++ code:

      Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
      

      I guess this code can be compiled into new library (or may be there already is such library?) or added to target using INTERFACE_SOURCES property (available since CMake 3.1).

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              krf Kevin Funk
              Reporter:
              ruslo Ruslan Baratov
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes