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

Link missing frameworks/libraries in OSX CMake for static Qt

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.13
    • 5.5.0, 5.11
    • Build System: CMake
    • None
    • OSX
    • 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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: