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

moc's don't compile when using a custom library with cmake

    XMLWordPrintable

Details

    • All

    Description

      When creating a CMake QT library using qt_add_library() mocs don't seem to be built properly.

      I came to this conclusion because I got vtable errors in the linking stage trying to statically build qwt and use it in one of my projects. The mocs seem to generate correctly (in mocs/include) but don't get included in mocs_compilation.cpp so they don't get compiled and cause the project to not link correctly.

      qwt with cmake I used: https://github.com/Sani7/qwt

      EDIT:

      minimum reproducer: https://github.com/Sani7/qwt_cmake_error

      Error in Qt creator

      (I only used a thermo in my example, it gives more errors if you have more qwt widgets.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            sani7 Sander Speetjens
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes